Compare commits
3 Commits
9641825200
...
Worker
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bb1e13f21 | |||
| 8c4849fdf0 | |||
| a5378868ea |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -36,6 +36,11 @@ sourceSets {
|
|||||||
|
|
||||||
test {
|
test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
testLogging {
|
||||||
|
events "passed", "skipped", "failed"
|
||||||
|
exceptionFormat "full"
|
||||||
|
showStandardStreams = true
|
||||||
|
}
|
||||||
finalizedBy jacocoTestReport
|
finalizedBy jacocoTestReport
|
||||||
}
|
}
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,12 +1,22 @@
|
|||||||
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 {
|
||||||
List<Worker> workerList;
|
Map<Integer, Worker> workerMap;
|
||||||
|
int workerIdCounter;
|
||||||
|
|
||||||
public AssignmentManager() {
|
public AssignmentManager() {
|
||||||
workerList = new ArrayList<>();
|
workerMap = new HashMap<>();
|
||||||
|
int workerIdCounter = 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int createWorker(String name) {
|
||||||
|
Worker worker = new Worker(name, ++workerIdCounter);
|
||||||
|
workerMap.put(workerIdCounter, worker);
|
||||||
|
return workerIdCounter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,17 @@
|
|||||||
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