Programming in Java - Coursework: Farm Simulation
Resit Coursework
1. Assessment classification
There is a detailed marking scheme for the final demonstration, and marks for correct submission of runnable code and documentation, as well as for the associated report. These reflect the general criteria as shown below.
Classification | Associated Criteria |
First Class (>= 70%) | Strong technical knowledge and skill shown through development, proving a strong grasp of object orientation and advanced programming. Report is well structured and fluently written. Design choices are validated in the report, and the work is showing some research and novelty beyond the standard material. |
Upper Second (60..70) | A solid grasp of the subject with a good selection of advanced programming methods. The report is well written and validates design choices. May show some elements of creativity and originality and makes use of existing literature to validate choices. |
Lower Second (50..60) | A reasonable range of grasp of the subject, with few technical errors and written in plain English. On topic, relevant, and relatively well organised. |
Third (40..50) | Evidence of appropriate study showing success in progress towards providing a solution with most technical content corrects. The work relies on simple examples or uses methods inconsistently. |
Pass (30..40) | Shows some evidence of study, but may be largely unfinished, flawed, or irrelevant, whilst showing some attempt to present a coherent solution. |
2. Assignment description
You are to develop a simulation of a farm that having a variety of different animals (at least three) moving round inside it and displayed this in a graphical user interface. You are free to add features to your Farm Simulation code.
2.1. Description
The work is inspired by the code written during our classes. You will need to do a proper object-oriented design with a suitable hierarchy of classes, including at least one abstract class.
You must utilise the JavaFx GUI library which you learnt about in weeks 7 and 8. The GUI should have menus, a toolbar with buttons and an information panel – as set out below.
Application Menu
The application should have a suitable menu, which allows the arena to be configured, saved and edited, that allows the simulator to run, and to provide help and instructions. You can make design choices about the menu items, as long as you describe these choices in the design section of the report.
File Handling and Configuration
The application should allow the user to save and load simulation configurations from files. A configuration is defined as the set of parameters required to set up and start a simulation. By default, the simulator should load from a user defined configuration file, but if one is not there then a default arena with at least three drones or different items should be provided.
Toolbar
Also required is a toolbar with buttons to control the simulation (e.g., start, pause, add animals, etc.). You should have one button for each animal.
Information Panel
As the simulation runs, information should be provided on the state of the farm and its contents – these could be textual descriptions, but graphs or other displays may also be appropriate.
Classes and Inheritance
The code should make use of at least one abstract class which is inherited directly or indirectly by other classes – the abstract class could be used by animals like cow, chicken and other animals in the farm. Pay special attention to your use of inheritance and use access modifiers correctly. You should also have a class for the GUI, one for a canvas and one for the farm.
Animation
You can use any method, as long as you use JavaFX, to achieve the animation. Refer to the Ball examples, Animals should be able to move freely in the farm.
Comments, documentation and version control
Your code should be professionally laid out and commented using Javadoc style comments.
Hints on Simulation
A rich simulation is expected, comprising a variety of animals with different behaviour in the farm.
Animals should turn if it cannot move in its current direction because of a wall or another animal, just like the ball example and drone simulation.
You can also include obstacles in the farm.
Refer to the solar system example, animals should be represented by their pictures.
You could have a dog which the user of the simulation controls.
Key point
You must have at least one abstract class, possibly one which defines an object in the farm which all different animals extend, or an animal abstract class which more sophisticated animal extend (as per the ball example).
It is important therefore that you do a full object-oriented design early on, before implementing the different drones. You must this submit the classes design in your report showing the hierarchy of classes you have implemented.
3. Assignment submission requirements
The following files which should be submitted to Blackboard are:
· A PDF of report
· A zip file of source code including a runnable JAR