-
Notifications
You must be signed in to change notification settings - Fork 0
/
Project.java
82 lines (70 loc) · 2.36 KB
/
Project.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import java.util.ArrayList;
import java.util.UUID;
public class Project{
private UUID id;
private String projectName;
private String projectDesc;
private ArrayList<Comment> projectThread;
private String projectAuthor;
private ArrayList<Column> columns;
private ArrayList<String> tasks;
private ArrayList<String> directions;
private User user;
public Project(String projectName, String projectDesc, String projectAuthor) {
this.id = UUID.randomUUID();
this.projectName = projectName;
this.projectDesc = projectDesc;
this.projectAuthor = projectAuthor;
this.projectThread = new ArrayList<Comment>();
this.columns = new ArrayList<Column>();
this.tasks = new ArrayList<String>();
this.directions = new ArrayList<String>();
}
public Project(UUID id, String projectName, String projectDesc, String projectAuthor) {
this.id = id;
this.projectName = projectName;
this.projectDesc = projectDesc;
this.projectAuthor = projectAuthor;
this.projectThread = new ArrayList<Comment>();
this.columns = new ArrayList<Column>();
this.tasks = new ArrayList<String>();
this.directions = new ArrayList<String>();
}
public UUID getId() {
return id;
}
public String getProjectName(){
return projectName;
}
public String getProjectDesc(){
return projectDesc;
}
public void getTasks(){
for (String task : tasks){
System.out.println(task);
}
}
public String getProjectAuthor() {
return projectAuthor;
}
// adds column to project, tester checks name to see column was created
public void addColumn(Column column) {
columns.add(column);
}
// adds comment to project, tester checks author, text, and date to see comment was created
public void addComment(Comment comment) {
projectThread.add(comment);
}
public void printBoard() {
for (Column column : columns) {
System.out.println(column.getColumnName());
for (Task task : column.getTasks()) {
System.out.println(task.getTaskName());
}
}
}
@Override
public String toString() {
return "Project [ProjectId=" + UUID.randomUUID() + ", ProjectName=" + projectName + "]";
}
}