Question: Task #1 - void Methods (4 pts) 1. Copy the file Geometry.java as directed by your instructor. This program will compile, but, when you run

Task #1 - void Methods (4 pts) 1. Copy the file Geometry.java as directed by your instructor. This program will compile, but, when you run it, it doesnt appear to do anything except wait. That is because it is waiting for user input, but the user doesnt have the menu to choose from yet. We will need to create this. 2. Below the main method, but in the Geometry class, create a static method called printMenu that has no parameter list and does not return a value. It will simply print out instructions for the user with a menu of options for the user to choose from. The menu should appear to the user as: This is a geometry calculator Choose what you would like to calculate 1. Find the area of a circle 2. Find the area of a rectangle 3. Find the area of a triangle 4. Find the circumference of a circle 5. Find the perimeter of a rectangle 6. Find the perimeter of a triangle Enter the number of your choice: 3. Add a line in the main method that calls the printMenu method as indicated by the comments. 4. Compile, debug, and run. You should be able to choose any option, but you will always get 0 for the answer. We will fix this in the next task. Task #2 - Value-Returning Methods (4 pts) 1. Write a static method called circleArea that takes in the radius of the circle and returns the area using the formula A = r 2. 2. Write a static method called rectangleArea that takes in the length and width of the rectangle and returns the area using the formula A = lw. 3. Write a static method called triangleArea that takes in the base and height of the triangle and returns the area using the formula A = bh. 4. Write a static method called circleCircumference that takes in the radius of the circle and returns the circumference using the formula C = 2r. 5. Write a static method called rectanglePerimeter that takes in the length and the width of the rectangle and returns the perimeter of the rectangle using the formula P = 2l +2w. 6. Write a static method called trianglePerimeter that takes in the lengths of the three sides of the triangle and returns the perimeter of the triangle which is calculated by adding up the three sides. Task #3 - Calling Methods (4 pts) 1. Add lines in the main method in the Geometry class which will call these methods. The comments indicate where to place the method calls. 2. Create a table with sample data and hand calculated results for all 6 menu items. 3. Compile, debug, and run. 4. Test out the program using your sample data and write computer results next to hand calculated results. 5. Put the table with sample data, hand calculated results and computer results in your report. Task #4 - Java Documentation (4 pts) 1. Write javadoc comments for each of the seven static methods you wrote. They should include : a. A short summary of what the method does. b. A description of what the program requires to operate and what the result of that operation is. c. @param listing and describing each of the parameters in the parameter list (if any). d. @return describing the information that is returned to the calling statement (if any). 2. Generate the documentation. Check the method summary and the method details to ensure your comments were put into the Java Documentation correctly. (The picture below represents a fragment of possible description generated for one of the methods.) 3. Print document Geometry.html as a PDF file. Name the file Geometry.pdf and add it to your submission

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!