Question: Create a UML diagram based on the Java code linked to later on this page. There are two Java interfaces. These must be abstract classes

Create a UML diagram based on the Java code linked to later on this page.
There are two Java interfaces.
These must be "abstract classes" in UML notation (e.g.,, the class names need to be italicized).
ASIDE: If italics is not available or if hand-drawn then one must used the "{abstract}" classifier which must appear below the name of the class/interface that is abstract.
One of the Java interfaces is a generic interface so such must be shown as parameterized type.
All public, protected, and private methods must be properly indicated.
There are three Java classes.
All public, protected, and private properties and methods must be properly indicated.
With all of code, involved types must be indicated.
In UML types are always the name followed by a colon followed by the type.
e.g., "alpha : int" (without the quotes) would be a variable of type int called alpha
e.g., "foo(a : int, b : float) : string" would be a function called foo having two parameters a and b where a is an int, b is a float, and the function returns a string
the Java code is below:
GenericPoint2D.java
interface GenericPoint2D
{
public E getX();
public E getY();
}
GPoint2D.java
class GPoint2D implements GenericPoint2D
{
private E x;
private E y;
public E getX(){ return x; }
public E getY(){ return y; }
protected void setXY(E x, E y)
{
x = x;
y = y;
}
}
Point2D.java
class Point2D extends Point2DBase implements Point2DInterface
{
private boolean flag;
public double getX()
{
return super.x;
}
public double getY()
{
return super.y;
}
protected void setXY(double x, double y)
{
super.x = x;
super.y = y;
}
}
Point2DBase.java
class Point2DBase
{
protected double x;
protected double y;
}
Point2DInterface.java
interface Point2DInterface
{
public double getX();
public double getY();
}

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!