Problem

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

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 Intermediate14 Project and save it in the Cpp7\Chap15 folder. Copy the instructions from the Lab15-2.cpp file into a source file named Intermediate14.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 Cpp7\Chap15\Lab15-2 Project folder or the Cpp7\Chap15 folder) into a header file named Intermediate14 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 also should display the area and total price.) Save and then run the program. Test the program appropriately.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 15
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT