Question
I need help on a C++ assignment. Write a program to calculate the area of several shapes. YOU MUST ORGANIZE YOUR CODE AS INDICATED IN
I need help on a 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! 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.
Note: Please use
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started