Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pl.patrykk;
- public class Kon {
- //cechy ATRYBUTY
- String imie;
- String kolor;
- int waga;
- //konstruktor
- public Kon(String imie, String kolor, int waga) {
- this.imie = imie;
- this.kolor = kolor;
- this.waga = waga;
- }
- Kon () {
- imie = "";
- kolor = "";
- waga = 0;
- }
- //metody
- void dajGlos(){
- System.out.println("Ihahahah powiedział " + imie);
- }
- int jedz(int karma) {
- waga = waga + karma;
- return waga;
- }
- //gettery settery
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement