Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Programming1212/MultithreadRestaurant

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 

Repository files navigation

Restaurant Simulation

Introduction

  • Use Java Multithread to simulate a restaurant
  • Restaurant has three states: Open, Full and Close
  • Two roles in restaurant: Customer and Cook
  • Only cook way is using Machine
  • When all cooks are busy which means all machines are full, the next order should wait util there are some machines free.
  • When the number of customers is equal to the capacity, the restaurant is full. The next customer should wait util there is someone finishing his meal and leaving.
  • Customer States:

    CustomerStarting, CustomerEntered, CustomerPlacedOrder, CustomerReceivedOrder, CustomerLeaving

  • Cook States:

    CookStarting, CookReceivedOrder, CookStartedFood, CookFinishedFood, CookCompletedOrder, CookEnding

  • Machine States:

    MachineStarting, MachineStartingFood, MachineDoneFood, MachineEnding

  • Customers and cooks are multithread. Machines are multithread and each machine contains some threads because each machine can cook multi food.
  • Simulation can share orders and machines, but they should be synchronized.

About

Restaurant Simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.