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.
Step by Step Answer:
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell