Overview Schedule Announcements Resources Assignments Home

CSC 121: Computer Science I, Spring 2005

Project 1

A Graphics Satellite Rescue Simulation
Deadline: 5:00pm, Monday, March 7

Alert: Someone from your team of ten people has reported to us that your prototype is ready for delivery to NASA. We have reviewed it and found that several things are missing, some things have been implemented incorrectly, and we have some specification changes requested by NASA. Since the above deadline is rapidly approaching, it is your responsibility as the two lead programmers to make all of these changes on behalf of your whole team.

Please review the original specification below and then make the following changes (Note: You should not modify any of the base classes - Canvas, Circle, Triangle, or Diamond. You will need to modify each of the other classes to some degree.):


The Original Specification

Overview:

NASA has a tentative contract with your software company, National Enterprise for Rescue Deployment Simulation (NERDS) to create a space station refueling simulation that will be used by NASA personnel as a training tool. Your company has promised to deliver a prototype of the simulation by Friday, February 25. If the prototype is successful, your company will receive the full contract worth 2.5 million dollars.

The simulation will have a space shuttle launch a fuel cell, which will dock with an orbiting space station. Because of a low fuel supply, the space station has entered a state of unplanned orbital descent and will eventually crash into the earth if it does not receive a new supply of fuel soon.

Prototype specification:

Choosing level of difficulty: The simulation will provide an option for selecting a level of difficulty, beginner (B), intermediate (I), or advanced (A). The level determines the speed at which the space station is orbiting.

The Space Station: The space station is a Diamond object. It has a fueling port, namely the lowest vertex of the diamond. Space station movement begins at a random horizontal location and a vertical location of 0. To simulate orbiting, the space station will move left to right on a downward sloping line across the window disappearing on the right and reappearing on the left. Each new orbit will begin at a slightly lower level that the previous orbit. The color of the space station changes from green to yellow after one orbit, indicating a low fuel supply.

The Space Shuttle: The space shuttle will be a Triangle located in the middle of the left side of the window with its base always on the left window boundary and its nose pointing to the right. The position of the shuttle can be adjusted slightly up or down according to whether the 'J' or the 'K' key on the keyboard is pressed. 'J' will cause the shuttle to move down and the 'K' key will move the shuttle up. Up and down distance shifts will be the same for each key. Pressing the space bar will launch a fuel cell, a blue ball, from the space shuttle. The fuel cell will appear at the nose of the shuttle and travel at a reasonable rate of speed from the shuttle to the right side of the window on the horizontal line passing through the shuttle's nose. If refueling is not successful after three tries or if the space station reaches the bottom of the window without refueling the space station crashes, indicated by its color turning to red and no screen activity for three seconds, after which the space station will initialize a beginning orbit for another fueling attempt.

The fueling process: If the fuel cell makes contact with the fuel port of the space station, fueling will occur automatically. The color of the space station will change to green, there will be no screen activity for three seconds and then the space station will begin a new orbit for another fueling attempt. If the fuel cell misses the space station it simply disappears and becomes a new piece of space junk.

Starting and stopping the simulation: Pressing the 'S' key will start the simulation and pressing the 'X' key will stop it.

Turning in your project:
Copy your project to the appropriate folder(s) under the Project-01 folder on the I: drive. Send an email message to your instructor when you have done this, naming the programmer or pair of programmers who completed the project.
Overview Schedule Announcements Resources Assignments Home

Valid HTML 4.01!Valid CSS!DePauw University, Computer Science Department, Spring 2005
Maintained by Brian Howard (bhoward@depauw.edu). Last updated