Skip to content

QunWu/OOD_ParkingLot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

# OOD_ParkingLot
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

Initial version. Not finished yet

Todo List:
  • Refine BlockingQueue.java
  • add ParkingSlot.java
  • sequence diagram
  • add UI

About

Initial version. Not finished yet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages