How would I structure this program? A bit unsure of what is being asked


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How would I structure this program? A bit unsure of what is being asked

  1. #1
    Join Date
    Dec 2008
    Posts
    4

    How would I structure this program? A bit unsure of what is being asked

    You are required to write a software application that manages an international outdoor car rally for thirty-two (32) cars. Thirty-two countries around the globe have a single representative team to this tournament. For each race, four cars compete per race. The best 16 race times goes forward to the second round, and the best 8 to the third round and the best 4 to the finals. Each country has a team of two navigators and three drivers. One driver per team can drive no more than once, that is each team must have a new driver for each round, but navigators are the one who suffer if the team times are low. A team that progresses to the final round can chose any driver. Therefore a team may use only one navigator or may use both. The rule of thumb is that if the car placing in a particular race is last, then the navigator is not given the chance to race again.
    Your solution may use the following ADTs but must show evidence of the bolded ones:
    Classes.
    Array(s).
    A sorting algorithm of your choice to output the final list of participant sorted in order of tournament placing.
    A queue or stack structure to manage the race. Hint used predefined class!
    Linked list can be used. Their use in this solution set is intuitive.
    You will need to use the Math object to generate a random number. In most races, times are lowered as you progress to the rounds. Therefore for the first race, your times may average 45-50 seconds, your second round times of 40-45 seconds, and your semifinal stage times of 39-42 second and the finals 37-40 seconds.
    For examples your race time for second car in a Round One race may be assigned as follows

    secondCar = 45 + Math.rnd() + RoundOneOffset ;

  2. #2
    Join Date
    May 2004
    Posts
    40
    I looks to me like your instructor is asking you to create a race simulator. You'd probably need (at least) classes for drivers, navigators, cars, races (maybe), etc. You're using the math package to randomly generate course completion times for each car for each race.

    Looks like you'd need to set up drivers and navigators for each car, run the race, then pick the winners for that race to go to the next round. Then repeat for each round until you get a final winner.

    My first suggestion though would be to talk to the instructor (or aides) if you don't understand the assignment. Anything you get here is just guesswork as we are not the instructor.

    Good Luck!

Similar Threads

  1. processing additional data when program is running
    By Ervin Rodriguez in forum Database
    Replies: 1
    Last Post: 05-16-2003, 09:45 AM
  2. problem in program in c++
    By mheasen in forum Architecture and Design
    Replies: 0
    Last Post: 03-20-2002, 10:24 AM
  3. Replies: 2
    Last Post: 03-07-2002, 08:49 AM
  4. C program
    By Matty in forum Open Source
    Replies: 0
    Last Post: 12-16-2001, 12:17 PM
  5. Replies: 0
    Last Post: 12-15-2000, 11:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center