-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPet.java
54 lines (48 loc) · 954 Bytes
/
Pet.java
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
Solution in Java
*/
package petStore;
public class Pet {
private String animalName;
private int age;
private String color;
private String gender;
public Pet()
{
animalName = "Null";
age = 0;
color = "Blank";
gender = "Null";
}
public Pet(String newName, int newAge, String newColor, String newGender)
{
this.animalName = newName;
this.age = newAge;
this.color = newColor;
this.gender = newGender;
}
public String getAnimalName() {
return animalName;
}
public void setAnimalName(String animalName) {
this.animalName = animalName;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
}