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

If someone could help me with this problem in C++  If someone could help me with this problem in C++ Write

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!