-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReply.java
39 lines (39 loc) · 962 Bytes
/
Reply.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
import java.util.UUID;
/**
* This is the reply class for the users to reply to a comment
* @authors: J TEA: Tessa Neal, Eve Blom, Anna Phan, and Jacqueline Askey
*/
public class Reply {
private String comment;
private UUID user;
/**
* Creates a new reply
* @param comment user's comment
* @param user user who is making the reply
*/
public Reply(String comment, UUID user) {
this.comment = comment;
this.user = user;
}
/**
* get the reply comment
* @return comment
*/
public String getComment() {
return comment;
}
/**
* get user who is making the reply
* @return user who is replying
*/
public UUID getUser() {
return user;
}
/**
* Creates a string representation of the reply
*/
public String toString() {
String result = "\nUser: " + user + "\nComment: " + comment + "\n";
return result;
}
}