Question: HI, ia m trying to program the following in java using object orinted programing (opp) the program has to have a tringle class then a

HI, ia m trying to program the following in java using object orinted programing (opp)

the program has to have a tringle class then a speratre file for main

question :

Create a program that lets the user enter 3 side lengths. The user can then display information about the area, perimeter, angles and type. Since the application is about triangles, which have a clear set of related calculations and properties, a Triangle class will be implemented. It will have at least the following:

private data members (fields) - the 3 side lengths

1 x constructor (because when you create a triangle, the user will provide 3 pieces of information)

1 x protected function (IsTriangleValid)

many x public function (like: GetArea, GetName, ...)

More information:

The semiperimeter is just the perimeter of a triangle (it is denoted by the letter s; s = (a+b+c))., it is actually useful to calculate the area of a triangle. Normally we use the formula (A = bh). But in a lot of triangles, we do not know what the height is and dont want to calculate it; we only know the length of the three sides. It can be proven (using Heron's formula)

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!