subject

Triangle Perimeters Saved Convert the following solution to one that uses an additional method to calculate a triangles perimeter by completing the four TODOs in the starter code public static void main(String args) { Calculate the perimeter of triangle 10.0) (1.1) and (1.5.1) double side 1-getDistance0,0,1,1); double side2-getDistance0.01.1); double side 3-getDistance: double perimeter - side1 side2 side3; System. out. println("The perimeter of triangle 10.0) (1.1) and (1.5-1) + perimeter); o calculate the perimeter of triangle 10.1 10.4) and 14.4 side 1-getDistance 01.04 side-getDistance: sida3-getDistancefl.14.0, ); perimeter side 1 side2 side3 System. out printin (The perimeter of triangle 10,1 104) and (4,4) + perimeten Calculate the periter of triangle that acenters Scanner input new Scanner(System. in System. out. print("Enter your first point) doublex input nextDouble doubleyi input. nextDouble System. out. print Enter your second pointed double 2 Input. nextDouble(): double y2 - input nextDouble: System. out. printlnter you thin po doublex3input. nextDouble doubly input nextDouble 12 13 14 15 16 19 10 19 20 21 22 Calculate the perimeter of triangle 0.1 sido1aget Distance(0,1,04); side2get Distance(0,44,4); olde3getDistance(4,14,0,0); perimeter- side 1+aide2+aldes; System. out. println ("The perimeter of triangle (0.11 0.4) and (44): " + perimeter): Calculate the perimeter of triangle that user enters Scanner Input - new Scanner(System. in); System. out. print("Enter your first point x1 y1): "); double x1 - Input nextDouble(; doubley1 = Input. nextDouble(: System. out. print("Enter your second point(x2.y2): "); double x2 - Input nextDouble : double y2 - input. nextDouble(); System. out. print("Enter your third pointx3y3): "); double x3 - input. nextDouble): double y3 - input nextDouble0:1 side 1 - getDistance(x1.y1.x2.42): side2 - getDistance(x2.72.x3.73); side3 - getDistance(x3.3.x1.yt); perimeter - side 1+side2+side3. System. out. printin ('The perimeter of triangle ("***""+y+""+x2+""+2") and [**3+*+y3: " + perimeter): 25 710 public static double getDistance(double x1, double yt double x2, double y2) return Math sqrt(x1-x2)*(x1-x2)+ly1.part1-21 2 6 8 9 TrianglePerimeter2java New import java. util. Scanner; 3. public class TrianglePerimeter2 public static void main(String[] args) { 5 // TODO2: Replace e. e below with a method invocation to calcTrianglePerimeter to calculate the perimet double perimeter = e. e; 7 System. out. printf ("The perimeter of triangle (0,0) (1,1) and (1.5,-1): %.2f\n", perimeter); 11 TOD03: Replace 2.0 below with a method invocation to calcTrianglePerimeter to calculate the perimete le perimeter = 0.8; System. out. printf ("The perimeter of triangle (0,1) (0,4) and (4,4): %.2f\n", perimeter); 12 13 1/ Calculate the perimeter of triangle that user enters 14 Scanner input = new Scanner(System. in); 15 System. out. print("Enter your first point(x, y1): "); 16 double xd - input. nextDouble(); 17 double yi - input. nextDouble(); System. out. print("Enter your second point(x2,y2): "); 19 Countdown 28 11 18 TrianglePerimeter2java New # Full SC System. out. print("Enter your second point(x2,y2): "); double x2 = input. nextDouble(); double y2 = input. nextDouble(); System. out. print("Enter your third point(3,y3): "); double x3 - input. nextDouble(); double y3 = input. nextDouble(); // TODO4: Replace 0.0 below with a method invocation to calcTrianglePerimeter to calculate the perimeter for triangle that use perimeter = 0.0; System. out. printf ("The perimeter of triangle ("d","y1.-) (*-x2", "y2-") and (*-*3","13"): 2.2F\n", perimeter); public static double getDistance(double xd, double yi, double x2, double y2) { return Math. sqrt((xd x2) (1-x2) (y1 y2) (y1 y2)); W 10001 Define a new method caletranglePerimeter that calculates the perimeter of triangle iven the coordinates of the thru

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:20
The liang book has an example called which is a javafx application that reads the javabook database using a preparedstatement object. using it as a guide, create a similar application called findbooks. it will read a list of authors from the bookdb created in problem 1 and display them in a listview. if the user selects an author, it should display the author's book titles in a textarea.
Answers: 2
question
Computers and Technology, 22.06.2019 08:40
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
question
Computers and Technology, 22.06.2019 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
You know the right answer?
Triangle Perimeters Saved Convert the following solution to one that uses an additional method to ca...
Questions
question
Medicine, 20.03.2021 14:00
question
Chemistry, 20.03.2021 14:00
Questions on the website: 13722362