Problem

In this exercise, you modify the Terney Landscaping program from Lab 15-2 so that it pas...

In this exercise, you modify the Terney Landscaping program from Lab 15-2 so that it passes an object to a function.

a. If necessary, create a new project named Advanced18 Project and save it in the Cpp7\Chap15 folder. Copy the instructions from the Lab15-2.cpp file into a source file named Advanced18.cpp. Change the filename in the first comment. 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 Advanced18 Rectangle.h file. Change the filename in the first comment.

b. Modify the program so that it uses a function named calcAndDisplay to calculate and display the area and the total price. Pass the Rectangle object and the price per square yard to the function. Save and then run the program. Test the program using 120 feet as the length, 75 feet as the width, and 1.55 as the price. The program should display 1000.00 as the area in square yards and $1550.00 as the total price.

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