i need the code with java . Define an abstract class named Entity (representation of an object in a game) that has attri
Posted: Fri May 20, 2022 10:35 am
i need the code with java
. Define an abstract class named Entity (representation of an
object in a game) that has attributes Location x (int) and Location
y(int).
.Define a class named Movable Entity(object that moves on
the screen) that has an attribute Speed (int), extends Entity and
the Comparable interface, you should compare between two movable
objects depend on location x, location y and speed.
.Define a class named Animated Entity (Animation object
that moves) that has an attribute Number of Frames per Second
(int), extends Entity, override Equals function to check if two
objects are the same, depends on Location X, Location Y and Number
of Frames Per Second
.Define Setter and getter for all of the attributes
above
. If speed is less than zero use an
IllegalArgumentException to handle it
. Define an abstract class named Entity (representation of an
object in a game) that has attributes Location x (int) and Location
y(int).
.Define a class named Movable Entity(object that moves on
the screen) that has an attribute Speed (int), extends Entity and
the Comparable interface, you should compare between two movable
objects depend on location x, location y and speed.
.Define a class named Animated Entity (Animation object
that moves) that has an attribute Number of Frames per Second
(int), extends Entity, override Equals function to check if two
objects are the same, depends on Location X, Location Y and Number
of Frames Per Second
.Define Setter and getter for all of the attributes
above
. If speed is less than zero use an
IllegalArgumentException to handle it