November 29th, 2003, 09:24 PM
Join Date: Nov 2003
Time spent in forums: < 1 sec
Reputation Power: 0
Java extending existing Traffic class. $ for help
I"m a student at Georgia Tech and I'm looking for help with a project we've been working on. I'm not a technical guru like many of you so i'm not sure how to get the existing files to recognize each other. here's what we have to do:
You must extend at least one of the existing components of the traffic model, Traffic.java. The following are the minimum standards by which your effort will be judged:
1. You must extend one of the existing classes: Street, Intersection or Vehicle.
2. Your extension must contain at least one useful state variable not in the parent class (i.e. it causes something different to be observed).
3. Your extension must have a unique, visible difference from the parent class; this means, its own draw method adding some graphic feature not on the original class. [You may use super.draw() to draw the parts that don't change before or after you draw your unique addition]
4. Your extension must have a unique behavior different from the parent class; this means its own update method [you may call super.update(Ö) for the parent's update].
5. If you build a new Street class, you will need to change initStreets() in Map.java to include instances of your derived classes.
6. If you build a new Intersection class, you will need to change initIntersections() in Map.java to include instances of your derived classes.
7. If you built a new Vehicle class, the randomVehicle() method in Vehicle.java must be altered to include instances of your new class.
8. You must clearly document all changes you had to make to the existing classes to complete your testing.
so any help regarding this (even helpful hints) would be greatly appreciated. just name your price $$$.