Compare commits
1 Commits
Skeleton
...
TestImplem
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d05bb921a |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,39 +1,12 @@
|
|||||||
package hhn.temp.project;
|
package hhn.temp.project;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class AssignmentManager {
|
public class AssignmentManager {
|
||||||
Map<Integer, Worker> workerMap;
|
List<Worker> workerList;
|
||||||
List<Task> taskList;
|
|
||||||
int workerIdCounter;
|
|
||||||
|
|
||||||
public AssignmentManager() {
|
public AssignmentManager() {
|
||||||
workerMap = new HashMap<>();
|
workerList = new ArrayList<>();
|
||||||
taskList = new ArrayList<>();
|
|
||||||
int workerIdCounter = 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int createWorker(String name) {
|
|
||||||
Worker worker = new Worker(name, ++workerIdCounter);
|
|
||||||
workerMap.put(workerIdCounter, worker);
|
|
||||||
return workerIdCounter;
|
|
||||||
}
|
|
||||||
public int addTask(int workerId, String name, String description) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
public Task getTask(int taskId) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
public ArrayList<Task> getTaskList() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
public void editTask(int workerId, int taskId, String name, String description) {
|
|
||||||
|
|
||||||
}
|
|
||||||
public void removeTask(int taskId) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +1,4 @@
|
|||||||
package hhn.temp.project;
|
package hhn.temp.project;
|
||||||
|
|
||||||
public class Task {
|
public class Task {
|
||||||
String name;
|
|
||||||
String description;
|
|
||||||
int taskId;
|
|
||||||
int workerId;
|
|
||||||
public Task(int taskId, int workerId, String name, String description) {
|
|
||||||
this.name = name;
|
|
||||||
this.description = description;
|
|
||||||
this.taskId = taskId;
|
|
||||||
this.workerId = workerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
public int getTaskId() {
|
|
||||||
return taskId;
|
|
||||||
}
|
|
||||||
public int getWorkerId() {
|
|
||||||
return workerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,4 @@
|
|||||||
package hhn.temp.project;
|
package hhn.temp.project;
|
||||||
|
|
||||||
public class Worker {
|
public class Worker {
|
||||||
String name;
|
|
||||||
int workerId;
|
|
||||||
public Worker(String name, int workerId) {
|
|
||||||
this.name = name;
|
|
||||||
this.workerId = workerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public int getId() {
|
|
||||||
return workerId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user