Question: * In C# programming * Create a program named CalArea that calculates and displays the area of a circle / rectangle / triangle . The
In C# programming
Create a program named CalArea that calculates and displays the area of a circlerectangletriangle
The program Main should have a prompt for choosing the area to calculate. There are three choices: circle, rectangle, and triangle. Upon choice, the Main should further prompt for inputs for parameters. For a circle, only radius is needed; for rectangle, both length and width are needed; for triangle, three sides are needed. Once parameters are entered, the Main should call the corresponding overloaded methods named DisplayArea for the chosen shape The three overloaded methods should have the same names but different numbers of parameters, and should calculate and display the areas of the corresponding shapes. The formula for the area of a triangle with three sides and is given by where A sample output is shown below. Submit the cs file as an attachment.Note: the program assumes: all parameters are positive, and in the case of a triangle, two sides are greater than the other one. If your program can further validate the the two assumptions and correct invalid inputs until valid parameters are entered, as much as bonus points will be given.
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
