Question: C++ don't do advance code more than Chapter 9 Objects and Classes. 9.1 (The Rectangle class) Design a class named Rectangle to represent a rectangle.
C++ don't do advance code more than Chapter 9 Objects and Classes.

9.1 (The Rectangle class) Design a class named Rectangle to represent a rectangle. The class contains: Two double data fields named width and height that specify the width and height of the rectangle. A no-arg constructor that creates a rectangle with width 1 and height 1. A constructor that creates a default rectangle with the specified width and height The accessor and mutator functions for all the data fields A function named getAreaO that returns the area of this rectangle A function named getPeri meter() that returns the perimeter. Draw the UML diagram for the class. Implement the class. Write a test program that creates two Rectangle objects. Assign width 4 and height 40 to the first objects and find their areas and perimeters
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
