Question: If someone could help me with this problem in C++ Write the definition for a class called Distance that has data member feet as integer
Write the definition for a class called Distance that has data member feet as integer and inches as float. The class has the following member functions: void set(int, float) to give value to object void disp() to display distance in feet and inches Distance add(Distance) to sum two distances & return distance Write the definitions for each of the above member functions. Write main function to create three Distance objects. Set the value in two objects and call add() to calculate sum and assign it in third object. Display all distances
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
