Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class Wycieczka {
- Scanner input = new Scanner(System.in);
- public int budzet;
- int osoby;
- int pobyt;
- public int obliczModyfikatorKosztu(){
- System.out.println("Podaj liczbę osób jadących na wycieczkę: ");
- int liczbaOsob = input.nextInt();
- System.out.println("Podaj liczbę nocy: ");
- int liczbaNocy = input.nextInt();
- int modKoszt = liczbaOsob * liczbaNocy;
- return modKoszt; }
- public int podajBudzet(){
- System.out.println("Podaj ile masz pieniędzy na wycieczkę: ");
- int pieniadze = input.nextInt();
- return pieniadze;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement