EGR 1400 HANNA / SIADAT
LAB 5 REQUIREMENTS
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.
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.
Picture boxes (2 of them), insert each image on each picture box.
A check box
Labels (as shown below)
Text boxes (as shown below)
Follow the naming convention recommended in class to name your controls.
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.
STEPS FOR SUBMITTING YOUR LAB:
For each lab and following comments must be added at the beginning of your Visual C# code.
‘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.
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.
EGR 1400 HANNA / SIADAT
GETTING READY FOR AN INTERVIEW with your Lab Mentor:
The interview is 40% of your lab grade. Make sure to be prepared for your mentor’s questions about your program.
When it is your turn to explain your lab to your Lab mentor follow these steps, make sure that your lab mentor sees the following steps
1. Log on to Moodle.
2. Find your submission link for this lab.
3. Download your Lab on your computer.
4. Find your lab wherever you downloaded it.
5. Make sure to Unzip, (or extract) your folder.
6. Open the solution file to demo your lab.
You must follow these steps each time you are being graded for your lab. Your lab mentor must confirm that you downloaded what was submitted on Moodle. You should be graded on what was uploaded on Moodle and not on local copy obtained on C drive or external drives (i.e. memory sticks).
HOW WILL YOU BE GRADED BY YOUR LAB MENTOR, AND WHAT IS
THE GRADING CRITERIA?
1. The application works and was fully tested from what was downloaded and demonstrated from the Moodle upload and not from a local copy or any external drive. ( 50 points )
2. Proper naming conventions were followed as explained in class ( 10 points )
3. Grade assigned based on oral examination of the students understanding of their solution and the overall quality of the solution ( 40 points )