Question
HI, ia m trying to program the following in type script using object orinted programing (opp) the program has to have a tringle class then
HI, ia m trying to program the following in type script 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)
the output has to be like this :
Side A: 5 Side B: 4 Side C: 3 The area is: 6.0 Angle A is: 90.0 Angle B is: 53.13010235415599 Angle C is: 36.86989764584401 The name is: Right Scalene The perimeter is: 12.0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started