Repository navigation
Expand file tree
/
Copy pathComment.java
More file actions
68 lines (63 loc) · 2.01 KB
/
Copy pathComment.java
File metadata and controls
68 lines (63 loc) · 2.01 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
68
package Comment;
import UserAccounts.* ;
import Products.* ;
public class Comment
{
private Customer customerWhoCommenting;
private Product productWhichCommented;
private String commentText;
enum EN
{
WAITING,CONFIRMED,NOTCONFIRMED;
}
private EN isComfirmed;
private boolean hasBought;
//----------------------------------------
Comment(Customer customer, Product product, String commentText, boolean hasBought)
{
setCustomerWhoCommenting(customer);
setProductWhichCommented(product);
setCommentText(commentText);
setHasBought(hasBought);
}
//---------------------------------
public Customer getCustomerWhoCommenting() {
return customerWhoCommenting;
}
public void setCustomerWhoCommenting(Customer customerWhoCommenting) {
this.customerWhoCommenting = customerWhoCommenting;
}
public Product getProductWhichCommented() {
return productWhichCommented;
}
public void setProductWhichCommented(Product productWhichCommented) {
this.productWhichCommented = productWhichCommented;
}
public String getCommentText() {
return commentText;
}
public void setCommentText(String commentText) {
this.commentText = commentText;
}
public EN getIsComfirmed() {
return isComfirmed;
}
public void setIsComfirmed(EN isComfirmed) {
this.isComfirmed = isComfirmed;
}
public boolean isHasBought() {
return hasBought;
}
public void setHasBought(boolean hasBought) {
this.hasBought = hasBought;
}
//----------------------------------------
@Override
public String toString()
{
return "/customerWhoCommenting:"+this.customerWhoCommenting.toString()+
"/product:"+productWhichCommented.toString()+
"/comment text:" + commentText+
"/has customer bought the product?" + hasBought;
}
}