Question: I need help debugging this, the second scanner does not find the class Area_Convex_Polygon when i compile it in intelija I will include a pic

I need help debugging this, the second scanner does not find the class

Area_Convex_Polygon when i compile it in intelija

I will include a pic of the homework problem aswell.

I need help debugging this, the second scanner does not find the

import java.util.ArrayList; import java.util.Scanner; class Area { public double x; public double y; public Area(double x, double y) { this.x = x; this.y = y; } public Area() { this(0,0); } public double x() { return x; } public void setX(double x) { this.x = x; } public double y() { return y; } public void setY(double y) { this.y = y; } public double distance(double x, double y) { return Math.sqrt((this.x - x) * (this.x - x) + (this.y - y) * (this.y - y)); } public double distance(Area point) { return distance(point.x, point.y); } public Area getCenterPoint(Area p) { return new Area((p.x + this.x) / 2, (p.y + this.y) / 2); } public static Area getCenterPoint(double x1, double y1, double x2, double y2) { return new Area((x1 + x2) / 2, (y1 + y2) / 2); } // Return true if this point is on the left side of the // * directed line from p0 to p1 public boolean leftOfTheLine(Area p0, Area p1) { return leftOfTheLine(p0.x, p0.y, p1.x, p1.y, x, y); } // Return true if this point is on the same // * line from p0 to p1 public boolean onTheSameLine(Area p0, Area p1) { return onTheSameLine(p0.x, p0.y, p1.x, p1.y, x, y); } // Return true if this point is on the right side of the // * directed line from p0 to p1 public boolean rightOfTheLine(Area p0, Area p1) { return rightOfTheLine(p0.x, p0.y, p1.x, p1.y, x, y); } // Return true if this point is on the // * line segment from p0 to p1 public boolean onTheLineSegment(Area p0, Area p1) { return onTheLineSegment(p0.x, p0.y, p1.x, p1.y, x, y); } // Return true if point (x2, y2) is on the left side of the // * directed line from (x0, y0) to (x1, y1) public static boolean leftOfTheLine(double x0, double y0, double x1, double y1, double x2, double y2) { return (x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0) > 0; } // Return true if point (x2, y2) is on the same // * line from (x0, y0) to (x1, y1) public static boolean onTheSameLine(double x0, double y0, double x1, double y1, double x2, double y2) { return (x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0) == 0; } // Return true if point (x2, y2) is on the // * line segment from (x0, y0) to (x1, y1) public static boolean onTheLineSegment(double x0, double y0, double x1, double y1, double x2, double y2) { double position = (x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0); return position = x2 && x2 >= x1)); } // Return true if point (x2, y2) is on the right side of the // * directed line from (x0, y0) to (x1, y1) public static boolean rightOfTheLine(double x0, double y0, double x1, double y1, double x2, double y2){ return (x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0) in); System.out.print("Enter the number of the points: "); int numOfPoints = input.nextInt(); System.out.print("Enter the coordinates of the points: "); ArrayList points = new ArrayList(); for (int i = 0; i out.println("The total area is " + getConvexPolygonArea(points)); } // Area of a Convex Polygon public static double getConvexPolygonArea(ArrayList points) { // points must be counter clockwise double sum1 = 0; double sum2 = 0; for (int i = 0; i out.println("P1 index = " + i); System.out.println("P2 index =" + limitIndex); sum1 += (p1.x * p2.y); sum2 += (p1.y * p2.x); } double area = 0.5 * (sum1 - sum2); return (area > 0) ? area : -area; } } 

(The Course class) Rewrite the Course class in Listing 10.6. Use an Array List to replace an array to store students. Draw the new UML diagram for tde class. You should not change the original contract of the Course class (ie, the definition of the constructors and methods should not be changed, but the private members may be changed .)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!