Skip to content

tmcmh/homework_for_20120517

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

make a Car class

attributes/data:
is it moving? (readonly)
speed (readonly)
make (readonly)
year (readonly)
model (readonly)

methods/actions (public):
press the accelerator (provide speed, how long you moved at that speed)

stuff only the car can do with itself:
move(goes certain speed)

SUB-BONUS: provide odometer functionality, starting the car at a pre-set
"miles traveled" value, and starting/stopping it a few times and having the
odometer increment, naturally.

SUPER-BONUS: car is able to turn left and right by 90 degrees. it starts
at the point 0,0 on an x-y grid. I should be able to know at any given point
what direction it is pointing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages