Class Choice

java.lang.Object
  extended by Choice

public class Choice
extends java.lang.Object

This simple class represents one option from a game book. Each Choice has a description and the number of the Page the user must go to if that choice is selected. It has two simple accessor methods and no mutator methods.

Author:
Tim

Constructor Summary
Choice(int pageNumuber, java.lang.String description)
          This constructor takes the page number followed by the description
 
Method Summary
 java.lang.String getDescription()
          Get the description of this choice
 int getDestinationNumber()
          Get the page number of the Page the user must turn to
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Choice

public Choice(int pageNumuber,
              java.lang.String description)
This constructor takes the page number followed by the description

Parameters:
pageNumuber - The number of the Page the user must go to
description - The text the user will see that desribes this Choice
Method Detail

getDescription

public java.lang.String getDescription()
Get the description of this choice

Returns:
The text the user will see that desribes this Choice

getDestinationNumber

public int getDestinationNumber()
Get the page number of the Page the user must turn to

Returns:
the page number that this Choice leads to