|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--IdentifiedWithPosition | +--Package
This class is the abstraction of a game package
Field Summary | |
private int |
w
The weight of the pack |
Fields inherited from class IdentifiedWithPosition |
id, x_pos, y_pos |
Constructor Summary | |
Package()
Default constructor |
|
Package(int id,
int weight)
makes a package with given id and weight |
|
Package(int id,
int x,
int y,
int weight)
makes a new package with the given parameters |
Method Summary | |
void |
setWeight(int weight)
sets the weight of the package |
int |
weight()
Returns the weight of the package |
Methods inherited from class IdentifiedWithPosition |
id, setId, setPos, setX, setY, x, y |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int w
Constructor Detail |
public Package(int id, int x, int y, int weight)
id
- identifier asociatedx
- x position of package's destinationy
- y position of package's destinationweight
- weight of the packagepublic Package(int id, int weight)
id
- identifierweight
- weight asociatedpublic Package()
Method Detail |
public void setWeight(int weight)
weight
- the new weightpublic int weight()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |