-
Notifications
You must be signed in to change notification settings - Fork 0
/
Review.java
56 lines (49 loc) · 1.18 KB
/
Review.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
45
46
47
48
49
50
51
52
53
54
55
56
import java.util.UUID;
/**
* This is the review class to the allow user to review a course
* @authors: J TEA: Tessa Neal, Eve Blom, Anna Phan, and Jacqueline Askey
*/
public class Review {
private double rating;
private String comment;
private UUID user;
/**
* Creates a new review
* @param rating rating of the course
* @param comment comment on the course
* @param user user who is commenting
*/
public Review(double rating, String comment, UUID user) {
this.rating = rating;
this.comment = comment;
this.user = user;
}
/**
* get review rating
* @return rating
*/
public double getRating() {
return rating;
}
/**
* get review comment
* @return comment
*/
public String getComment() {
return comment;
}
/**
* gets the user who is making the review
* @return user
*/
public UUID getUser() {
return user;
}
/**
* Creates a string representation of the reivew
*/
public String toString() {
String result = rating + " stars\t" + user + ": \n" + comment + "\n";
return result;
}
}