Category Archives: Plans and Diagrams

Reptile Behaviours plan

This is a plan for the reptile behaviours:

ReptileBehavioursPlan


Tasks to complete in order to get demo working for 20/03/2012

  • Make plants die from old age.
  • Make animal class.
  • Make animals move (read up on vectors).
  • Make animals able to eat plants.
  • Make plants at different heights.
  • Make animals have variations in their heights so different animals can eat different foods.

New gant chart and project plan.

A new gant chart and project plan have been written which go from the 6th of March till the end if the project.

Gant Chart: gant chart2V1

Project Plan: Project Plan2V1


Draft Description

Controller Class

There will be a controller class this will be used to initialise objects and call their needed functions. So there will be a function called makePlant which initialises a plant and calls all it’s needed functions, a function called make animal which initialises an animal and calls all i’s needed functions and a function called setUpEnvironment which initialises the environment object and calls all it’s needed functions.

Environment

The environment class will control the conditions of the virtual environment. The changeSun function will change a value used to control the light in the environment which will simulated night and day. The rain function will top up the ground water variable simulating rain falls. There will also be accessors for co2, water and sunlight.

Plant

This will be the class for the plants in the environment. They will reproduce which will mean calling the makePlant function from the controller class. The plants will inherit from the gene class which will hold information about how they are built, how they feed an how they move. The plants will also be able to feed. If a plants health reaches zero it will die.

Animal

This will be the class for the animals in the environment. They will reproduce which will mean calling the makeAnimal function from the controller class. The animals will inherit from the gene class which will hold information about how they are built, how they feed an how they move. The animals will eat the plants in the environment which will give them energy. If a animals health reaches zero it will die.

Gene

This class will contain information for how the animals and plants are built, move and feed. This will be an inheritable class passed on by reproduction.

User Interaction

The user will be able to set up the environmental conditions at the beginning of the simulation or choose presets, they will also have access to these variables during the simulation

 


Draft UML Diagrams

Here are some hand drawn draft UML diagrams:

This is the first drafts of the use case diagram and the class diagram (not very complete). The use case diagram shows how the user interacts with the program and the class diagram shows the classes, all their methods and variables, and  how they interact with each other.

More detailed and complete draft use case diagram:

More detailed and complete draft class diagram try 1:

More detailed and complete draft class diagram try 2: