Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.42 KB | None | 0 0
  1. public class Brigand extends Humain
  2. {
  3.     protected String look;
  4.     protected int nbDame, recompense;
  5.     protected boolean prison;
  6.  
  7.     public Brigand()
  8.     {
  9.         this.boisson = "Tord-Boyaux";
  10.         this.look = "méchant";
  11.         this.recompense = 100;
  12.         this.prison = false;
  13.     }
  14.  
  15.     public Brigand(String nom)
  16.     {
  17.         this.nom = nom;
  18.         this.boisson = "Tord-Boyaux";
  19.         this.look = "méchant";
  20.         this.recompense = 100;
  21.         this.prison = false;
  22.     }
  23.  
  24.     public Brigand(String nom, String look, String boisson)
  25.     {
  26.         this.nom = nom;
  27.         this.boisson = boisson;
  28.         this.look = look;
  29.         this.recompense = 100;
  30.         this.prison = false;
  31.     }
  32.  
  33.     public void kidnappe(Dame dame)
  34.     {
  35.         System.out.println(this.nom + " - Ha ha ! " + dame.nom + ", tu es mienne désormais !");
  36.         this.nbDame ++;
  37.     }
  38.  
  39.     public void nom()
  40.     {
  41.         System.out.println("Le " + this.look + " " + this.nom + ".");
  42.     }
  43.  
  44.     public void presentation()
  45.     {
  46.         System.out.println(this.nom + " - Bonjour ! Je suis " + this.nom + " le " + this.look +
  47.                 " et j'aime le " + this.boisson + ".");
  48.         System.out.println(this.nom + " - J'ai l'air " + this.look + " et j'ai déjà kidnappé " + this.nbDame + " dames !");
  49.         System.out.println(this.nom + " - Ma tête est mise à prix " + this.recompense + "$.");
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement