-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathGrizzlyBear.java
More file actions
85 lines (65 loc) · 1.16 KB
/
GrizzlyBear.java
File metadata and controls
85 lines (65 loc) · 1.16 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package model;
/**
* @author Andrew May - agmay
* CIS175 - Fall 2023
* Aug 29, 2023
*/
public class GrizzlyBear {
private String sex;
private int weight; // in kilograms
private String diet;
public GrizzlyBear() {
super();
// TODO Auto-generated constructor stub
}
public GrizzlyBear(String sex, int weight, String diet) {
super();
this.sex = sex;
this.weight = weight;
this.diet = diet;
}
/**
* @return the sex
*/
public String getSex() {
return sex;
}
/**
* @param sex the sex to set
*/
public void setSex(String sex) {
this.sex = sex;
}
/**
* @return the weight
*/
public int getWeight() {
return weight;
}
/**
* @param weight the weight to set
*/
public void setWeight(int weight) {
this.weight = weight;
}
/**
* @return the diet
*/
public String getDiet() {
return diet;
}
/**
* @param diet the diet to set
*/
public void setDiet(String diet) {
this.diet = diet;
}
@Override
public String toString() {
// TODO Auto-generated method stub
return "GrizzlyBear [sex=" + sex + ", weight=" + weight + " kg, diet=" + diet + "]";
}
public String makeNoise() {
return "RRROOAARR!";
}
}