-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCat.java
More file actions
39 lines (30 loc) · 745 Bytes
/
Cat.java
File metadata and controls
39 lines (30 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.example.model;
public class Cat {
private String name;
private CatBehaviour behaviour;
public Cat() {
}
public Cat(String name, CatBehaviour behaviour) {
this.name = name;
this.behaviour = behaviour;
}
public void setName(String name) {
this.name = name;
}
public void setBehaviour(CatBehaviour behaviour) {
this.behaviour = behaviour;
}
public String getName() {
return name;
}
public CatBehaviour getBehaviour() {
return behaviour;
}
@Override
public String toString() {
return "Cat{" +
"name='" + name + '\'' +
", behaviour=" + behaviour +
'}';
}
}