Question: c++ Question 2: ( 14 points) A. Define a class Distance that has two private data members: feet and inch. The class has the following

c++
c++ Question 2: ( 14 points) A. Define a class Distance that

Question 2: ( 14 points) A. Define a class Distance that has two private data members: feet and inch. The class has the following functions only: A constructor that initializes feet and inch to 0. A input Distance function to input the data from the user. A showDistance function to print the distance. B. Write a non-member function min which returns the smallest of two Distance objects, which are passed to the function. C. Write a main program that defines two Distance objects from the user. Compare them and display the details of the smallest. Hint: 1 feet equals 12 inches

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!