Starting with this assignment we are adding a new requirement for reporting on the work you do on each assignment. In the workplace the programmers often need to report on time sheets the time they spent on various projects, so that the customer can be billed and the project leader can monitor how the budget for the project is being used up. So, we want you to report the time you spend working on the problems not just at the completion, but as you work on the problems.
You are already keeping logs of your meetings with the partners and what happened at each meeting (Are you not? ... you are supposed to do so.). All you need to do is to keep this log as a simple formatted text file, add to it the report on each meeting, and check it in every time you check in your work into the repository.
We will check the logs, can use them to see if both partners are active on the projects, get some feedback on the difficulty of the different problems, and hope this will help you in maintaining good working partnerships. While the log reports on both partners, if your partner does not show up for a scheduled meeting, or you are having difficulty reaching your partner, you can check in a report that indicates this. Your partner can contest this, but it will be retained in the repository.
Use the SampleLog.rtf as a guide for the format and the type of information you may include in the log. Adopt it so it works for you.
We will deduct points from your homework if the log is not checked in. We reserve the right to decide how severe the penalty will be.
Work out as the following exercises from the textbook. Do not add them to your assignment submission, though you should keep them in your electronic portfolio in your own svn repository.
Problem 1
Add to the TickyTack example from Lab 5 a new class that represents a person. The person has a pinhole (the center of its image), the width and height, and a color.
In this class design the method personImage that produces a WorldImage of this person. It could be just a stick figure, or you can be more fancy.
In the class House add a field that represents a person (standing in the door), and modify the constructor, so that it constructs a new Person that has the width and height of the door to this house, is standing in the middle of the door, and has any color you choose. Then modify the method houseImage so that it draws the image of the person for this house.
Problem 2
Finish designing the ocean world game you have been working on in Lab 5.
These problems should be checked into your pair's SVN repository by the due date.
Project naming requirements
The names of the projects and some of the project files must be exactly the same as specified in the assignment. Failure to do so makes it impossible for the graders to run your submission and results in immediate loss of at least 50% of the homework credit.
Every file you submit must have a header that identifies you and the problem it solves. So, for the first problem the header should look like this:
// Assignment 5 Problem 1 // Partner Name1 // partner1username // Partner Name2 // partner2username // 14 February 2012
Create a project with the name HW05Problem1. Your java file must be named Game.java and the Examples class inside this file must be named ExamplesGame.
You are ready (and eager) to design yet another interactive graphics based game. This is your chance.
Use the funworld library to design an interactive game.
The game should have at least two different kinds of objects. At least one of these objects should appear on the game multiple times (apples falling from the tree, shots fired from an UFO, cars that the chicken crossing the road has to avoid).
The game should involve at least two different kinds ways that the game changes - on tick, in response to a key event, or in response to the mouse click.
There should be at least one way that the game ends. The example code for the TickyTack world illustrates the two ways the game can end - either checked after each tick, or signalled by a key event or a mouse event.
Include at the beginning of your code a brief description of the game, the rules for the game. Also, draw the class diagram that shows the code organization for the game. It could be in any format and can be a separate file named ClassDiagram.
Advice: Start with a simple game and build it up if you have the time and energy. We care about good design more than flashy tricks.
If you cannot think of a game, here are some suggestions:
A chicken, controlled by the arrow keys, is trying to cross the street, avoiding the cars. You may give the player ten attempts and show the score at the end.
Apples are falling from a tree, and the player moves the basket left and right, trying to catch the falling apples, avoiding bad apples (as a bad apple spoils the bushel and the game ends.
The pong game --- with paddle on the bottom, trying to hit the ball, so it bounces back. The game stops after the player missed ten shots.
Monsters jump up at random on the screen, we need to click the mouse to kill them. They win if we miss ten times.