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 1: Class Implementation
Design a class called Rectangle that can be used to store a set of elements in the list attribute (e.g. numbers, text, letter and etc). The class initially was designed to store a set of integer numbers that not more than 50 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 2:
Implement three (3) 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 3:
Create a driver program to exercise the Rectangle template class. Create two (2) Rectangle objects and store two (2) different data (e.g. int, double or string). Exercise the methods that is implemented in the task 2
Extra:
Please also provide logic explanation for task 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!