Skip to content
/ Car Public

A car that can be driven around the screen. View also includes a speedometer, direction and engine status. Made with JavaFX.

Notifications You must be signed in to change notification settings

SusannaV/Car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Car Program

This project was given as a preliminary task for a coding bootcamp. The program creates a car and let's you drive around the screen with it, logging it's speed and direction and following basic logical limitations. Flowchart of the design can be found in the folder (Design flowchart.pdf).

How does it work?

  • Upon opening the program shows you a car, speedometer, direction, engine status and two buttons for starting and shutting off the engine.
  • The only input the program now accepts is powering on the engine. After engine is on, it is now possible to accelerate the car by pressing the up arrow on your keyboad.
  • The car is by default going straight up, to direction 0 degrees. Velocity and direction update immediately.
  • The car will use engine braking to gradually slow down, if you don't accelerate.
  • While the car is in motion, you can now steer the car by pressing left or right arrows or slow the car down by pressing down arrow on your keyboard.
  • The car has a maximum speed limit and is not able to reverse.
  • In case the engine is turned of while the car is still in motion, engine keeps slowly braking and you are able to steer and brake yourself. Acceleration is not allowed when the engine is turned off.

About

A car that can be driven around the screen. View also includes a speedometer, direction and engine status. Made with JavaFX.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages