Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package biletomat;
- public class Main {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- String rodzaje[] ={"20minutowy","40miutowy","1przejazdowy"};
- double ceny[] = {1.20, 2.40, 1.0};
- Biletomat MPK = new Biletomat( rodzaje, ceny,"Kraków", 10);
- MPK.wyswietlBilety();
- MPK.sprzedajBilet("20minutowy", 5, new Banknot(10));
- MPK.sprzedajBilet("40miutowy", 4, new Moneta(20));
- MPK.sprzedajBilet("1przejazdowy", 2, new Moneta(5));
- MPK.sprzedajBilet("20minutowy", 4, new Banknot(10));
- System.out.println(MPK);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement