Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HI, ia m trying to program the following in type script not java script using object orinted programing (opp) the program has to have a

HI, ia m trying to program the following in type script not java 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 :

image text in transcribed

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.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

Finding and scheduling appointments with new prospective clients.

Answered: 1 week ago