-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathRedPanda.java
More file actions
61 lines (49 loc) · 1.02 KB
/
RedPanda.java
File metadata and controls
61 lines (49 loc) · 1.02 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
package model;
/**
* Nicholas Hernandez - NHernandez6
* CIS175 - Fall 2023
* Aug 30, 2023
*/
public class RedPanda {
private String gender; //male or female
private int weight; //pounds
private int age; // years
//Default constructor
public RedPanda() {
super();
}
public RedPanda(String gender, int weight, int age) {
super();
this.gender = gender;
this.weight = weight;
this.age = age;
}
//Getters and Setters
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "RedPanda [gender=" + gender + ", weight=" + weight + ", age=" + age + "]";
}
//returns animal noise!!
public String speak() {
//pronounced very squeaky : )
return "feeeew";
}
}