Question: Use the circleType class and rectangleType class from Lab#1 and add overloading functions for +(plus), and > (greater than) operators to use when the user
Use the circleType class and rectangleType class from Lab#1 and add overloading functions for +(plus), and > (greater than) operators to use when the user chooses the following menu options:
1. Add the area of 2 circles
(You will ask the user for the radius of 2 circles, calculate the area for each, then add the areas of both using the overloaded + operator)
2. Add the area of 2 rectangles
(You will ask the user for the length and width of 2 rectangles, calculate the area for each, then add the areas of both using the overloaded + operator)
3. Compare the area of a circle and rectangle, which is larger?
(You will ask the user for the radius of a circle and length and width of a rectangle, calculate the areas of each, then find out which one has a larger area using the overloaded > operator)
4. Exit
Be sure to do input error checking for at least the menu option (if user inputs a character instead of a number). You can refer back to chapter 3 if necessary.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
