Assignment 12
Goals: Learn to work with and test void methods; generate and traverse (musical) sequences of data, practice design and testing skills, have fun.
Instructions
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.
Make sure you follow the style guidelines for code indentation.
You will submit this assignment by the deadline using the Web-CAT submission system.
With each homework you will also submit your log file named pairxxx.txt where you replace xxx with your pair number.
On top of every file you submit you will have the names of both partners, and the pair number.
The .txt file will be the log of your work on this assignment. Each log entry will have data and time, who was present (one or both of the partners) and a short comment decribing what you were working on.
Due Date - First Complete Working Version: Monday, April 15th, 11:59 am, so we can prepare for the code review on Tuesday and Wednesday.
Due Date - Final Version: After the code review, hearing comments on your program, you will then have a chance to make additional changes and corrections, with the final version due on Wednesday, April 17th, 11:59 pm.
Problem 1
Design and implement an interactive game in the style of the FROGGER game:
A frog or some other object is trying to cross several lanes of moving obstacles (e.g. cars) where each lane contains some number of obstacles, and aome lanes move left, while other lanes move right (at least one of each). After successful crossing, the player (frog) has to cross a river (or other challenging area) withe other moving objects, some of which allow the player (frog) to hop on and move with the object (a log, or a lily pad), others may spell demise. The game score counts the number of successful crossings and starts with some limited number of lives.
The game must be designed in imperative style. It should include a complete test suite.
In addition to submitting the code, you also need to provide a design document that would help a future designer to understand your game design and add new features and to modify your code. You also have to supply a user’s guide - that explains to the human player how the game is played (what are the controls, the goals, etc.)
Problem 2
Once you are done with the design and the game is working at least at a basic level, add sound effects. We want to make sure your game can be played in an identical way with and without the sound effects.
You should add sound effects to special events in the game - player moving, colliding, riding a lily pad, reaching the end, etc. You may also add a continuous loop of backgound music (e.g. like what is played during the final round of the Jeopardy game).
Submit this version separately from the original submission —
Advice
Start small - get the basic design working, then add new features.
Use ArrayLists or other Java library classes to represent collections of objects.
The web site javalib/World has tutorials on the use of the sound library and the sound worlds.
The latest code is at the github.com/TesterViera/JavaLibWorld. The sources there also illustrate the testing of the sounds and music.
Please, use the new version of the javalib-1.0.3.jar library.
Here is a link to the revised version of the TickyTackSong.java program that includes tests for tick-based music of the program. We are working on the design of the library that would allow us to test the musical behavior in response to the key events. (Note: Please, also download and include with your project the image file family.png).
An additional sample program will help you understand how to generate music and how to test that is has been generated as expected: DrawFaceSound.java
Make sure you include in your submission any images that your program uses.
During the labs on Tuesday, April 16th and the lectures on Wednesday, April 17th we will have presentations of all games, with a review of the code for the games.}