-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonkey.java
More file actions
67 lines (53 loc) · 1.75 KB
/
Copy pathmonkey.java
File metadata and controls
67 lines (53 loc) · 1.75 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
// Aeriel Denmark
// Foundation in Application Development
// The following is a program written for an app development course taken towards Computer Science, B.S. degree
// This file is one of several files that links to one another
public class Monkey extends RescueAnimal {
// Instance variable
private String species, tail length, height, body length;
// Constructor
public Monkey(String name, String species, String tail length, String height,
String body length, String gender, String age, String weight,
String acquisitionDate, String acquisitionCountry, String trainingStatus,
boolean reserved, String inServiceCountry) {
setName(name);
setSpecies(species);
setTailLength(tailLength);
setHeight(height);
setBodyLength(bodyLength);
setGender(gender);
setAge(age);
setWeight(weight);
setAcquisitionDate(acquisitionDate);
setAcquisitionLocation(acquisitionCountry);
setTrainingStatus(trainingStatus);
setReserved(reserved);
setInServiceCountry(inServiceCountry);
}
// Accessor Method
public String getSpecies() {
return species;
}
public String getTailLength() {
return tailLength;
}
public String getHeight() {
return height;
}
public String getBodyLength() {
return bodyLength;
}
// Mutator Method
public void setSpecies(String monkeySpecies) {
species = monkeySpecies;
}
public void setTailLength(String monkeyTailLength) {
tailLength = monkeyTailLength;
}
public void setHeight(String monkeyHeight) {
height = monkeyHeight;
}
public void setBodyLength(String monkeyBodyLength) {
bodyLength = monkeyBodyLength;
}
}