edu.unm.cs.cs351.f10.tdrl.p2
Enum ComputerOrder

java.lang.Object
  extended by java.lang.Enum<ComputerOrder>
      extended by edu.unm.cs.cs351.f10.tdrl.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

Enum Constant Summary
BEIGE_BOX
          An ISO-9000 certified, best-practices compliant, paradigm-shifting business unit workflow enabler that will maximize profit margin leveraging potential.
GAME_ENGINE
          A machine optimized for the hard-core gamer...
NUMBER_CRUNCHER
          Make it go faster.
OLPC
          The world will be a better place with one CPU per child.
TRICKED_OUT
          Represents a computer with all the bells and whistles.
WEBMAIL_BOX
          A box whose only role in life is to run a browser and trickle mail to you batch mode.
 
Method Summary
 double getComplexity()
          Get the complexity of building a computer of this type.
 double getFixedPrice()
          Get the fixed price of this unit.
 double getSalePrice()
          Get the retail price for this unit.
static ComputerOrder valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ComputerOrder[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TRICKED_OUT

public static final ComputerOrder TRICKED_OUT
Represents a computer with all the bells and whistles. It's made of all the fastest/biggest/snazziest parts that money can buy. And the sale price reflects that.


GAME_ENGINE

public static final ComputerOrder GAME_ENGINE
A machine optimized for the hard-core gamer... On a budget. While it might not be quite as snazzy as a TRICKED_OUT box, it does have a bajillion-polygon-per-second GPU with embedded whatzitz-thingies that will make Starcruft II so kewl that it will blow your eyes out. Really. We promise.


WEBMAIL_BOX

public static final ComputerOrder WEBMAIL_BOX
A box whose only role in life is to run a browser and trickle mail to you batch mode. And it even does that slowly.


BEIGE_BOX

public static final ComputerOrder BEIGE_BOX
An ISO-9000 certified, best-practices compliant, paradigm-shifting business unit workflow enabler that will maximize profit margin leveraging potential.


NUMBER_CRUNCHER

public static final ComputerOrder NUMBER_CRUNCHER
Make it go faster.


OLPC

public static final ComputerOrder OLPC
The world will be a better place with one CPU per child. We swear...

Method Detail

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()
Get the fixed price of this unit.

Returns:
Fixed price (i.e., parts without labor) for constructing a box of this type.

getSalePrice

public double getSalePrice()
Get the retail price for this unit. This represents the gross income that the company recieves for selling a computer of this type.

Returns:
Sale price of this unit.

getComplexity

public double getComplexity()
Get the complexity of building a computer of this type. This is a scalar that gives a rough estimate of how hard it is to assemble a box of this type. Roughly, more complex units will take longer to construct.

Returns:
Complexity of this unit.