Skip to content

Instantly share code, notes, and snippets.

@nherbaut
Created September 5, 2023 23:24
Show Gist options
  • Select an option

  • Save nherbaut/aa7048bd92225ead21c2d258a7eecb22 to your computer and use it in GitHub Desktop.

Select an option

Save nherbaut/aa7048bd92225ead21c2d258a7eecb22 to your computer and use it in GitHub Desktop.
L3.3.1 Les Méthodes
public class Voiture {}

Ajouter les méthodes suivantes:

  • une méthode pause retourne le type void et qui ne prend pas d'argument
  • une méthode accelerer qui retourne une variable de type int et qui prend un argument delta vitess
  • une méthode showPlate qui retourne une variable de type String et qui ne prend pas d'argument
  • une méthode startWipers qui retourne une variable de type bool et qui prend 2 arguments:
    • une variable de type bool apellée withSoap
    • une variable de type int apellée speed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment