OO Programming in Java
Class 3 Homework Assignment
The view should look approximately as shown below. It doesn't have to look like this exactly, this is just a suggestion.
|The name of the Zoo should be placed on the top line (Fred's Zoo is the name of the Zoo).
The current population of the Zoo should be displayed.
When the ComputeFootCount button is pressed the total number of feet in the Zoo should be computed.
The names of all the Animals in the Zoo should be displayed in the listbox. When a name in the listbox is
selected the name should be updated on the right and its footcount should also be displayed.
The Zoo occasionally receives new Animals delivered by a freight company. As new animals are received the GUI should reflect the increased population of the Zoo (and their foot counts).
To achive this functionality add a thread to the Zoo class (simply have the Zoo class implement Runnable and supply a run() method.
The run method should call a method in the Zoo called checkFreight() which returns an initialized Animal object (complete with name and foot count), add the new Animal to the Zoo, then sleep for several seconds before calling checkFreight() again.