INT21OOP Object Oriented Programs
Assignment 1 Semester 1 2006

Value: 20% of Subject Assessment
Due: Fri 28 Apr 06 (week 8)

"Creatures"
Taking an object-oriented approach, design classes for a "Creatures" simulation and then code the simulation in Java providing a simple Graphical User Interface (GUI).

Use a subclass of JFrame as a frame for your GUI panels. Make sure that its title contains your name and student number.

The main focus of this assignment is the design and implementation of interacting problem domain classes. Details of required documentation and submission are given after the description of the simulation.

Description of simulation
A block of land is divided into 15 plots. Every day there is a chance that it may rain on a number of plots. When it rains on a plot there is a chance that food will grow. Creatures occupy plots until they die. Every day they look for food to eat.

The following rules apply.

  1. The number of creatures that occupy the land is decided at the beginning of the simulation.
  2. For each day, the weather for each plot is set at sunrise. It will either rain on a plot or be fine.
  3. If it rains on a plot then one item of food grows there.
  4. Each item of food is either NUTRITIOUS, JUNK, or POISON.
  5. Every day for dinner, if food is available on the plot it occupies, a living creature eats.
  6. Creatures are either HUNGRY, FULL, HAPPY, or DEAD.
  7. Every day at sunset, a HUNGRY creature may move.
  8. Creatures have a life span and an age (in days).
  9. A creature is affected by the food it eats.
Documentation and Submission
For your external documentation, create an html document with the following content.
  1. Your name and student number.
  2. Design diagram(s) showing the relationships between the main classes that make up your application. Use Violet to create the diagram(s) and generate the image(s).
  3. A UNIX style man entry with NAME, SYNOPSIS, DESCRIPTION, FILES, WARNINGS, LIMITATIONS, DIAGNOSTICS and BUGS sections.
  4. The Test Plan using a table format and showing for each test conducted: reason, data used, expected result, indication of actual result, and a link to actual output from tests (screen capture images from actual runs).
Hand in the following.
  1. Program source code listing (.java files).
  2. Your signed statement of authorship.
Email me the following.
  1. Your jar file executable (I will run the program to assess it).
  2. The address (URL) of your html file (or attach the html file to the email).

Consult the following for further information about Unix man page entries and internal program documentation (comments).
Documenting Guidelines     External Documentation Example

Marking Scheme mark
Design Diagram(s) : correctness and quality of OO design 3
Class implementation : OO approach expected, assessed from source listing 3
Program Performance : requirements met, assessed via program run 3
Test Plan : thoroughness and quality 3
Basic GUI interface : assessed via program run and test output 2
UNIX style man entry 2
Implementation and Style : excellence of application
performance, code, comments, interesting GUI
GUI mark available only to those who have met expected requirements
4
Total 20

Penalties
Assignments not accompanied by a signed statement of authorship (available from the office) will not be accepted.
Penalties as specified in the Unit Outline Semester 1 2006 apply.

Fran Soddell     last updated 15 Mar 06 F.Soddell@latrobe.edu.au