Question: Write a java program that calculates of rectangular and right triangles Your main function should able to call two functions: calculateTriangle and calculateRectangle Each function
Write a java program that calculates of rectangular and right triangles
Your main function should able to call two functions: calculateTriangle and calculateRectangle
Each function is passed two parameters: length and width for the rectangle and side A and side B for the right triangle. The functions should return the area of the shape they calculated.
The main function then only outputs the areas of the two calculated areas
The rectangle has an area and right triangle has an area
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
