Horseracing Assignment
36 Marks
This assignment requires you to develop a horseracing program. The program will allow the user to bet D’OC dollars on the horse of their choice and win a bunch of cold hard D’OC cash if their horse comes in first. This program will allow four rabid race fans to bet on one of six well-trained and extremely fast horses each. The program will look something like:
Before the races starts you must ask each user how much DO”C cash they have to start.
For each race:
get the bet from each user.
display the bets, and current balance of each user.
set-up arrays for the race
run the actual race. (this is very similar to the dice example but on it’s side)
pay whoever bet on the winning horse (if each horse has an equal chance of winning then you pay them 6 times their bet)
After the race, the user with the most D’OC dollars is the winner
Evaluation
/4 Setup Arrays /4 Looks /5 Advance Horses
/5 Style /4 Make Bets /4 Pay Winner
/10 Extras (odds, multiple races, intro, betting on place and show…)