Professional Documents
Culture Documents
Java Lab
Java Lab
Java Lab
E-RESTURANT
INTRODUCTION
The food delivery market is changing at an accelerated pace. And as a restaurant owner, being
online is the way to go when it comes down to expanding your current customer base & boosting
your stream of revenue.
Having an online presence makes you “sparkling visible” to clients who’d otherwise never see an
ad or hear about your business, and who would probably never come knocking on your
restaurant door. So there goes your foot traffic.
However, building an online presence is just like tapping your customers on the shoulder and
story tell them all about your great restaurant.
And when you add to the table an easy-to-use feature, like a customer-friendly online ordering
system for restaurants, then you've just skyrocketed your chances of boosting sales
and increasing your profit margin.
But still, you may ask yourself: “Can’t we just be online without online ordering?” Well yes, yes
you can. But then you’d be missing out on this huge cash-cow opportunity.
Restaurant owners around the world who are racing to capture new customers have already
jumped on board of the online delivering trend.
People have moved on from ordering offline to ordering online because it is easy,
convenient and completely transparent.
They can finally say goodbye to the hustle and bustle generated by the old ways of food
ordering.
This is what they want. So then, why not give the people what they want?
1
E-RESTAURANT
SOURCE CODE:
import java.io.*;
import java.lang.*;
class CustomerOrder
boolean valueset=false;
if(valueset)
try
wait();
}catch(InterruptedException e)
System.out.println(e);
System.out.println("\n"+t);
try
2
E-RESTAURANT
for(int i=0;i<3;i++)
str[i]=br.readLine();
}catch(IOException e)
System.out.println(e);
valueset=true;
notify();
if(!valueset)
try
wait();
}catch(InterruptedException e)
3
E-RESTAURANT
System.out.println(e);
System.out.println("\n"+t);
for(int i=0;i<3;i++)
valueset=false;
notify();
customerOrder d;
Thread t;
takeOrder(customerOrder d)
this.d=d;
t.start();
4
E-RESTAURANT
for(int i=0;i<2;i++)
d.d_takeOrder(t);
customerOrder d;
Thread t;
dispOrder(customerOrder d)
this.d=d;
t.start();
for(int i=0;i<2;i++)
d.d_dispOrder(t);
5
E-RESTAURANT
class Restaurant
new takeOrder(d);
new dispOrder(d);
6
E-RESTAURANT
OUTPUT
7
E-RESTAURANT