Answered>Order 9911

So I’m trying to figure out how to do this question, it’s for my assignment. I can’t really figure out how to do it, it will be highly appreciated if it can be explained to me. Thanks!

Questionl: 1] Three lines can Form a triangle If the sum of any two lines is greater than the third. Using thisinformatiom create three Java classes {see below] with at least one method to determine ifthree lines can form a triangle. Use the code below. and note that you may add Instancevariables. at least one constructor, and other methods. Class lsTrlangle: Used to test the other two classes and contains the method mom. class Una: A line is de?ned be two points [oil and p21. This class contains two constructors: noargument and argument. Also It contains a method called getLength to return the length of a"he. Class Point: Used to de?ne a point. A point Is de?ned by two variables of double datatype. Thisclass contains two constructors one to in itialize the instance variables to zero. while the other one to set the Instance variables with speci?c values. public class IsTricngle { public static void maintstriogil areal [ f’build line 1 mp1 =nw Min to.g?iig p2 = new l?i?tt? l?l:Line linel = not Linetpl p23; f’build line 2 ?gi?t P3 = not l??ntl?r ?l:Point: p4 = m memo o}-Line lincz = new Lineipi p4]: f_.’build line 3rii?t c5 = new E?1§tt? l?l:re?t 96 = new Mitotic Bi:Line line3 = new Linetp5,p61;If get the length and check if the three linee form a trianglerrwrite your code hereilpublic class LineiErurite your code herei public class Pointl Irwrite your code here

 
"Not answered?"
Get the Answer