Question: Write a cpp program to make a class of English Distance with data members feet and inches, and member function getdata(), showdata(), adddata() and operator+()

Write a cpp program to make a class of English Distance with data members feet and inches, and member function getdata(), showdata(), adddata() and operator+() to get data for two distances, to display data for two distances, to add the data of two distances and to operator overload function to overload the data of class object. Hint: dist1.getdist(); //get dist1 from user Distance dist2(11, 6.25); //define, initialize dist2 dist3 = dist1 + dist2; //single + operator dist4 = dist1 + dist2 + dist3;

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!