Question: Please write in C++ Design a Length class that has two member variables: meters and centimeters. The class should have a constructor, an accessor, and

Please write in C++
Design a Length class that has two member variables: meters and centimeters. The class should have a constructor, an accessor, and mutator functions for the member variables an a member function getLength() that returns the length in centimeters. Demonstrate the class by writing a separate program that creates two instances of the class. The program should ask the user to enter the lengths in meters and centimeters, which are stored in the Length objects. The program should then compare the lengths of the two objects with the help of the getLength member function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
