public class State_Controller
extends java.lang.Object
Constructor and Description |
---|
State_Controller(int maxSize)
Creates a new State_Controller object by setting the size of the array
that will be used to store State objects.
|
Modifier and Type | Method and Description |
---|---|
void |
display()
Displays the array of State objects.
|
void |
getData()
Uses a FileInterface object to open and parse data from an input file,
creates a new State object, and adds the new State object to the array.
|
int |
getSize()
Gets the number of elements in the array
|
java.lang.String |
getState(int i)
Gets the name of the State object at the specified index of the array.
|
public State_Controller(int maxSize)
maxSize
- the size of the arraypublic void getData() throws java.io.IOException
java.io.IOException
- for invalid I/Opublic java.lang.String getState(int i)
i
- the array indexpublic int getSize()
public void display()