Skip to content

Template code for a simple, command-line based game where two cars can race against each other.

License

Notifications You must be signed in to change notification settings

Pitt-0401/CarRace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[CMPINF 0401 - In-class Exercise]

CarRace

Goal: Implement a simple command-line-based car race game where two drivers compete

  • A driver can sign up for a car race
  • signUp() means drivers register their cars
  • A driver has one car
  • A car has at least one instance variable (a model) Optional: A car also has a speed, that should increase when it drives and when the car accelerates. To add some fun, acceleration is determined by a random number, while a maximum speed is maintained.

Learning Goals

  • Work with multiple classes & objects
  • Construct objects that contain references to other objects
  • Understand null checks

Tasks

  • Take a look at the diagram from L10
  • Adapt the template to fit the new requirements (map the model to code)

Your task is to complete the code.

About

Template code for a simple, command-line based game where two cars can race against each other.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages