forked from raghaddmahgoub/OOP-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathText.java
More file actions
64 lines (49 loc) · 1.42 KB
/
Text.java
File metadata and controls
64 lines (49 loc) · 1.42 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
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.sql.Timestamp;
public abstract class Text {
////////////////////////////////////////////**ATTRIBUTES**//////////////////////////////////////
protected int Id;
protected User author;
protected String content;
protected Timestamp timestamp;
public void setCntReacts(int cntReacts) {
this.cntReacts = cntReacts;
}
protected int cntReacts=0;
//////////////////////////////////////////**CONSTRUCTORS**///////////////////////////////////////////
public Text(int id) {
this.Id = id;
}
public Text(){}
////////////////////////////////////////////**METHODS**//////////////////////////////////////////
public int getId() {
return Id;
}
public void setTimestamp(Timestamp timestamp) {
this.timestamp = timestamp;
}
public Timestamp getTimestamp() {
return timestamp;
}
public void setContent(String content) {
this.content = content;
}
public void displayContent() {
System.out.println(content);
}
public User getAuthor() {
return author;
}
public void setAuthor(User author) {
this.author = author;
}
public abstract void addReact();
public abstract int getReacts();
public void setId(int id) {
Id = id;
}
public String getContent() {
return content;
}
}