Question: 2. Given the length class interface below: class length public: length(); length (int f, int i); initialized Postconditin: a new length object is declared and


2. Given the length class interface below: class length public: length(); length (int f, int i); initialized Postconditin: a new length object is declared and void set Feet (int); known as the "mutator" function object is changed Postcondition: feet date member of the calling void set Inches (int); int get Feet() function is returned known as the "accessor" calling object Postcondition: feet data member of the int get Inches bool compare (length& obj2); compare the the calling object to obj3 otherwise condition: return true if calling object is longer; return false void display(); object like 5'7" for 5 feet 7 inches Postcondition: display the contents of the callig than 12 Note that the inches part must be less length& obj2); object and obj2 Postcondition: Display the contents of the sum of the calling Note that the inches must be less than 12 double area length& obj2); obj width Post return the area of a rectangle where calling represents the sqare ft. and obj2 represents the length of the rectangle Area is measure in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
