Question: // This program declares the Square class and uses member functions to find // the perimeter and area of the square // PLACE YOUR NAME
Exercise 1: This program asks you tofl in the class declaration and client code based on the implementation of the member functions. Fill in the code so that the following input and outputl be generated: Please input the length of the side of the square The area of the square is 64 The perimeter of the square is 32 Exercise 2: Add two constructors and a destructor to the class and create the implementation of each. One constructor is the default constructor that sets the side to 1. The other constructor will allow the user to initialize the side at the definition of the object. The destructor does not have to do anything but reclaim memory space. Create an object called box1 that gives the value of 9 to the constructor at the definition. Add output statements so that the following is printed in addition to what is printed in Exercise 1 The area of box1 is 81 The perimeter of box1 is 36
Step by Step Solution
There are 3 Steps involved in it
To complete the program well fill in the missing parts according to the provided instructions and requirements Step 1 Class Declaration First declare ... View full answer
Get step-by-step solutions from verified subject matter experts
