Write a complete C++ object oriented program solution. You will need to write the following three files: A .h header file describing the class. Include - 2 or 3 data members - at least one constructor function - set and get functions - one function to do a calculation and return the answer through the function call - one function to display the fields in the object A .cpp C++ implementation file that includes the code for the functions prototyped in the header file A driver program to test your class. Include 3 or 4 objects and use those objects to call the function that are given in the header file. |
|
|
|
|
|
|
|
|
#include "Header.h"
is enough
|
|
myClass.first = 5
|
|
myClass.setFirst(x);
|
|
|
|
|
|
|
|