Nance_LabWeek_4

Nance_LabWeek_4 - Jason Nance Lab Week 4 Exercise 1 and 2...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Jason Nance Lab Week 4 Exercise 1 and 2 Specification The purpose of this project was to add two constructor functions and a destructor function to the Resistor class from last week's lab assignment. The default member function is first used and prompts the user to input a name for the resistor object then stores the name in the member variable m_cResistorName then initializes the resistor data members to m_dResValue = 1000.0 and m_dTolerance = 0.10. This outputs the message “Default Constructor Called.” Then the parameterized constructor member function is used to accept parameters for nominalResistance and Tolerance will be used to initialize the member variables m_dResValue and m_dTolerance. After they are initialized the function outputs the message “Parameterized Constructor Called.” The copy constructor is then used to copy the values of an already existing Resistor object. The nominal, tolerance, minimum, and maximum values should be copied from the resistor object passed to the function as an argument. This function will prompt the user to enter
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Nance_LabWeek_4 - Jason Nance Lab Week 4 Exercise 1 and 2...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online