In this exercise, you modify the Rectangle class from Lab 15-2 so that it allows a program

Question:

In this exercise, you modify the Rectangle class from Lab 15-2 so that it allows a program to view the contents of the length and width data members. You also modify the Terney Landscaping program so that it displays the length and width measurements. 

a. If necessary, create a new project named Intermediate15 Project and save it in the Cpp8\Chap15 folder. Copy the instructions from the Lab15-2.cpp file into a source file named Intermediate15.cpp. Change the filename in the first comment. 

b. Copy the instructions from the Lab15-2 Rectangle.h file (which is located in either the Cpp8\Chap15\Lab15-2 Project folder or the Cpp8\Chap15 folder) into a header file named Intermediate15 Rectangle.h file. Change the filename in the first comment. 

c. Add two value-returning methods to the Rectangle class. Each method should return the value of one of the private variables. 

d. Modify the Terney Landscaping program so that it uses the methods to display the length and width of the Rectangle object. (The program should also display the area and total price.) Test the program appropriately

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: