![Write a program that implements and uses a class called MyRectangle. Data items should include: length, width, color, and label. Define properties with appropriate accessor functions for each of the data items. Methods should include a default constructor that sets values to the empty string or zero, a constructor that allows the user to specify all values for the data items, a member method that computes and returns the area of the shape, and a member method called DisplayShape that outputs all the information (including the area via the ComputeArea method for the given rectangle in a reasonable format.](https://gotit-pro.com/wp-content/uploads/2023/10/abae4993-ade4-439e-9682-77b3ca38724c.png)
Write a program that implements and uses a class called MyRectangle. Data items should include: length, width, color, and label. Define properties with appropriate accessor functions for each of the data items.
Methods should include a default constructor that sets values to the empty string or zero, a constructor that allows the user to specify all values for the data items, a member method that computes and returns the area of the shape, and a member method called DisplayShape that outputs all the information (including the area via the ComputeArea method for the given rectangle in a reasonable format.
Solved By Verified
Study Co-Pilot
All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
![](https://gotit-pro.com/wp-content/uploads/2021/05/info.png)
Instant
Download
Student review: (6 ratings) 6 out of 6 people found this solution helpful.