Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 4 . Write a JAVA program that prompts the user to enter three points ( x 1 , y 1 ) , ( x

Q4. Write a JAVA program that prompts the user to enter three points (x1,y1),(x2,y2),(x3,y3) of a
triangle and displays its area. The formula for computing the area of a triangle is
s=side1+side2+side32
area =s(s-side1)(s-side2)(s-side3)2
Where each side can be calculated using the formula given in Q3 above. (6 marks)
Sample run:
Enter three points for a triangle.
(x1,y1):00
(x2,y2):50
(x3,y3):05
The area of the triangle is 12.5!!!!!!PLEASE MAKE SURE ITS JAVA CODE!!!!!!!
image text in transcribed

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

a. How will the leader be selected?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago