Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task for this assignment is to create a single - page PDF file that has class UML diagrams in it based on the Java

Your task for this assignment is to create a single-page PDF file that has class UML diagrams in it based on the Java code linked to later on this page.
Your submission will include:
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
ASIDE: While not in this assignment, UML diagrams sometimes omit specifying the type when such is not relevant. When this is done, there is no colon (since there is no type). The type always appears as a suffix, i.e., at the "end", after a colon.
GenericPoint2D.java
interface GenericPoint2D
{
public E getX();
public E getY();
}
class 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

=+1. How can the process of movie utilization be described?

Answered: 1 week ago