Skip to content

Instantly share code, notes, and snippets.

@adamsjr8576
Created July 10, 2019 02:27
Show Gist options
  • Save adamsjr8576/46e271d18943139665fb166f3d484fae to your computer and use it in GitHub Desktop.
Save adamsjr8576/46e271d18943139665fb166f3d484fae to your computer and use it in GitHub Desktop.
Object example for Vehicle Class
object: Red Ford Mustang
attributes:
color: "red"
model: "Mustang"
frontSeatCapacity: 1
totalPassengerCapacity: 5
fuelTankCapacity: 12.4
currentFuelTankcapacity: 6
Methods:
foldDownSeat: 5 - 1 = 4
paintCar: color = "blue"
fuelNeeded: 12.4 - 6 = 6.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment