-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathPhoenix.java
More file actions
61 lines (49 loc) · 1.17 KB
/
Phoenix.java
File metadata and controls
61 lines (49 loc) · 1.17 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
/**
* @author Adell - amrogers5
* CIS175 - Spring 2023
* Jan 16, 2023
*/
package model;
public class Phoenix {
//Three properties
private String name;
private int numIncarnations;
private boolean isMythical;
//Constructors
public Phoenix() {
super();
}
public Phoenix(String name, int numIncarnations, boolean isMythical) {
super();
this.name = name;
this.numIncarnations = numIncarnations;
this.isMythical = isMythical;
}
//Getters and Setters
public String getName() {
return name;
}
public int getNumIncarnations() {
return numIncarnations;
}
public boolean getIsMythical() {
return isMythical;
}
public void setName(String name) {
this.name = name;
}
public void setNumIncarnations(int numIncarnations) {
this.numIncarnations = numIncarnations;
}
public void setIsMythical(boolean isMythical) {
this.isMythical = isMythical;
}
//Methods
@Override
public String toString() {
return "Phoenix [name=" + name + ", Incarnations=" + numIncarnations + "lives, Is Mythical=" + isMythical + "]";
}
public String makeNoise() {
return "Objection!"; //Sorry, I couldn't resist an Ace Attorney: Phoenix Wright reference!
}
}