-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPet.java
More file actions
69 lines (48 loc) · 970 Bytes
/
Pet.java
File metadata and controls
69 lines (48 loc) · 970 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package School;
/*
Algorithms
Joshua B Wilson
java v21
ITEC 3150
January 26 2026
this class is for storing the data from both the dog and cat classes so the main class can use it i called it Vet if thats okay
*/
public class Pet {
/*
soo cats and dogs have names
owners have names
both have ages
thye have colors
thy have a type aka dog or cat
dogs have a breed
cats have long hair or short
cats have claws or nun
*/
private String name;
private String owners;
private int age;
private String color;
private String type;
public Pet(String name, String type, int age, String owners, String color) {
this.name = name;
this.owners = owners;
this.age = age;
this.color = color;
this.type = type;
}
public String getName(){
return name;
}
public String getOwners(){
return owners;
}
public int getAge(){
return age;
}
public String getColor(){
return color;
}
public String getType(){
return type;
}
}