Create a c++ console application that utilizes the core


This must work in C++ visual studios 2008 with the latest libraries.

Objective: Create a C++ console application that utilizes the core concepts of designing and creating classes, objects, properties and methods. 

Overview: Add two constructor functions and a destructor function to the Resistor class from last week's lab assignment.

Resistor Class UML Diagram (new members are in bold font): 

Class: ResistorClass 
+ string m_cResistorName;
- double m_dResValue;
- double m_dTolerance;
- double m_dMinResistance;
- double m_dMaxResistance; 
+ void DisplayResistor(void)
+ void EnterResistance (void )
+ void AddSeries (ResistorClass Resistor1, ResistorClass Resistor1)

+ ResistorClass( )
+ ResistorClass(string Name, double nominalResistance, double Tolerance)
+ResistorClass(const ResistorClass &ResistorObject)
+ ~ResistorClass( ) 

Resistor Class Member Specifications:

Member Variables Specification 
string m_cResistorName Stores the resistors name 
double m_dResValue Stores the resistor's nominal value 
double m_dTolerance The resistor's ohm tolerance stored as a decimal value 
double m_dMinResistance The resistor's minimum resistance in ohms 
double m_dMaxResistance The resistor's maximum resistance in ohms 



New Member Functions Specification 
ResistorClass( ) Prompt the user to input a name for the resistor object. Store the name in the member variable m_cResistorName.

Initialize the resistor data members to the following values:

Set m_dResValue = 1000.0
Set m_dTolerance = 0.10

The value of m_dMinResistance and m_dMaxResistance should be calculated using the member variables m_dResValue and m_dTolerance. Use the formula from week 3's lab assignment.

This function should output the message: "Default Constructor Called" 
ResistorClass(string Name, double nominalResistance, double Tolerance) This is a parameterized constructor that accepts arguments for the resistor's name, nominal resistance and tolerance.

The parameters nominalResistance and Tolerance will be used to initialize the member variables m_dResValue and m_dTolerance. 
The value of m_dMinResistance and m_dMaxResistance should be calculated using the member variables m_dResValue and m_dTolerance. Use the formula from week 3's lab assignment.

This function should output the message: "Parameterized Constructor Called" 

ResistorClass(const ResistorClass &ResistorObject) This is a copy constructor 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 a new name for the Resistor object receiving the copied values. The name will be stored in the member variable m_cResistorName.

This function should output the message: "Copy Constructor Called" 

~ResistorClass( ) This is the destructor function. This function will output the message "Destructor Called for " and complete the message by displaying the resistor's name as stored in the member variable m_cResistorName. 

Note: Begin work on this program by first creating the class declaration. Then code and test the default and then the parameterized constructor functions. Code and test the rest of the functions one at a time. To avoid compiler complaints, comment out the member function prototypes in the class declaration that have not yet been completed.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create a c++ console application that utilizes the core
Reference No:- TGS0133794

Expected delivery within 24 Hours