Question: Lab Exercise Task 1 : Class Implementation Design a class called Rectangle that can be used to store a set of elements in the list
Lab Exercise
Task : Class Implementation
Design a class called Rectangle that can be used to store a set of elements in the list attribute eg numbers, text, letter and etc The class initially was designed to store a set of integer numbers that not more than elements. Due to the limitations of design, you have to redesign the class into a template class so that the list element data type will not fix during the design time of the class.
Task :
Implement three utility methods exclude constructor and destructor methods that could be useful in the Rectangle class to provide the basic operations for the class. You must explain the logic for each implemented methods clearly in your report.
Task :
Create a driver program to exercise the Rectangle template class. Create two Rectangle objects and store two different data eg int, double or string Exercise the methods that is implemented in the task
Extra:
Please also provide logic explanation for task
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
