Comp 220 ilab 2 of 7
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Comp 220 ilab 2 of 7

  • 322 views
Uploaded on

This lab requires you to create a multifile C++ project in order to design and implement an object-oriented program using a class to model the characteristics and function of a......

This lab requires you to create a multifile C++ project in order to design and implement an object-oriented program using a class to model the characteristics and function of a resistor.
Deliverables
1. Submit a single Notepad file containing the source code for Exercise 1 to the Dropbox for Week 2. Your source code should use proper indentation and be error free. Be sure that your last name and the lab number are part of the file name; see the following example: YourLastName_Lab1.txt.
Each program should include a comment section that includes (at a minimum) your name, the lab and exercise number, and a description of what the program accomplishes.
2. Submit a lab report (a Word document) containing the following information to the Dropbox for Week 2.
o Include your name and the exercise number.
o Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output.
o Test Plan: Include a brief description of the method you used to confirm that your program worked properly. If necessary, include a clearly labeled table with test cases, predicted results, and actual results.
o Summary and Conclusions: Include a summary of what the lab demonstrated and any conclusions drawn from the testing of the lab program.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
322
On Slideshare
322
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. HELPIDO.COMCLICK HERE TO GET THE SOLUTION !!!!!!!!COMP/220 iLab 2 of 7 - SQL CourseiLAB OVERVIEWScenario and SummaryThis lab requires you to create a multifile C++ project in order to design and implement an object-oriented program using a class to model the characteristics and function of a resistor.Deliverables1. Submit a single Notepad file containing the source code for Exercise 1 to the Dropbox forWeek 2. Your source code should use proper indentation and be error free. Be sure that your lastname and the lab number are part of the file name; see the following example:YourLastName_Lab1.txt.Each program should include a comment section that includes (at a minimum) your name, the laband exercise number, and a description of what the program accomplishes.2. Submit a lab report (a Word document) containing the following information to theDropbox for Week 2.o Include your name and the exercise number.o Specification: Include a brief description of what the program accomplishes, including itsinput, key processes, and output.o Test Plan: Include a brief description of the method you used to confirm that yourprogram worked properly. If necessary, include a clearly labeled table with test cases, predictedresults, and actual results.o Summary and Conclusions: Include a summary of what the lab demonstrated and anyconclusions drawn from the testing of the lab program.o Answers to Lab Questions: Answer any and all lab questions included in the lab steps.Summary: Write a statement summarizing your predicted and actual output. Identify and explainany differences.
  • 2. Conclusions: Write at least one nontrivial paragraph that explains, in detail, either a significantproblem you had and how you solved it or, if you had no significant problems, something youlearned by doing the exercise.Each lab exercise should have a separate section in the lab-report document.Your lab grade will be based upon1. the formatting of your source code;2. the use of meaningful identifiers;3. the extent of internal documentation;4. the degree to which an exercises’ specifications are met; and5. the completeness of your lab report.iLAB STEPSSTEP 1: Create a Multifile ProjectObjective: Create a C++ console application that will model the characteristics of a resistor.1. Create a multifile project. Create and add to the project an h file containing the resistor-class definition.2. Create and add to the project a cpp file containing the implementation of the class-member functions.3. Create and add to the project a ccp file containing the main() function, which willinstantiate a resistor object and test its member functions.STEP 2: Required Class MembersThe resistor class will, at minimum, have members that do the following.1. store the nominal resistance value of a resistor2. store the tolerance of a resistor3. initialize any and all nominal-resistance values to correct, EIA, nonzero values that aregreater than 0 and less than 1,000,000 ohms4. initialize any and all resistance-tolerance values to correct, E12, E24, E48, or E96resistance-tolerance values5. allow the nominal-resistance and tolerance values of a resistor object to be changed bythe user6. All member functions should have a test message stating the name of the function. All thetest messages should be displayed or not displayed, depending on the value of a Boolean variabledeclared in main().
  • 3. a. If the Boolean value = true, display the message.b. If the Boolean value = false, do not display the message.STEP 3: Program Operations1. Function main() should instatiate two objects of class resistor.2. Function main() should display the current values of all resistor objects.a. Function main() should also calculate and display the minimum and maximum in-toleranceresistance values of each resistor object from the resistor data members.3. Function main() should allow the user to change the values of the nominal resistance andthe resistor tolerance of both resistor objects, and it should also correctly handle out of numeric-range input. Main() is also responsible for making sure that the user can successfully enter onlycorrect, EIA resistance and tolerance values.a. The user should be given the following data-entry choices:1. accept current EIA values for resistance and tolerance;4. The function main() should display the new, modified values of the resistor object,including the new min and max in-tolerance resistance values.5. The function main() should be executed twice: once with the test messages displayed andonce without.STEP 4: Lab QuestionsYou are not required to copy the question text into your document, but all answers should be listedwith the question number they answer.1. List the complete reference-source information for where you found the EIA standardresistor value and tolerance information.2. How was this reference discovered and where?3. The constructor requires the initialization values for the nominal resistance and thetolerance when an object is instantiated to be a correct E-series resistance and tolerancecombination. Describe how this was accomplished in your program design and implementation.4. In the lab, you were required to provide mutator functions to change the nominal-resistance and tolerance values of a resistor object.a. Describe how this was accomplished so that the user could not enter an invalid nominal-resistance and E-series tolerance combination.5. Describe how this process was different and/or similar to how you implemented thisvalidation in the class constructor.CLICK HERE TO GET THE SOLUTION !!!!!!!!