edu.unm.cs.cs351.tdrl.f06.p2
Enum ComputerOrder
java.lang.Object
java.lang.Enum<ComputerOrder>
edu.unm.cs.cs351.tdrl.f06.p2.ComputerOrder
- All Implemented Interfaces:
- Serializable, Comparable<ComputerOrder>
public enum ComputerOrder
- extends Enum<ComputerOrder>
An Enum representing the general kinds of computers that could
be ordered. This is a coarse-grained representation -- it doesn't
drill down to individual components like hard drives, video cards,
memory, etc. Instead, it just represents general classes of
machines, under the general assumption that one game machine will
be tricked out pretty much like another and so on.
- Version:
- 1.0
- Author:
- terran
TRICKED_OUT
public static final ComputerOrder TRICKED_OUT
GAME_ENGINE
public static final ComputerOrder GAME_ENGINE
WEBMAIL_BOX
public static final ComputerOrder WEBMAIL_BOX
BEIGE_BOX
public static final ComputerOrder BEIGE_BOX
NUMBER_CRUNCHER
public static final ComputerOrder NUMBER_CRUNCHER
values
public static final ComputerOrder[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(ComputerOrder c : ComputerOrder.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static ComputerOrder valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
getFixedPrice
public double getFixedPrice()
getSalePrice
public double getSalePrice()
getComplexity
public double getComplexity()