Added basic worker so tests can create them

This commit is contained in:
2025-12-03 17:59:30 +01:00
parent 8c4849fdf0
commit 4bb1e13f21
5 changed files with 26 additions and 3 deletions

View File

@@ -1,12 +1,22 @@
package hhn.temp.project;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AssignmentManager {
List<Worker> workerList;
Map<Integer, Worker> workerMap;
int workerIdCounter;
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;
}
}