Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. class Main {
  2.     public static void main(String[] args) {
  3.         Scanner in = new Scanner(System.in);
  4.        
  5.         int rep = 1;
  6.        
  7.         Fachada CafeBar = new Fachada(rep);
  8.  
  9.        
  10.     }
  11.  
  12. }
  13.  
  14. class Fachada {
  15.     private NegocioX negocioX;
  16.     private NegocioY negocioY;
  17.     private NegocioZ negocioZ;
  18.    
  19.    
  20.     public Fachada(int oi) {
  21.         this.negocioX = new NegocioX(oi);
  22.         this.negocioY = new NegocioY(oi);
  23.         this.negocioZ = new NegocioZ(oi);
  24.     }
  25. }
  26.  
  27. class NegocioX {
  28.     private Respositorio repo;
  29.    
  30.     public NegocioX (int oi) {
  31.         if (oi == 0)
  32.             this.repo = new Lista();
  33.         else
  34.             this.repo = new Array();
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement