58 lines
1.0 KiB
Java
58 lines
1.0 KiB
Java
public class Breeder {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
//static int count;
|
|
//So kann man privat umgehen
|
|
Dog samy = new Dog(2, 4, "Samy", "Mischling");
|
|
Dog anouk = new Dog(3, 2, "Anouk", "Mischling");
|
|
Dog floki = new Dog(2, 7, "Floki", "Weißer Schäferhund");
|
|
|
|
Dog copy = new Dog(floki);
|
|
|
|
|
|
|
|
Shoebill joe = new Shoebill("Joe", 4, 100, 2);
|
|
|
|
System.out.println(joe.getName());
|
|
joe.setName("Jonathan");
|
|
System.out.println(joe.getName());
|
|
|
|
System.out.println("Anzahl der Hunde: " + Dog.count);
|
|
|
|
System.out.println(Dog.getCount());
|
|
|
|
|
|
|
|
/*
|
|
samy.size = 4;
|
|
samy.name = "Samy";
|
|
samy.breed = "Mischling";
|
|
|
|
anouk.size = 3;
|
|
anouk.name = "Anouk";
|
|
anouk.breed = "Bitch";
|
|
|
|
floki.size = 7;
|
|
floki.name = "Floki";
|
|
floki.breed = "Weißer Schäferhund";
|
|
*/
|
|
|
|
System.out.println(samy.printInfo());
|
|
samy.bark(2);
|
|
|
|
System.out.println(anouk.printInfo());
|
|
anouk.bark(3);
|
|
|
|
System.out.println(floki.printInfo());
|
|
floki.bark(4);
|
|
System.out.println(floki.wagingTail());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
} |