Skip to content

Instantly share code, notes, and snippets.

@Ellpeck

Ellpeck/Hints.md Secret

Created October 14, 2019 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ellpeck/462022597659f554fdd75663359480d3 to your computer and use it in GitHub Desktop.
Save Ellpeck/462022597659f554fdd75663359480d3 to your computer and use it in GitHub Desktop.

Let's imagine you're managing a small car dealership. You want to have a way of managing all of the cars you have in stock. This includes keeping track of their brand names, their horsepower, their license plate texts and their mileage. Currently, you have four different cars in stock, and you want your program to print out all of the information about all of the cars.

  • The cars are represented by a Car class
  • The Car class contains several fields for the different types of information
  • The information can be printed out using a method in the Car class, similarly to how we did it for the tables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment