In this exercise, you use the Rectangle class from Lab 15-2 to instantiate a Rectangle object in

Question:

In this exercise, you use the Rectangle class from Lab 15-2 to instantiate a Rectangle object in the All-Around Fence Company program. If necessary, create a new project named Intermediate14 Project. 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 Intermediate14 Rectangle.h. Change the filename in the first comment. The owner of All-Around Fence Company wants a program that calculates the cost of installing a fence. Use the IPO chart shown in Figure 15-22 to code the program. Enter your C++ instructions into a source file named Intermediate14.cpp. Display the perimeter as an integer. Display the total price with a dollar sign and two decimal places. Also enter appropriate comments and any additional instructions required by the compiler. Save and then run the program. Test the program using 120 as the length, 75 as the width, and 10 as the cost per linear foot. The program should display 390 linear feet as the perimeter and $3900.00 as the total price. 


Input Length (in feet) width (in feet) fence cost (per Linear foot) Processing Processing items: Rectangle object Output perimeter total price Algorithm: 1. enter length, width, and fence cost 2. use the Rectangle object's setDinmensions method to assign the length and width to the Rectangle object; pass the method the


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

Step by Step Answer:

Question Posted: