Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. abstract class Vehicule {
  2.    
  3.     private String Marque ;
  4.     private String Modele ;
  5.     private String Immatriculation ;
  6.    
  7.     public Vehicule(String Marque, String Modele, String Immatriculation) {
  8.        
  9.         this.Marque = Marque ;
  10.         this.Modele = Modele ;
  11.         this.Immatriculation = Immatriculation ;
  12.     }
  13.    
  14.     public String getMarque() {
  15.         return this.Marque ;
  16.     }
  17.    
  18.     public String getModele() {
  19.         return this.Modele ;
  20.     }
  21.    
  22.     public String getImmatriculation() {
  23.         return this.Immatriculation ;
  24.     }
  25.    
  26.     public String toString() {
  27.         return Marque+"-"+Modele+" : "+Immatriculation ;
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement