You will find attached the complete project with code java, JUnit tests and UML.
git pull
mvn javadoc:javadoc
mvn package
java jar target/COO-Piscine-1.0-SNAPSHOT.jar
- this application is a shared resource usage simulation app known as the pool probleme.
- That every swimmer should want to access the pool must do these steps:
1- Take a basket
2- Go to a cubicle
3- To undress
4- Release the cubicle
5- Swim
6- Find a cubicle
7- Get dressed
8- Release his cubicle
9- Return his basket
10- Go out
- For one swimmer it's easy to do because the person finds an available basket and cabins too. So he's waiting for no one.
Each swimmer is characterized by : Name, basket, cubicle, time to undress, swimming time and time to get dressed.
- For this problem we have different swimmers with different actions and that's what makes the problem difficult, so we will need a FairScheduler that deals with different swimmers to produce the simulation of the operation of a pool. Also each swimmer considered as a sequentialScheduler and had different actions so that the ForeseeabeleScheduler can manage all of them.
- Template method