Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c# CISS 233: Spring 2016 Project 02 Areas of Shapes, Using a menu, and methods. Console Application You'll name your Console App Project Project02AreaCalculator This
c#
CISS 233: Spring 2016 Project 02 Areas of Shapes, Using a menu, and methods. Console Application You'll name your Console App Project Project02AreaCalculator This project will calculate the areas of one of six shapes. Those six shapes will be 1. Circle 2. Square 3. Rectangle 4. Rhombus 5. Parallelogram 6. Trapezoid You'll find the formulas at http://www.coolmath.com/reference/areas In this Project you're going to create a console application that will have a menu in the Main method asking the user to enter which shape they'd like to find the area of Include error checking so that if they make a menu selection that is not in the menu you will simply refresh the page until they make a correct menu selection. The last menu selection should be for quit and if they select this then clear the screen and say goodbye asking for a press any key to end. The menu should look like this Shape Area Calculator 1. Circle . Square 3. Rectangle 4. Rhombus S. Parallelogram 6. Trapezoid 7. Exi Select a shape type to calculate: Once their selection is made you'll call a method for that shape and then prompt the user for input (according to the shape type) and then figure the area. The methods will be designated as type static, have a return type of void, and have no parameters passed in. So all of the user prompting and area calculations will be done in the methods You can create a separate method to prompt the user and return the value if you like. The methods will be the following: static private void CalculateCircle(i area pi radius * radius (or pi times radius squared) static private void CalculateSquare(Ot larea-side side (or side squared) static private void CalculateRectangle0 llarea Length Width static private void CalculateRhombus0 llarea-2 a * b (a and b being diagonals) static private void CalculateParallelogram0 llareabase height static private void CalculateTrapezoidOi llarea 2 height (largeBase +smallBase) To calculate the area for a circle using Pi set Pi to 3.14. Variables should be of type Double for all of your area calculations. At any time if a user is entering values for area calculations if they enter-1 you'll let them exit to the main menu. Square Area Calculator Square Area Calculator Enter the length of one side of the square (-1 to exit back to menu): Square Area Calculator You've entered 13.3 for the length os a side. The area of your square is: 176.89 Press any key to cont inue!!! Rectangle Area Calculator Rectangle Area Calculator Enter the length of one side of the rectangle (1 to exit back to menu): Rectangle Area Calculator Enter the length of an oppos ing side of the rectangle (-1 to exit back to menu Rectangle Area Calculator You' ve entered 3.651 for the first side. You've entered 2.25 for the oppos ing side. The area of your rectangle is: 8.21475 Press any key to cont inue
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