restaurant system

Hi, im having problems in programming a restaurant system with 3 types of employees; waiter,chef,& cashier. the waiter should start first by asking the costumer about his info then place the order in pending order queue. The chef Gets the next order from the pending order queue, prepares the dish and push the order to finished
order queue and sends a notification to the waiter that the order is ready. can u help me in how can i make that queue list and pass it to the chef ?! should i make 3 classes and deal with them or what ? plz help me with this! thanks
Sounds fun :)

One possible solution:
- Implement all employees as derived classes from a base class Employee (this saves you coding)
- Implement the Pending Order Queue using a data structure
- All 3 employees operate on a single instance of the order queue...

Again, that's one possible solution.

Joe
sparkprogrammer@gmail.com
Thanks alot joe ! But i really find big problems in dealing with queue list! Do u mean tht i should make one queue list for costumers and make it global and pass it to all the employees ?! İ dnt knw ...maybe i should restudy all the queue list consepts to get through this!!
One more thing ! The restaurant info like num of tables n chairs where is the best place to include them ?!
Thanks again
A queue works just fine; making it global may not be the best thing to do; you can use pass-by-reference if you need the individual employees to modify the queue somehow.

Also, the restaurant info would best fit into another class of its own for a Restaurant.


If you need more help just email me at: sparkprogrammer@gmail.com

Joe
www.concordspark.com
Last edited on
Topic archived. No new replies allowed.