for any problems, please leave comments under this project. For CMU-Algorithsm students, please keep your questions untils Saturday and I will answer them if we have time after BaiYang's speech
Multiple Thread verison for Parking Lot. Car is thread class. Shared values are the enterQue and quitQue which are instances of BlockingQueue.
- enterQue is the waiting queue to enter the parking lot.
- quitQue is the waiting queue to quit the parking lot
In another word, before enter/quit the parking, cars firstly go into waiting queue. When gate is serving a car, the function getTicket or paymemt will be invoked. So, Car.java, the thread, is producer while Gate.java is consumer
Todo List:
- Refine BlockingQueue.java
- add ParkingSlot.java
- sequence diagram
- add UI