/** * @author yanababs * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class Main { public static void main(String[] args) { ProxySoldat soldat = new ProxySoldat("Fantassin"); soldat.attaquer(); soldat.décore("SoldatDécoréAvecEpée"); soldat.attaquer(); soldat.décore("SoldatDécoréAvecBouclier"); try { soldat.défendre(100); } catch (DeadWarriorException e) { System.out.println(e); } // Soldat soldat = new Fantassin(); // soldat.attaquer(); // soldat = new SoldatDécoréAvecEpée(soldat); // soldat.attaquer(); // soldat = new SoldatDécoréAvecBouclier(soldat); // soldat.attaquer(); // soldat.défendre(50); } }