Question: C++ question Add a main method to the FeetInches class. The main method should create three FeetInches objects. Create one object named sum_length using the

C++ question

Add a main method to the FeetInches class. The main method should create three FeetInches objects. Create one object named sum_length using the no-parameters constructor. For the other two, prompt the user to enter a number of feet and a number of inches, and construct a FeetInches object using the two parameter constructor. Do this twice, to create the two objects named length1 and length2. Then test the equals method by using it to compare the objects. ALso, test the add method by adding the two lengths length1 and length2 and assiigning the result to the sum_length object. Print the result of the length comparison and print the sum_length. Test the setFeet and setInches methods on sum_length and print it after each set operation to verify it changed properly.

FeetInches Class:

http://cpp.sh/3jhji

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!