assignmentS1
This commit is contained in:
27
assignments/AssigmentS1/Kangal.java
Normal file
27
assignments/AssigmentS1/Kangal.java
Normal file
@ -0,0 +1,27 @@
|
||||
package assignments.AssigmentS1;
|
||||
|
||||
class Kangal extends Dog {
|
||||
String Protects;
|
||||
|
||||
Kangal() {
|
||||
name = "Aslan Korur";
|
||||
color = "Yellow";
|
||||
breed = "Protect Dog";
|
||||
hungry = 0; // If 1 then hungry
|
||||
Protects = "Sheep";
|
||||
}
|
||||
|
||||
|
||||
public String guard() {
|
||||
return "ON DUTY! and Protects: " + Protects;
|
||||
}
|
||||
|
||||
public String wag_tail() {
|
||||
return "No wag!";
|
||||
}
|
||||
|
||||
void protectedAnimal(String Protects) {
|
||||
this.Protects = Protects;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user