01: package animals;
02:
03: public class Wolf {
04:
05: public int color;
06:
07: public String name;
08:
09: public Wolf() {
10: }
11:
12: public Wolf(String _name, int _color) {
13: name = _name;
14: color = _color;
15: System.out.println("Creation of the " + getClass().getName()
16: + " " + name);
17: }
18:
19: protected void eat(String catName) {
20: System.out.println("The wolf " + name + " eats the cat "
21: + catName);
22: }
23:
24: }
|