# LAB 5 REQUIREMENTS

LAB 5 REQUIREMENTS
Problem:
In this lab, you will write a visual C# program that will allow the user to adjust the source voltage and resistances for a circuit. Additionally, the user has the option, using a checkbox, to eliminate the parallel resistor and work with a simple series circuit. After entering the values for the resistors and selecting a source voltage using the TrackBar, your program will put the values for the circuit current and voltages shown in the corresponding labels. The images that are required for this lab are included with this requirements document, please check the requirements folder to locate your image files.
Part A
Design the main form for the Circuit Analyzer. Use the images provided with the requirements
document. Place a TrackBar on the form that the user will use to adjust the source voltage. Properly label the resistors, R1, R2, and R3, and place a textbox next to each resistor where the user will enter a resistance value in ohms.
The initial values of R1, R2, and R3 should be 100, 150, and 150, respectively and the initial value of the voltage source should be set to 4 Volts. Additionally, the labels for the calculated values (I, V1, and V2) should start with the correct values for the circuit with the default resistances. Add a checkbox as shown in the sample Circuit Analyzer on the following page.
Format I1 to four decimal places, V1 to two decimal places, and V2 to two decimal places. When the user changes either one of the resistance values (Change event for the textboxes) or moves the sliding TrackBar to a different source voltage, the calculated values in the labels for I1, V1, and V2 should recalculate. You can easily do this by copying and pasting the code that you created for the TrackBar’s Scroll event into the Change event for each TextBox. These calculations should be displayed for the selected resistances and source voltage as shown above.
Controls needed:
 Track Bar
 Picture boxes (2 of them), insert each image on each picture box.
 A check box
 Labels (as shown below)
 Text boxes (as shown below)
SAMPLE RUN
Extend the program so that the user has two circuits to choose from. When the ‘Remove R3 from circuit’ checkbox is checked, the circuit should look like the circuit shown on the next page.
When the user checks the box, since the circuit is changing, be sure that you update the values in the I1, V1, and V2 labels as shown above. This time when the user changes the source voltage using the TrackBar or changes one of the two resistances by entering a new value in the textbox, the computer will use the formulas for this new circuit to calculate I1, V1, and V2.
For each lab and following comments must be added at the beginning of your Visual C# code.
‘LAB #
‘SEMESTER NAME
‘STUDENT’S FIRST NAME, LAST NAME
‘I fully understand the following statement.
‘OU PLAGIARISM POLICY
‘All members of the academic community at Oakland are expected to practice and uphold ‘standards of academic integrity and honesty. An instructor is expected to inform and instruct ‘students about the procedures and standards of research and documentation required of students ‘in fulfilling course work. A student is expected to follow such instructions and be sure the rules ‘and procedures are understood in order to avoid inadvertent misrepresentation of his/her work. ‘Students must assume that individual (unaided) work on exams and lab reports and documentation ‘of sources is expected unless the instructor specifically says that is not necessary.
‘The following definitions are some examples of academic dishonesty:
 ‘Plagiarizing from work of others. Plagiarism is using someone else’s work or ideas without
‘giving the other person credit; by doing this, a student is, in effect, claiming credit for
‘someone else’s thinking. Whether the student has read or heard the information he/she uses,
‘the student must document the source of information. When dealing with written sources,
‘a clear distinction would be made between quotations (which reproduce information from
‘the source word-for-word within quotation marks) and paraphrases (which digest the
‘source information and produce it in the student’s own words). Both direct quotations and
‘paraphrases must be documented. Just because a student rephrases, condenses or selects
‘from another person’s work, the ideas are still the other person’s, and failure to give ‘credit
constitutes misrepresentation of the student’s actual work and plagiarism of ‘another’s ideas.
Naturally, buying a paper and handing it in as one’s own work is ‘plagiarism.
 ‘Cheating on lab reports falsifying data or submitting data not based on student’s own work.
All labs will be submitted electronically, no paper copies will be given to Lab mentors.
Before submission:
 Please create a folder named as Lab5_FName_LName:
 Place your solution file under this folder.
 Zip the folder then upload through Moodle. You will not be able to upload unless you zip, 7zip or rar the folder.
1. Log on to Moodle.