Advertisement
Benlahbib_Abdessamad

Untitled

Feb 1st, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. public class Test {
  2.  
  3. public static void main()
  4.  
  5. {
  6.  
  7. List<Visa> listvisa=new arrayList()<Visa>;
  8.  
  9. listvisa.add(new FabriqueCredit().creeVisa());
  10. listvisa.add(new FabriqueCredit().creeVisa());
  11. listvisa.add(new FabriqueCredit().creeVisa());
  12.  
  13. for(Visa v:listvisa)
  14.     {
  15.         v.print(); 
  16.     }
  17.  
  18. List<MasterCard> listmastercard=new arrayList()<MasterCard>;
  19.  
  20. listmastercard.add(new FabriqueDebit().creeMatercard());
  21. listmastercard.add(new FabriqueDebit().creeMatercard());
  22. listmastercard.add(new FabriqueDebit().creeMatercard());
  23.  
  24. for(MasterCard m:MasterCard)
  25.     {
  26.         m.print(); 
  27.     }
  28.  
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement