Class Component
Class Component
java.lang.Object
|
+----Component
-
class
Component
-
extends Object
Class for components of the nuclear power plant
-
Version:
-
1.0
-
Author:
-
Henrik Eriksson
-
label
-
Component label (if any)
-
plant
-
Backpointer to the plant
-
x
-
Component location
-
y
-
Component location
-
Component()
-
-
getImage(String, Image)
-
Returns an image given its name
-
rand(int, int)
-
Random number generator (pseudo)
plant
protected static NuclearPlant plant
-
Backpointer to the plant
x
protected int x
-
Component location
y
protected int y
-
Component location
label
protected String label
-
Component label (if any)
Component
public Component()
getImage
protected Image getImage(String name,
Image cache)
-
Returns an image given its name
-
Parameters:
-
name
-
The image name
-
cache
-
A cached image
-
Returns:
-
The image
rand
protected int rand(int min,
int max)
-
Random number generator (pseudo)
-
Parameters:
-
min
-
The lower bound
-
max
-
The upper bound
-
Returns:
-
A random number (between min and max)