NEED IT TO BE DONE IN SHARP 5 DAYS - WITH UPDATES IN BETWEEN
Computer Graphics
You are to write a program in Java which depicts a 2-D animation of a racing car moving around a race track. You should provide the following controls for the car:
1. an accelerator
2. a brake
3. a steering wheel
The car should initially be stationary with its engine started; consequently, “pressing” the accelerator should cause the car to accelerate up to its maximum speed for that setting of the accelerator. Applying the brake should, of course, cause the car to decelerate. If both the accelerator and the brake are applied, what should happen is for you to determine; you might decide that the only way for the car to come to a halt is for the brakes to be applied, but not the accelerator. You might decide to use sliders for all three controls in which case you could use vertical sliders for the accelerator and the brake, but a horizontal slider for the steering wheel.
The car itself might be drawn as a simple model in plan view comprising widgets that depict 4 wheels, a body and a cockpit. The race track should be drawn as a simple circuit; there is no need to draw anything very elaborate. There should however be an area inside the track as well as an area outside the track.
Once the car is moving, your program will need to constantly refresh the drawing. At the same time, your program will need to respond to the various controls. This means that you will need to use separate threads.
Rather than try and build all the software in one go, you should consider an iterative and incremental approach to development. You may draw on sample code from Rowe or reputable websites such as [login to view URL]; you should however acknowledge any code that you “buy” rather than “build”. Every line of code should be commented, whether you wrote it or not, and every class and method should be preceded by a block comment that explains its purpose. You will be assessed by the quality of your code more than the quality of your graphics.
You should submit, at the very latest, by Friday 6th January:
1. a document, in MS Word 2003 format, containing
a. UML diagrams that illustrate the design of your application
b. “pretty printed” source code of your Java classes
c. the specification of a minimum number of test cases
d. 4 screenshots of your working application.
2. a CD/DVD/BD containing a NetBeans or Eclipse project which includes the source code as well as the Java classes.
The document should be submitted via the School Turnitin system. The disk should be handed, in person, to your lecturer before the end of the final class on 6th January; you may wish to demonstrate your working application as you do so.
Assessment criteria
(a) Apply key graphics concepts to resolve graphics related problems;
(b) Develop introductory graphics programmes using an industry standard API;
(c) Analyse the role that computer graphics has in user interface design and apply concepts and principles in this area;
(d) Implement 2D and 3D graphics programmes using appropriate algorithms.
1. A working application with a reasonable number of test cases 40%
2. The quality of the application (e.g. its usability) 20%
3. The quality of your Java code (e.g. its modularity) 20%
4. The quality of your comments (both line and block comments) 20%