assignmentS1

This commit is contained in:
2025-02-19 00:21:28 +03:00
parent 1702b10d27
commit 2c4a3a53b9
4 changed files with 141 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package assignments.AssigmentS1;
class Dachshund extends Dog {
int length = 1000;
Dachshund() {
name = "German Sausage";
color = "Sausage Red";
breed = "Sausage Dog";
hungry = 0; // If 1 then hungry
}
public String SausageLength() {
return length + " cm";
}
void setLength(int length) {
this.length = length;
}
public String wag_tail() {
return "No wag, doing plank!!!";
}
}