Professional Documents
Culture Documents
Name: Ayman Eathysham: Chocolate Room Billing System
Name: Ayman Eathysham: Chocolate Room Billing System
Name: Ayman Eathysham: Chocolate Room Billing System
Although Java is usually associated with the World Wide Web (WWW), its
origin predates the Web. Java was primarily developed not for the internet,
but as a cross-platform technology for consumer electronic devices and
communication with remote devices. Until the late 80s, C++ was a popular
language to write object oriented programs. However, C++ was not platform
independent. A team at Sun Microsystems further enhanced Java to make it
platform-independent. Initially named as Oak in 1995, Java was officially
delivered to the world as a fully fledged platform-independent language.
The members of the Green Project, which included Patrick Naughton, Mike
Sheridan and James Gosling formed a group in 1991 to create products for the
slick electronics market, and developed the programming language Oak. Oak
was later renamed to Java because of patent conflicts.
The following are features of Java:
1. Robust: Java has the strong memory allocation and automatic garbage
collection mechanism. It provides the powerful exception handling and
type checking mechanism as compare to other programming languages.
Compiler checks the program whether there any error and interpreter
checks any run time error and makes the system secure from crash. All of
the above features make the java language robust.
2. Distributed: The widely used protocols like HTTP and FTP are developed
in java. Internet programmers can call functions on these protocols and
can get access the files from any remote machine on the internet rather
than writing codes on their local system.
3. Portable: The feature Write-once-run-anywhere makes the java language
portable provided that the system must have interpreter for the JVM.
Java also have the standard data size irrespective of operating system or
the processor. These features make java a portable language.
4. Dynamic: While executing the java program the user can get the required
files dynamically from a local drive or from a computer thousands of
miles away from the user just by connecting with the Internet.
5. Secure: Java does not use memory pointers explicitly. All the programs in
java are run under an area known as the sand box. Security manager
determines the accessibility options of a class like reading and writing a
file to the local disk. Java uses the public key encryption system to allow
the java applications to transmit over the internet in the secure
encrypted form. The bytecode Verifier checks the classes after loading.
The chocolate room India Pvt. Ltd. started operating since October 2007.
It is an Australian master franchisee. It is committed to building a unified
family, consistently serving the highest quality hot chocolate & coffee and
providing outstanding personalized service in a vibrant store atmosphere.
Through a Java Program in this project, the billing system of Chocolate
Room is highlighted where, you, as a customer can display the menu card,
order your meals (as per your choice) and also have the bill displayed for your
order. Various Methods (Functions) have been used and made private so that
one and only one main function is called by the User, which in turn calls the
various methods. Each of the data members have been so used with the
comments so that it becomes easier for the user to understand the various
purposes the data members have been used for.
When the WelcomeMenu() is called, the “Welcome to Chocolate Room” screen appears and the
user is asked:
----Enter Your Choice----
1. Display the Menu Card
2. Place Your Order
3. Display the Bill
4. Exit
What do you choose?
If 1 is entered, the user is asked the following and the menu is displayed accordingly(as to what the
user enters):
Enter 1 for Veg Menu and Enter 2 for Non-Veg Menu:
After the Menu has been displayed, User is again asked if he wishes the main menu to be displayed
again:
Do you want the main menu to be displayed again?
(Enter Yes if you want to display the menu again)
If he enters “yes”, the main menu along with the welcome screen is displayed. This time the user
may see the menu again( if he wishes to) or he may place the order by pressing 2.
Once again the user is asked if he wants to order Veg Menu or Non-Veg Menu and the categories
under each are displayed accordingly.
Do you want to order Veg or Non-Veg?
Enter 1 for Veg and 2 for Non-Veg
If 1 is entered the categories under Vegetarian Menu are displayed and if 2 is entered, categories
under Non-Vegetarian Menu are displayed. By entering the serial number, the various items under
that particular category are displayed. The user may now order by entering the item number he
wishes to order. On entering the item number, the user will be asked the quantity he wishes to order
and the amount is displayed accordingly.
Enter the item number you want to order:
Enter the Quantity you want to order:
Amount to be paid:
After this when the User is asked if he wishes to display the main menu again, he may order more or
directly demand display of bill.
Amount exclusive of tax=Rs
Amount inclusive of tax=Rs
Thank You. We hope you were satisfied with our service
The bill is calculated along with the amount and the tax charged which is 14.5% of the total amount
and the “Visit Again” screen is displyed. The bill is calculated, both inclusive and exclusive of all
taxes, and displayed.
Since the job is over, the User may enter “no” when he/she is asked to display the main menu again.
Do you want the main menu to be displayed again?
(Enter Yes if you want to display the menu again)
No
This way, the program comes to an end.
PlaceOrder();
break;
case 3:
DisplayBill();
break;
case 4:
System.out.println("Exiting");
break;
default:
System.out.println("Invalid Choice");
}
System.out.println("Do you want the main menu to be displayed
again?");
System.out.println("(Enter Yes if you want to display the menu
again)");
yes=br.readLine();
if(yes.equalsIgnoreCase("Yes"))
WelcomeMenu();
}
private void Menu()throws IOException//To display the Menu(Veg and Non-Veg)
{
System.out.print("Enter 1 for Veg Menu and Enter 2 for Non-Veg Menu:
");
int menu=Integer.parseInt(br.readLine());
if(menu==1)
Menu_Veg();
else if(menu==2)
Menu_NonVeg();
else
System.out.println("Invalid Menu Option");
}
private void Menu_Veg()//Vegetarian Menu Card
{
System.out.println("----Vegetarian----");
System.out.println("S.No.\tName\t\t\t\t\t\tPrice");
System.out.println("\n1. Hot Chocolate");
System.out.println("************************");
for(int i=0;i<HotChocolate.length;i++)
System.out.println((i+1)+".\t"+HotChocolate[i]+"\t"+p1[i]);
System.out.println("\n2. Choctails");
System.out.println("************************");
for(int i=0;i<Choctails.length;i++)
System.out.println((i+1)+".\t"+Choctails[i]+"\t\t\t\t"+p2[i]);
System.out.println("\n3. Choco Shakes");
System.out.println("************************");
for(int i=0;i<ChocoShakes.length;i++)
System.out.println((i+1)+".\t"+ChocoShakes[i]+"\t\t\t\t"+p3[i]);
System.out.println("\n4. Tea and Coffee");
System.out.println("************************");
System.out.println("\nHot Coffee");
for(int i=0;i<HotCoffee.length;i++)
System.out.println((i+1)+".\t"+HotCoffee[i]+"\t\t\t\t"+p4[i]);
System.out.println("\nFrozen Coffee");
for(int i=0;i<FrozenCoffee.length;i++)
System.out.println((i+1)+".\t"+FrozenCoffee[i]+"\t\t\t\t"+p5[i]);
System.out.println("\nHot Tea");
for(int i=0;i<HotTea.length;i++)
System.out.println((i+1)+".\t"+HotTea[i]+"\t\t\t\t"+p6[i]);
System.out.println("\nIced Tea");
for(int i=0;i<IcedTea.length;i++)
System.out.println((i+1)+".\t"+IcedTea[i]+"\t\t\t\t"+p7[i]);
System.out.println("\n5. Chillers");
System.out.println("************************");
for(int i=0;i<Chillers.length;i++)
System.out.println((i+1)+".\t"+Chillers[i]+"\t\t\t\t"+p8[i]);
System.out.println("\n6. Coolers");
System.out.println("************************");
for(int i=0;i<Coolers.length;i++)
System.out.println((i+1)+".\t"+Coolers[i]+"\t\t\t\t"+p9[i]);
System.out.println("\n7. Mocktails");
System.out.println("************************");
System.out.println("\nGranites");
for(int i=0;i<Mocktails_Granites.length;i++)
System.out.println((i+1)+".\t"+Mocktails_Granites[i]+"\t\t\t\t"+p10[i]);
System.out.println("\nCremosinas");
for(int i=0;i<Mocktails_Cremosinas.length;i++)
System.out.println((i+1)+".\t"+Mocktails_Cremosinas[i]+"\t\t\t\t"+p11[i])
;
System.out.println("\n8. Sandwiches");
System.out.println("************************");
for(int i=0;i<VegSandwiches.length;i++)
System.out.println((i+1)+".\t"+VegSandwiches[i]+"\t\t\t\t"+p12[i]);
System.out.println("\n9. Mexican Bells");
System.out.println("************************");
for(int i=0;i<VegMexicanBells.length;i++)
System.out.println((i+1)+".\t"+VegMexicanBells[i]+"\t\t\t\t"+p13[i]);
System.out.println("\n10. Salad Collection");
System.out.println("************************");
for(int i=0;i<VegSaladCollection.length;i++)
System.out.println((i+1)+".\t"+VegSaladCollection[i]+"\t\t\t\t"+p14[i]);
System.out.println("\n11. Pancakes");
System.out.println("************************");
for(int i=0;i<Pancakes.length;i++)
System.out.println((i+1)+".\t"+Pancakes[i]+"\t\t\t\t"+p15[i]);
System.out.println("\n12. Chocolate Pizza");
System.out.println("************************");
for(int i=0;i<ChocolatePizza.length;i++)
System.out.println((i+1)+".\t"+ChocolatePizza[i]+"\t\t\t\t"+p16[i]);
}
System.out.println((i+1)+".\t"+Crepes[i]+"\t\t\t\t"+p20[i]);
System.out.println("\n5. Sandwiches");
System.out.println("************************");
for(int i=0;i<NonVegSandwiches.length;i++)
System.out.println((i+1)+".\t"+NonVegSandwiches[i]+"\t\t\t\t"+p21[i]);
System.out.println("\n6. Salads");
System.out.println("************************");
for(int i=0;i<NonVegSalads.length;i++)
System.out.println((i+1)+".\t"+NonVegSalads[i]+"\t\t\t\t"+p22[i]);
System.out.println("\n7. Mexican Bells");
System.out.println("************************");
for(int i=0;i<NonVegMexicanBells.length;i++)
System.out.println((i+1)+".\t"+NonVegMexicanBells[i]+"\t\t\t\t"+p23[i]);
}
private void PlaceOrder()throws IOException//To place the order as per
the Customer's choice
{
System.out.println("Do you want to order Veg or Non-Veg?");
System.out.println("Enter 1 for Veg and 2 for Non-Veg");
int ask=Integer.parseInt(br.readLine());
if(ask==1)
Order_Veg();
else if(ask==2)
Order_NonVeg();
}
private void DisplayBill()//To calculate and display the bill
{
System.out.println("Amount exclusive of tax=Rs "+amt);
amt=amt+(0.125*amt);//Rate of tax is 12.5%
System.out.println("Amount inclusive of tax=Rs "+amt);
System.out.println(" Thank You. We hope you were satisfied with our
service");
System.out.println("**** **** ***** ******** **** *********
********** ********* ********** *** *** ***");
System.out.println("***** ***** ***** ****** **** ********* ***
*** ****** *** *** *** **** ***");
System.out.println(" ********** ***** **** **** *** ** **
***** ** ** *** ***** ***");
System.out.println(" ********* ***** ******** **** ***
********** ***** *** ********** *** *** *****");
private void Choctails()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Choctails.length;i++)
System.out.println((i+1)+"\t"+Choctails[i]+"\t"+p2[i]);
}
private void ChocoShakes()//Preparing a column in the menu card for each of the
initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<ChocoShakes.length;i++)
System.out.println((i+1)+"\t"+ChocoShakes[i]+"\t"+p3[i]);
}
private void Chillers()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Chillers.length;i++)
System.out.println((i+1)+"\t"+Chillers[i]+"\t"+p8[i]);
}
private void Coolers()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Coolers.length;i++)
System.out.println((i+1)+"\t"+Coolers[i]+"\t"+p9[i]);
}
private void Mocktails_Granites()//Preparing a column in the menu card for each of
the initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Mocktails_Granites.length;i++)
System.out.println((i+1)+"\t"+Mocktails_Granites[i]+"\t"+p10[i]);
}
private void Mocktails_Cremosinas()//Preparing a column in the menu card for each
of the initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Mocktails_Cremosinas.length;i++)
System.out.println((i+1)+"\t"+Mocktails_Cremosinas[i]+"\t"+p11[i]);
}
Page 15 of 45 Chocolate Room Billing System
Name: Ayman Eathysham
private void VegSandwiches()//Preparing a column in the menu card for each of the
initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<VegSandwiches.length;i++)
System.out.println((i+1)+"\t"+VegSandwiches[i]+"\t"+p12[i]);
}
private void VegMexicanBells()//Preparing a column in the menu card for each of the
initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<VegMexicanBells.length;i++)
System.out.println((i+1)+"\t"+VegMexicanBells[i]+"\t"+p13[i]);
}
private void VegSaladCollection()//Preparing a column in the menu card for each of
the initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<VegSaladCollection.length;i++)
System.out.println((i+1)+"\t"+VegSaladCollection[i]+"\t"+p14[i]);
}
private void Pancakes()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Pancakes.length;i++)
System.out.println((i+1)+"\t"+Pancakes[i]+"\t"+p15[i]);
}
private void ChocolatePizza()//Preparing a column in the menu card for each of the
initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<ChocolatePizza.length;i++)
System.out.println((i+1)+"\t"+ChocolatePizza[i]+"\t"+p16[i]);
}
private void Paninos()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Paninos.length;i++)
System.out.println((i+1)+"\t"+Paninos[i]+"\t"+p17[i]);
}
Page 16 of 45 Chocolate Room Billing System
Name: Ayman Eathysham
private void Baguettes()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Baguettes.length;i++)
System.out.println((i+1)+"\t"+Baguettes[i]+"\t"+p18[i]);
}
private void Wraps()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Wraps.length;i++)
System.out.println((i+1)+"\t"+Wraps[i]+"\t"+p19[i]);
}
private void Crepes()//Preparing a column in the menu card for each of the initialised
arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<Crepes.length;i++)
System.out.println((i+1)+"\t"+Crepes[i]+"\t"+p20[i]);
}
private void NonVegSandwiches()//Preparing a column in the menu card for each of
the initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<NonVegSandwiches.length;i++)
System.out.println((i+1)+"\t"+NonVegSandwiches[i]+"\t"+p21[i]);
}
private void NonVegSalads()//Preparing a column in the menu card for each of the
initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<NonVegSalads.length;i++)
System.out.println((i+1)+"\t"+NonVegSalads[i]+"\t"+p22[i]);
}
private void NonVegMexicanBells()//Preparing a column in the menu card for each
of the initialised arrays
{
System.out.println("S.No.\t\tName\t\t Cost in Rs");
for(int i=0;i<NonVegMexicanBells.length;i++)
System.out.println((i+1)+"\t"+NonVegMexicanBells[i]+"\t"+p23[i]);
}
Page 17 of 45 Chocolate Room Billing System
Name: Ayman Eathysham
break;
case 5:
FrozenCoffee();
x=6;
break;
case 6:
HotTea();
x=6;
break;
case 7:
IcedTea();
x=4;
break;
case 8:
Chillers();
x=7;
break;
case 9:
Coolers();
x=8;
break;
case 10:
Mocktails_Granites();
x=3;
break;
case 11:
Mocktails_Cremosinas();
x=4;
break;
case 12:
VegSandwiches();
x=4;
break;
case 13:
VegMexicanBells();
x=2;
break;
case 14:
VegSaladCollection();
x=4;
break;
case 15:
Pancakes();
x=9;
break;
case 16:
ChocolatePizza();
x=5;
break;
//default:
// System.out.println("Item Not Available");
}
do
{
System.out.print("Enter the item number you want to order: ");
item=Integer.parseInt(br.readLine());
}while(item<1 || item>x);
switch(n)
{
case 1:
price=p1[item];
break;
case 2:
price=p2[item];
break;
case 3:
price=p3[item];
break;
case 4:
price=p4[item];
break;
case 5:
price=p5[item];
break;
case 6:
price=p6[item];
break;
case 7:
price=p7[item];
break;
case 8:
price=p8[item];
break;
case 9:
price=p9[item];
break;
case 10:
price=p10[item];
break;
case 11:
price=p11[item];
break;
case 12:
price=p12[item];
break;
case 13:
price=p13[item];
break;
case 14:
price=p14[item];
break;
case 15:
price=p15[item];
break;
case 16:
price=p16[item];
break;
}
}
private void Order_NonVeg()throws IOException//To place Non-Veg Order
{
do
{
System.out.println(" 1. Paninos");
System.out.println(" 2. Baguettes");
System.out.println(" 3. Wraps");
System.out.println(" 4. Crepes");
System.out.println(" 5. Non-Veg Sandwiches");
System.out.println(" 6. Non-Veg Mexican Bells");
System.out.print("Enter the serial number you want to order: ");
n=Integer.parseInt(br.readLine());
}while(n<1 || n>6);
double price=0;
int x=0;
switch(n)
{
case 1:
Paninos();
x=3;
break;
case 2:
Baguettes();
x=2;
break;
case 3:
Wraps();
x=3;
break;
case 4:
Crepes();
x=3;
break;
case 5:
NonVegSandwiches();
x=3;
break;
case 6:
NonVegMexicanBells();
x=6;
break;
// default:
// System.out.println("Item not Available");
}
do
{
System.out.print("Enter the item number you want to order: ");
item=Integer.parseInt(br.readLine());
}while(item<1 || item>x);
switch(n)
{
case 1:
price=p17[item];
break;
case 2:
price=p18[item];
break;
case 3:
price=p19[item];
break;
case 4:
price=p20[item];
break;
case 5:
price=p21[item];
break;
case 6:
price=p22[item];
break;
case 7:
price=p23[item];
break;
}
System.out.print("Enter the Quantity you want to order: ");
qty=Integer.parseInt(br.readLine());
amt=qty*price;
System.out.println("Amount to be paid:"+amt);
}
}
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
*** **** ****
*** ***********
----Vegetarian----
S.No. Name Price
1. Hot Chocolate
************************
1. Classic 150.0
2. Mint 175.0
3. Hazelnut 125.0
4. Tiramisu 100.0
5. Caramel 150.0
6. White 150.0
7. Belgian
Chocolate 120.0
8. Meringue 100.0
9. Coffee Mocha 175.0
2. Choctails
************************
1. Classic granita 50.0
2. Mint Split Latte 60.0
3. Hazelnut Granita 75.0
4. Vanilla Latte 65.0
5. Torroncino Shake 100.0
6. Coconut Frappe 90.0
7. Coffee nirvana 90.0
8. Caramel frappe 60.0
3. Choco Shakes
************************
1. KitKat Shake 75.0
2. Toblerone Shake 75.0
3. Oreo Cookie Shake 75.0
4. Sniker Bar Shake 75.0
5. Creme Shake 50.0
6. Dutch Truffle Shake 60.0
7. TimTam Shake 60.0
8. MarsBar Shake 75.0
9. M&M Shake 65.0
10. Brownie Shake 85.0
11. FerroroRocher Shake 70.0
Hot Coffee
1. Cappucino 65.0
2. Cafe Latte 65.0
3. Long Black 60.0
4. Macchiato 55.0
5. Mocha Latte 50.0
6. Cafe Mocha 60.0
Frozen Coffee
1. Iced coffee 55.0
2. diet iced coffee 60.0
3. iced cappuccino 55.0
4. Irish Coffee 55.0
5. Almond Coffee 50.0
6. Tripple Sec Coffee 65.0
Hot Tea
1. English Breakfast 65.0
2. Masala Tea 65.0
3. Green Tea 60.0
4. Earl Grey 55.0
5. Vanilla 50.0
6. Peppermint 60.0
Iced Tea
1. Lemon Iced Tea 70.0
2. Litchi Iced Tea 60.0
3. Strawberry Iced Tea 65.0
4. Peach Iced Tea 75.0
5. Chillers
************************
1. Mint Bomb 65.0
2. Double chocochip Frappuccino 60.0
3. Choco Crunch Mocha 70.0
4. Choco Loco 70.0
5. Java chocochip Frappucino 65.0
6. Coffee Frappe 60.0
6. Coolers
************************
1. Tropical Smoothie 75.0
2. Black Current 75.0
3. Pinky Lemonade 70.0
4. Country Lemonade 80.0
5. Maimi Summer 65.0
6. Fruit Spitzer 90.0
7. Pinky Cooler 85.0
8. Cindrella 80.0
7. Mocktails
************************
Granites
1. Cranberry Slush 150.0
2. Bloody Orange Slush 125.0
3. Blue Sluch 175.0
Cremosinas
1. Candied Apple 100.0
2. Litchi 150.0
3. Strawberry 120.0
4. Tangy Orane 125.0
8. Sandwiches
************************
1. Cheese Tomato Chilli 100.0
2. Choco Chilli 110.0
3. Tandoori Paneer 120.0
4. Coleslaw 125.0
9. Mexican Bells
************************
1. CheeseBean Burrito 150.0
11. Pancakes
************************
1. Chock O Block 125.0
2. Death By Chocolate 125.0
3. Bananarama 120.0
4. Bavarian Pancake 150.0
5. Devonshire Pancake 140.0
6. Jaffa Orange 135.0
7. Mangola Waffle 150.0
8. Testing Plate 165.0
9. Sugar Rush Waffle 120.0
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
*** **** ****
*** ***********
1. Hot Chocolate
2. Choctails
3. ChocoShakes
4. Hot Coffee
5. Frozen Coffee
6. Hot Tea
7. Iced Tea
8. Chillers
9. Coolers
10. Mocktails (Granites)
11. Mocktails (Cremosinas)
12. Veg SandWiches
13. Veg Mexican Bells
14. Veg Salad Collection
15. Pancakes
16. Chocolate Pizzas
Enter the serial number you want to order: 3
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
*** **** ****
*** ***********
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
Exiting
Do you want the main menu to be displayed again?
(Enter Yes if you want to display the menu again)
No
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
*** **** ****
*** ***********
----Non Vegetarian----
S.No. Name Price
1. Paninos
************************
1. Country Road Chicken Panino 125.0
2. Chicken Salami Panino 125.0
3. Openhouse Chicken Panino 150.0
2. Baguettes
************************
1. Traditional Italian Baguette 200.0
2. Hot Dog Baguette 250.0
3. Wraps
************************
1. Lebanese Chicken Wrap 120.0
2. Non-Veg club wrap 120.0
3. Teriyaki Chicken Wrap 130.0
4. Crepes
************************
1. TandooriChicken Crepes 90.0
2. Maritain Chicken Crepes 90.0
3. Mexican Crepes 75.0
5. Sandwiches
************************
1. Country Road Sandwich 100.0
2. Roasted Chicken Sandwich 120.0
3. Tandoori Chicken Sandwich 125.0
6. Salads
************************
1. Morroccan Chicken Salad 50.0
2. Tandoori Chicken Salad 60.0
7. Mexican Bells
************************
1. Cheesy Bean Burrito 120.0
2. Chicken Burritp 100.0
3. Original Taco 125.0
4. Taco Supreme 140.0
5. Nachos 135.0
6. Nachos Bellgrande 100.0
Do you want the main menu to be displayed again?
(Enter Yes if you want to display the menu again)
yes
*** *** ************ *** *********** *********** *** ***
************
*** *** ************ *** *********** **** **** ***** *****
************
*** ** *** ** **** *** **** *** *** *********** ** ****
*** ** *** ** **** *** **** *** *** *********** ** ****
************ ************ *********** *********** **** **** *** ***
************
***** ****** ************ *********** *********** *********** *** ***
************
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
*** **** ****
*** ***********
1. Paninos
2. Baguettes
3. Wraps
4. Crepes
5. Non-Veg Sandwiches
6. Non-Veg Mexican Bells
Enter the serial number you want to order:1
*********** ***********
*********** **** ****
*** *** ***
*** *** ***
*** **** ****
*** ***********
*********** ***********
Exiting
Do you want the main menu to be displayed again?
(Enter Yes if you want to display the menu again)
No
Arrays
Datatype Array Description
String HotChocolate[] To store items under Hot
Chocolate Category
double p1[] Price of elements of each Hot
Chocolate
String Choctails[] To store items under Choctails
Category
double p2[] Price of elements of each
Choctail
String ChocoShakes[] To store items under Choco
Shakes Category
double p3[] Price of elements of each
ChocoShake
String HotCoffee[] To store items under Hot Coffee
Category
double p4[] Price of elements of each Hot
Coffee
String FrozenCoffee[] To store items under Frozen
Coffee Category
double p5[] Price of elements of each Frozen
Coffee
String HotTea[] To store items under Hot Tea
Category
double p6[] Price of elements of each Hot
Tea
String IcedTea[] To store items under Iced Tea
Category
double p7[] Price of elements of each Iced
Tea
String Chillers[] To store items under Chillers
Category
double p8[] Price of elements of each Chiller
String Coolers[] To store items under Coolers
Category
double p9[] Price of elements of each Cooler
String Mocktails_Granites[] To store items under Granites
Category
double p10[] Price of elements of each
Mocktail Granite
Data Members
Datatype Variable Description
int ch To accept User’s Choice
int qty To store the quantity
String yes To accept if the user wants to
display the main menu again
int n To store the serial number
int tax To store the amount of tax
double amt To store the bill amount
int item To accept the item number
Local Variables
Datatype Variable Description
int menu To accept the type of menu (veg
or non-veg)
int i Loop counter initializer for all
the loops
int ask To ask if the User wants to order
Veg or Non-Veg
int x To keep track of the price of the
array
double price To store the price of the ordered
item
I have got a lot to learn from the project as it has not only brushed my
basics, but has also helped me to avoid the common mistakes I would
probably do in the future and the usual habit of forgetting the semi-colons
and the curly braces are now done away with.
The project can be further expanded by increasing the number of
items available and by providing more options to the customers. For
example, more functions can be made to check if the item which the user
enters is available or not (which involves searching), or to ask the
Customer for home delivery, and also to take the Customer feedback.
Therefore, the project could have been expanded in various other ways.
Using Applets and Application Programming Interface (API), forms
could be prepared to display the menu and the presentation could have
been made much better.
In the above Project on the Billing System of Chocolate Room, the items to
be displayed in the menu card have been taken from the following
websites:
www.thechocolateroomindia.com
www.thechocolateroombrooklyn.com
www.thechocolateroom.com
Also, the pictures used have been taken from the above sites along with,
www.google.co.in
The Program has been written keeping in mind the various concepts and
principles explained in the book:
Total Computer Applications (ICSE class 10)
Morning Star
Fifth Revised Edition: 2010