Question: You should write a class called Quadrilateral It should have a constructor that takes 8 double parameters (x1,y1,x2,y2,x3,y3,x4,y4) You can assume the points are in
You should write a class called Quadrilateral It should have a constructor that takes 8 double parameters (x1,y1,x2,y2,x3,y3,x4,y4) You can assume the points are in order and form a convex polygon The class should have a method called analyze that returns an integer as follows: 0 for square 1 for rectangle 2 for trapezoid 3 for rhombus 4 for none of the above Otherwise the book problem instructions should be followed. Turn in 1 class file. I will test it with JUnit tests like this one: @Test public void test() { Quadrilateral q = new Quadrilateral(0.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0); assertEquals(0,q.analyze()); } use jave8 and eclipse
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
