Question: A school would like educational software to help students check their answers to math problems related to right angle triangles. The program should allow
"A school would like educational software to help students check their answers to math problems related to right angle triangles. The program should allow the student to enter the adjacent and opposite sides of the right-angle triangle and output a summary of the triangle listing the lengths of the 3 sides, as well as the length of the hypotenuse, perimeter, and surface area. All number outputs should be formatted to 4 decimal places". Specifics The program will have a class with constructors, mutators (gets, sets), and at least one (or more) work method(s) to generate results or perform calculations. The first class RightAngle Triangle has had the design already created. You will need to implement the class and then create a second class called Practice3 including a method main to complete the program. The class RightAngleTriangle is listed below in a UML class diagram. RightAngle Triangle -adjacent double -opposite:double +RightAngle Triangle() +RightAngle Triangle(adjacent:double, opposite:double) +getAdjacent():double +setAdjacent(adjacent double):void +getOpposite():double +setOpposite (opposite:double):void +calculateHypotenuse():double +calculatePerimeter():double +calculateArea():double +createReport():String Practice 3 +main(args:String[]):void Questions 1. Provide an outline for methods: calculateHypotenuse(), calculatePerimeter(), calculate Area(), and calculateReport(). Include an example of each math calculation as well. Tip: The method that calculates the Perimeter, and the method that generates a String representation of the RightAngle Triangle both need the hypotenuse. Call the calculateHypotenuse() method inside of these methods, rather than re-creating the logic for calculating the hypotenuse 2. Write Pseudocode: Write pseudocode to design these methods of the class RightAngle Triangle: calculateHypotenuse(), calculatePerimeter(), calculateArea(), and createReport. Write pseudocode for the method main of the main program that includes: (1) prompt the user for inputs, (2) place data into an instance of your class, (3) provide outputs resulting from using the work methods. | 3. Create a flowchart for the above Pseudocode
Step by Step Solution
There are 3 Steps involved in it
Code Outline and Pseudocode 1 Method Outlines calculateHypotenuse Example a2 b2 c2 c sqrta2 b2 Pseudocode Square the adjacent and opposite sides Add the squares together Take the square root of the su... View full answer
Get step-by-step solutions from verified subject matter experts
