Question: Write a Ct program that calculates and displays the area and perimeter of three kinds of shapes: CIRCLE, SQUARE, and RECTANGLE. Follow the following steps

 Write a Ct program that calculates and displays the area andperimeter of three kinds of shapes: CIRCLE, SQUARE, and RECTANGLE. Follow the

Write a Ct program that calculates and displays the area and perimeter of three kinds of shapes: CIRCLE, SQUARE, and RECTANGLE. Follow the following steps 1 Define a scoped enumeration named ShapeKind whose possible values are the above three shape kinds. Define a Shape structure with three members: 2. An enumerated variable named kind whose data type is the scoped enumeration Shapekind defined in step 1 Two double members named length and width representing the length and width of the square or rectangle shapes. For circles, the length and width are the same and you can use the length as the diameter of the circle.. o o Define a function with the following prototype the shape 3. for calculating and returning the area of double area (Shape s) Define a function with the following prototype for calculating and returning the peri 4. meter of the shape double perimeter (Shape s) Define a function with the following prototype for returning the string "Circle", "Rectangle", or "Square" depending on the kind of the shape 5. string kind (Shape s)

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!