Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class Emborracharse{
- /**
- * Mètode 'main' que t'emborracha.
- */
- public static void main(String args){
- Botella ron = new Botella("ron");
- Botella cocacola = new Botella("Cocacola");
- Cubata[] cubaterio = new Cubata[];
- boolean borracho = false;
- int numeroDeCubates = 0;
- while(!borracho){
- cubaterio[numeroDeCubates] = plenarCubata(ron, cocacola);
- numeroDeCubates++;
- }
- } // de main
- /**
- * Plena un cubata amb els ingredients i afegix dos cubitos.
- */
- public Cubata plenarCubata(Botella ingred1, Botella ingred2){
- Cubata cub = new Cubata(ingred1,ingred2);
- cub.afegirGel();
- cub.afegirGel();
- return cub;
- } // de plenarCubata
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement