Question: Give a rectangular shape, complete a Java program to calculate the area and parameter. You will need to define two classes - class Triangle and

Give a rectangular shape, complete a Java program to calculate the area and parameter. You will need to define two classes - class Triangle and class TriangleDriver. The UML diagram of the system is given in Figure 1 below.
\table[[,Triangle],[TriangleDriver,\table[[- bottom, leftside, rightside: double],[- height: double],[- area: double],[- parameter: double]]],[+ main(String] args): void],[',\table[[+ getBottom (): double],[+ getleftside(): double],[+ getRightside(): double],[+ getHeight(): double],[+ setBottom(double btm): void],[+ setLeftside(double left): void],[+ setRightside(double right): void],[+ setHeight(double hgt): void],[+ calculateArea(): double],[+ calculateParameter(): double],[+ Triangle()],[+ Triangle(double btm, double hgt)],[+ Triangle(double btm, double ls, double rs)]]]]
Figure 1. UML model of the Triangle calcalator
 Give a rectangular shape, complete a Java program to calculate the

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!