Advertisement
Pinkel

Biletomat main

Apr 23rd, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. package biletomat;
  2.  
  3.  
  4. public class Main {
  5.  
  6. public static void main(String[] args) {
  7. // TODO Auto-generated method stub
  8. String rodzaje[] ={"20minutowy","40miutowy","1przejazdowy"};
  9. double ceny[] = {1.20, 2.40, 1.0};
  10.  
  11. Biletomat MPK = new Biletomat( rodzaje, ceny,"Kraków", 10);
  12. MPK.wyswietlBilety();
  13. MPK.sprzedajBilet("20minutowy", 5, new Banknot(10));
  14. MPK.sprzedajBilet("40miutowy", 4, new Moneta(20));
  15. MPK.sprzedajBilet("1przejazdowy", 2, new Moneta(5));
  16. MPK.sprzedajBilet("20minutowy", 4, new Banknot(10));
  17. System.out.println(MPK);
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement