-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWilder.java
44 lines (32 loc) · 1.06 KB
/
Wilder.java
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
public class Wilder {
private String firstname;
private boolean present;
public String getFirstname() {
return this.firstname;
}
public void setFirstname(String firstname){
this.firstname = firstname;
}
public boolean getPresent() {
return this.present;
}
public void setPresent(boolean present) {
this.present = present;
}
public Wilder() {
}
public Wilder(String firstName, boolean present) {
this.firstname = firstName;
this.present = present;
}
public static final String ANSI_RESET = "\u001B[0m"; // set terminal output color to red, requires Windows 10
public static final String ANSI_RED = "\u001B[31m"; // reset terminal output color to default color
public String whoAmI() {
if (this.present) {
return ("My name is " + this.firstname + " and I am present");
}
else {
return ("My name is " + this.firstname + " and I am " + ANSI_RED + "not" + ANSI_RESET + " present"); //
}
}
}