Question: Primarily using DEV C + + application for C + + coding Question is below the coding. #include using namespace std; / / Function to
Primarily using DEV C application for C coding
Question is below the coding.
#include
using namespace std;
Function to calculate area of rectangle
void rectangleAreaint Lint B
float areaLB;
cout"Area of rectangle: shape;
If shape is R then call rectangleArea function
ifshapeR
rectangleAreaparameterparameter;
If shapeis equal to T then call triangleArea function
else ifshapeT
triangleAreaparameterparameter;
Else print Invalid message
else
cout"Invalid choice.";
whileshapeT && shape!R;
Repeat the loop until vilate the while condition
return ;
C Implement the above problem with Objectoriented design. mark
Implement a class Shapes
Implement member functions to accept inputs
Implement suitable methods to implement the calculations for the area.
The output should be same as above.
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
