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, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 25.06.2019 10:30
Which of the following is an example of a boolean condition that python could recognize? a: grade + 70 b: grade > = 70 c: "you should aim for at least a 70." d: "you have a 70."
Answers: 1
question
Computers and Technology, 25.06.2019 11:30
What is a wiki farm? a.) a hosting service that allows you to build a wiki. b.) a collection of servers that store wiki search queries. c.) an association of wiki hosting companies. d.) a wiki created using environmentally friendly material.
Answers: 2
question
Computers and Technology, 25.06.2019 18:40
Many loop control variable values are altered by or adding to them
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
Mathematics, 30.09.2019 17:50
Questions on the website: 13722363