Question: Design and implement a program in C# (name it ComputeAreas) that defines four methods as follows: Method squareArea (double side) returns the area of a
Design and implement a program in C# (name it ComputeAreas) that defines four methods as follows:
Method squareArea (double side) returns the area of a square.
Method rectangleArea (double width, double length) returns the area of a rectangle.
Method circleArea (double radius) returns the area of a circle.
Method triangleArea (double base, double height) returns the area of a triangle.
In the main method, test all methods with different input value read from the user. Document your code and properly label the input prompts and the outputs as shown below.
Sample run:
Square side: 5.1
Square area: 26.01
Rectangle width: 4.0
Rectangle length: 5.5
Rectangle area: 22.0
Circle radius: 2.5
Circle area: 19.625
Triangle base: 6.4
Triangle height: 3.6
Triangle area: 11.52
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
