Advertisement
nRikee

Emborracharse

Feb 26th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. Class Emborracharse{
  2.     /**
  3.      * Mètode 'main' que t'emborracha.
  4.      */
  5.     public static void main(String args){
  6.         Botella ron = new Botella("ron");
  7.         Botella cocacola = new Botella("Cocacola");
  8.         Cubata[] cubaterio = new Cubata[];
  9.         boolean borracho = false;
  10.         int numeroDeCubates = 0;
  11.         while(!borracho){
  12.             cubaterio[numeroDeCubates] = plenarCubata(ron, cocacola);
  13.             numeroDeCubates++;
  14.         }
  15.     } // de main
  16.  
  17.     /**
  18.      * Plena un cubata amb els ingredients i afegix dos cubitos.
  19.      */
  20.     public Cubata plenarCubata(Botella ingred1, Botella ingred2){
  21.         Cubata cub = new Cubata(ingred1,ingred2);
  22.         cub.afegirGel();
  23.         cub.afegirGel();
  24.         return cub;
  25.     } // de plenarCubata
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement