Objectoriented programming HT04
OBS! The assignments should be solved by groups of 2 students. All solutions of the same group are corrected by same assistant. Please, register your group in advance that an assistant is ascribed to the group. If you have not done it yet you can notify us either by email or come to our offices.
Students who take 5 point course (code 2AD510) need to make all three assignments. Students who take 4 point course (code 2AD512) need to make only first two assignments.
Time for consultations (Office Hours etc.)
Deadline: Friday 12/11, 10:00
Assignment can be handed in through our mailboxes (on fourth floor in building one) or in person.
Source code for the assignment
The assignment consists of two parts, design and implementation. You should not begin the implementation before you have a finished (approved) design. Changes in the design most likely cause major surgery in the implementation!
This version of the specification might be a draft.. Minor details can be changed later.
This should not affect the design-part though.
Interfaces to use
It is mandatory to use these interfaces in your sollution (otherwise the GUI won't work). You are not supposed to change anything in these files.
The package name of this GUI is pasture.gui.
Unpack the jar file using: jar xvf gui.jar
You will get a directory pasture/gui containing images and class files.
- v1.2 Fixed a bug in the layout that made non-square pastures look wierd.
- v1.1 Added the feature to run a fix number of events
- v1.0 Initial release.
A tiny debug tool
Current version 0.4
This is a limited tool for debugging the simulation. This tool has no knowledge what so ever about the pasture package. Place the class-file outside the packages and create an instance of SimulationObserver in your main. Add it as an observer to your system and call the start()-method. The constructor of SimulationObserver takes one argument, the number of entries in the event-queue display.
SimulationObserver so = new SimulationObserver(10); mySim.addObserver(so); so.start();
Although this tool has not got that many features yet, it acctually found a bug in my implementation of grass tufts the first time I used it. Please feel free to send feature requests or bug reports to me (Jesper), I will try to improve it at some point.
- Design part: The design should be presented oraly during Thursday 18/11 or Friday 19/11. Book a time on the schedule of your assistant's door.
- Implementation: Friday 10/12, 10:00 if you want to get comments and a chance to finish before x-mas. Tuesday 11/1, 8:00 is the final (hard) deadline.
This assignment is only for those students who take the 5 points course.
Assignment 3 is an extention of Assignment 2. To ensure that you do not start with this assignment before your sollution of A2 is approved, we will not publish the specification of A3 here at all. You will get it from your assistant once your A2 is done.
The assignment consists of several extensions to the system, a hint might be the following interface that is required to solve one of them: ExtPastureEntityType.java
You will also need a new version of the GUI that knows about the new interface: GUI for A3
Deadline: Tuesday 11/1, 8:00