Create a UML diagram with 3 sections for each class. 1 for classname. 1 for attributes. 1 for methods. Include allconstructors,methods,attributes for each class. Paramters can haveany legal identifiers. Use bi directional,uni-directionalassociation or aggregation or composition when needed forconnecting the classes.
public class Point {
public double X, Y;
public Point()
{
this(0, 0);
}
public Point(double newX, double newY)
{
X = newX;
Y = newY;
}
public static double distance(Point A, Point B) {
return Math.sqrt(Math.pow(A.X-B.X, 2) + Math.pow(A.Y-B.Y,2));
}
}
public interface Polygon {
public int getNumberOfSides();
public double getPerimeter();
public double getArea();
}
public abstract class Simple_polygon implements Polygon{
public Point vertices[];
public Simple_polygon(int n) {
if (n < 3) {
throw new IllegalArgumentException();
}
vertices = new Point[n];
}
public int getNumberOfSides() {
return vertices.length;
}
public
PayPal Gateway not configured
PayPal Gateway not configured