Question: I need help on the C++ assignment. Write a program to calculate the area of several shapes. YOU MUST ORGANIZE YOUR CODE AS INDICATED IN

I need help on the C++ assignment. Write a program to calculate the area of several shapes.

YOU MUST ORGANIZE YOUR CODE AS INDICATED IN THE OBJECTIVES SECION OF THIS TOPIC!

Note: The output should look as same as the below and please also add comments for each codes. Also answer a question in end of bottom.

Your program should collect input from the user as indicated below:

"Enter the number sides:"

"Enter the dimension of side 1:"

"Enter the dimension of side 2:"

"Area is: 12345"

"Go again? (y/n)"

that includes the number of sides, and the length of each side.

A circle

A Triangle

A four sided polygon.

The goal is to learn about function overloading by having one function have several signatures. The body of each function with a different signature (number and type of parameters) will have distinct programming statements to perform the appropriate calculation. The compiler will determine which function to call depending on the signature.

One important point to consider, is a circle a shape with one (1) side, or with no (0) sides?

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!