0% found this document useful (0 votes)
6 views54 pages

Grocery App Algorithm and Code

Uploaded by

Adiraj K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views54 pages

Grocery App Algorithm and Code

Uploaded by

Adiraj K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Index

1. Algorithm
…………………………………………….. 2
2. Flow Chart
……………………………………………. 3-4
3. Source Code
…………………………………………... 5-49
4. Output
……………………………………. 50- 52
5. Data Description Table
………………………………... 53-54

1
Algorithm

Step 1: Start
Step 2: Declaring variables
String choice="Y";
int m_ch, sc_ch1, ch1, qnt, amt=0, ch2, qnt2, ch3, qnt3, ch4, qnt4, ch5,
qnt5,totamt=0,sc_ch2, sc_ch3, sc_ch4, sc_ch5, sc_ch6,sc_ch7, sc_ch8,
sc_ch9, sc_ch10;
double gst,tgst;
Step 3: Select a main category
Step 4: Select a sub-category from the main category chosen
Step 5: Select the item
Step 6: Select the quantity
Step 7: Enter ‘Y’ to add more to basket or ‘N’ to exit and print bill
Step 8: Bill is printed with gst
Step 9: Stop

2
Flowchart

3
4
Source Code
import [Link].*;
class demo
{
public static void main (String args[])
{
Scanner in=new Scanner ([Link]);
String choice="Y";
int m_ch,sc_ch1,ch1,qnt,amt=0,ch2,qnt2,ch3,qnt3,ch4,qnt4,ch5,qnt5,totamt=0;
int sc_ch2, sc_ch3, sc_ch4, sc_ch5, sc_ch6,sc_ch7, sc_ch8, sc_ch9, sc_ch10;
double gst,tgst;
[Link]("===== Welcome to our Grocery App =====");
while ([Link]("Y"))
{
[Link]("Please select a main category: ");
[Link]("1. Fruits");
[Link]("2. Vegetables");
[Link]("3. Dairy products");
[Link]("4. Meat and poultry");
[Link]("5. Bakery");
[Link]("6. Beverages");
[Link]("7. Snacks");
[Link]("8. Canned and packaged foods");
[Link]("9. Personal care");
[Link]("10. Household essentials");
m_ch=[Link]();
switch(m_ch)
{
case 1:
[Link]("===== Fruits =====");

5
[Link]("1. Citrus fruits");
[Link]("2. Berries");
[Link]("3. Tropical fruits");
[Link]("4. Melons");
[Link]("5. Stone fruits");
[Link]("Please select a subcategory: ");
sc_ch1=[Link]();
switch (sc_ch1)
{
case 1:
[Link]("1. Oranges: Rs. 80/kg");
[Link]("2. Lemons: Rs. 80/kg");
[Link]("3. Grapefruits: Rs. 90/kg");
[Link]("4. Lime: Rs. 90/kg");
[Link]("5. Mandarian: Rs. 100/kg");
[Link]("6. Tangerine: Rs. 90/kg");
[Link]("7. Pomelo: Rs. 80/kg");
[Link]("8. Yuzu: Rs. 120/kg");
[Link]("9. Bergamot: Rs. 120/kg");
[Link]("10. Citron: Rs. 100/kg");
[Link]("Enter your choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==2||ch1==7)
amt= qnt*80;
if(ch1==3||ch1==4||ch1==6)
amt=qnt*90;
if(ch1==5||ch1==10)
amt=qnt*100;
if(ch1==8||ch1==9)
amt=qnt*12;

6
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. Strawberries: Rs. 180/kg");
[Link]("2. Raspberries: Rs. 250/kg");
[Link]("3. Blackberries: Rs. 180/kg");
[Link]("4. Cranberries: Rs. 250/kg");
[Link]("5. Gooseberries: Rs. 180/kg");
[Link]("6. Huckleberries: Rs. 250/kg");
[Link]("7. Elderberries: Rs. 350/kg");
[Link]("8. Boysenberries: Rs. 250/kg");
[Link]("9. Mulberries: Rs. 180/kg");
[Link]("10. Cherries: Rs. 350/kg");
[Link]("Enter your choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==1||ch2==3||ch2==5||ch2==9)
amt=qnt2*180;
if(ch2==2||ch2==4||ch2==6||ch2==8)
amt=qnt2*250;
if(ch2==7||ch2==10)
amt=qnt2*350;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Mangoes: Rs. 100/kg");
[Link]("2. Pineapples: Rs. 50 each");

7
[Link]("3. Papayas: Rs. 50/kg");
[Link]("4. Dragon Fruits: Rs. 150/kg");
[Link]("5. Passion Fruits: Rs. 200/kg");
[Link]("6. Kiwis: Rs. 100/dozen");
[Link]("7. Guavas: Rs. 50/kg");
[Link]("8. Pineapple Apples: Rs. 100/kg");
[Link]("9. Starfruits: Rs. 100/kg");
[Link]("10. Jackfruits: Rs. 50/kg");
[Link]("Enter your choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==2||ch3==3||ch3==7||ch3==10)
amt= qnt3*50;
if(ch3==4)
amt= qnt3*150;
if(ch3==1||ch3==6||ch3==8||ch3==9)
amt= qnt3*100;
if(ch3==5)
amt= qnt3*200;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Watermelons: Rs. 40/kg");
[Link]("2. Cantaloupes: Rs. 40/kg");
[Link]("3. Honeydews: Rs. 40/kg");
[Link]("4. Galia Melons: Rs. 60/kg");
[Link]("5. Canary Melons: Rs. 60/kg");
[Link]("6. Charentais Melons: Rs. 60/kg");
[Link]("7. Casaba Melons: Rs. 100/kg");

8
[Link]("8. Persian Melons: Rs. 100/kg");
[Link]("9. Piel de Sapo Melons: Rs. 100/kg");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==2||ch4==3)
amt= qnt4*40;
if(ch4==4||ch4==5||ch4==6)
amt= qnt4*60;
if(ch4==7||ch4==8||ch4==9)
amt= qnt4*100;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Price of Peaches: Rs. 100/kg");
[Link]("2. Price of Nectarines: Rs. 100/kg");
[Link]("3. Price of Plums: Rs. 80/kg");
[Link]("4. Price of Apricots: Rs. 150/kg");
[Link]("5. Price of Cherries: Rs. 150/kg ");
[Link]("6. Price of Pears: Rs. 80/kg");
[Link]("7. Price of Persimmons: Rs. 80/kg");
[Link]("8. Price of Mangoes: Rs. 120/kg");
[Link]("9. Price of Dates: Rs. 120/kg ");
[Link]("[Link] of Lychees: Rs. 100/kg ");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==2||ch5==10)

9
amt= qnt5*100;
if(ch5==3||ch5==6||ch5==7)
amt= qnt5*80;
if(ch5==4||ch5==5)
amt= qnt5*150;
if(ch5==8||ch5==9)
amt= qnt5*120;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 2:
[Link]("===== Vegetables =====");
[Link]("1. Leafy greens");
[Link]("2. Root vegetables");
[Link]("3. Cruciferous vegetables");
[Link]("4. Squash");
[Link]("5. Alliums");
[Link]("Please select a subcategory: ");
sc_ch2=[Link]();
switch (sc_ch2)
{
case 1:
[Link]("1. Price of Spinach: Rs. 40/kg");
[Link]("2. Price of Arugula: Rs. 30/kg");
[Link]("3. Price of Swiss Chard: Rs. 40/kg");
[Link]("4. Price of Collard Greens: Rs. 60/kg");
[Link]("5. Price of Bok Choy: Rs.30/kg");

10
[Link]("6. Price of Watercress: Rs. 60/kg");
[Link]("7. Price of Mustard Greens: Rs. 40/kg");
[Link]("8. Price of Endive: Rs. 30/kg");
[Link]("9. Price of Kale: Rs. 60/kg");
[Link]("10. Price of Cilantro: Rs. 60/kg");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==3||ch1==7)
amt= qnt*40;
if(ch1==2||ch1==5||ch1==8)
amt= qnt*30;
if(ch1==4||ch1==6||ch1==9||ch1==10)
amt= qnt*60;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. Price of Carrots: Rs. 80/kg");
[Link]("2. Price of Potatoes: Rs. 30/kg");
[Link]("3. Price of Sweet Potatoes: Rs. 60/kg");
[Link]("4. Price of Radishes: Rs. 80/kg");
[Link]("5. Price of Turnips: Rs. 60/kg");
[Link]("6. rice of Beets: Rs. 80/kg");
[Link]("7. Price of Parsnips: Rs. 80/kg");
[Link]("8. Price of Rutabagas: Rs. 60/kg");
[Link]("9. Price of Onions: Rs. 30/kg");
[Link]("10. Price of Spring Onion: Rs. 30/kg");
[Link]("Enter you choice");
ch2=[Link]();

11
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==2||ch2==9||ch2==10)
amt= qnt2*30;
if(ch2==1||ch2==4||ch2==6||ch2==7)
amt= qnt2*80;
if(ch2==3||ch2==5||ch2==8)
amt= qnt2*60;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Price of Broccoli: Rs. 80/kg");
[Link]("2. Price of Cauliflower: Rs. 60/kg");
[Link]("3. Price of Cabbage: Rs. 40/kg");
[Link]("4. rice of Brussels sprouts: Rs. 80/kg");
[Link]("5. Price of Bok choy: Rs. 80/kg");
[Link]("6. Price of Kale: Rs. 60/kg");
[Link]("7. Rice of Collard greens: Rs. 80/kg");
[Link]("8. Price of Arugula: Rs. 60/kg");
[Link]("9. Price of Radish: Rs. 40/kg");
[Link]("10. Price of Turnip: Rs. 40/kg");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==4||ch3==5||ch3==7)
amt= qnt3*80;
if(ch3==2||ch3==6||ch3==8)
amt= qnt3*60;
if(ch3==3||ch3==9||ch3==10)

12
amt= qnt3*40;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Price of Zucchini: Rs. 45/kg");
[Link]("2. Price of Pumpkins: Rs. 45/kg");
[Link]("3. Price of Acorn Squash: Rs. 45/kg");
[Link]("4. Price of Spaghetti Squash: Rs. 50/kg");
[Link]("5. Price of Delicata Squash: Rs. 60/kg");
[Link]("6. Price of Kabocha Squash: Rs. 50/kg");
[Link]("7. Price of Hubbard Squash: Rs. 60/kg");
[Link]("8. Price of Butternut Squash: Rs. 50/kg");
[Link]("9. Price of Spaghetti Squash: Rs. 50/kg");
[Link]("10. Price of Pattypan squash: Rs. 60/kg");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==2||ch4==3)
amt= qnt4*45;
if(ch4==4||ch4==6||ch4==8||ch4==9)
amt= qnt4* 50;
if(ch4==5||ch4==7||ch4==10)
amt= qnt4*60;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Price of Garlic: Rs. 150/kg");

13
[Link]("2. Price of Onions: Rs. 40/kg");
[Link]("3. Price of Shallots: Rs. 150/kg");
[Link]("4. Price of Leeks: Rs. 80/kg");
[Link]("5. Price of Scallions: Rs. 80/kg");
[Link]("6. Price of Chives: Rs. 150/kg");
[Link]("7. Price of Red Onion: Rs. 40/kg");
[Link]("8. Price of Yellow Onion: Rs. 40/kg");
[Link]("9. Price of Spring Onion: Rs. 80/kg");
[Link]("10. Price of Ramsons: Rs. 80/kg");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==3||ch5==6)
amt= qnt5 *150;
if(ch5==2||ch5==7||ch5==8)
amt= qnt5*40;
if(ch5==4||ch5==5||ch5==9||ch5==10)
amt= qnt5*80;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 3:
[Link]("===== Dairy Products =====");
[Link]("1. Milk");
[Link]("2. Cheese");
[Link]("3. Yogurt");

14
[Link]("4. Ice Cream");
[Link]("5. Butter");
[Link]("Please select a subcategory: ");
sc_ch3=[Link]();
switch(sc_ch3)
{
case 1:
[Link]("1. Fresh Milk: Rs. 30/Ltr");
[Link]("2. Buttermilk: Rs. 30/Ltr");
[Link]("3. Flavored Milk: Rs. 40Ltr");
[Link]("4. Organic Milk: Rs. 40/Ltr");
[Link]("5. Almond Milk: Rs. 100/Ltr");
[Link]("6. Soy Milk: Rs. 100/Ltr");
[Link]("7. Cashew Milk: Rs. 100/Ltr");
[Link]("8. Coconut Milk: Rs. 100/Ltr");
[Link]("9. Oat Milk: Rs. 40/Ltr");
[Link]("10. Tonned Milke: Rs. 30/Ltr");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==2||ch1==10)
amt=qnt* 30;
if(ch1==3||ch1==4||ch1==9)
amt=qnt* 40;
if(ch1==5||ch1==6||ch1==7||ch1==8)
amt= qnt* 100;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:

15
[Link]("1. Cheddar Cheese: Rs. 250/kg");
[Link]("2. Parmesan Cheese: Rs. 250/kg");
[Link]("3. Mozzarella Cheese: Rs. 350/kg");
[Link]("4. Swiss Cheese: Rs. 250/kg");
[Link]("5. Brie Cheese: Rs. 350/kg");
[Link]("6. Feta Cheese: Rs. 200/kg");
[Link]("7. Gouda Cheese: Rs. 200/kg");
[Link]("8. Blue Cheese: Rs. 350/kg");
[Link]("9. Camembert Cheese: Rs. 450/kg");
[Link]("10. Goat Cheese: Rs. 450/kg");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==1||ch2==2||ch2==4)
amt= qnt2*250;
if(ch2==3||ch2==5||ch2==8)
amt= qnt2* 350;
if(ch2==6||ch2==7)
amt= qnt2* 200;
if(ch2==9||ch2==10)
amt= qnt2* 450;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Plain Yogurt: Rs. 45");
[Link]("2. Greek Yogurt: Rs. 45");
[Link]("3. Strawberry Yogurt: Rs. 50");
[Link]("4. Blueberry Yogurt: Rs. 50");
[Link]("5. Vanilla Yogurt: Rs. 45");

16
[Link]("6. Honey Yogurt: Rs. 55");
[Link]("7. Coconut Yogurt: Rs. 70");
[Link]("8. Almond Yogurt: Rs. 70");
[Link]("9. Raspberry Yogurt: Rs. 55");
[Link]("10. Mixed Berry Yogurt: Rs. 55");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==2||ch3==5)
amt= qnt3*45;
if(ch3==3||ch3==4)
amt= qnt3*50;
if(ch3==6||ch3==9||ch3==10)
amt= qnt3*55;
if(ch3==7||ch3==8)
amt= qnt3*70;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Vanilla Ice Cream: Rs. 30");
[Link]("2. Chocolate Ice Cream: Rs. 40");
[Link]("3. Strawberry Ice Cream: Rs. 30");
[Link]("4. Mint Chocolate Chip Ice Cream: Rs. 55");
[Link]("5. Butter Pecan Ice Cream: Rs. 50");
[Link]("6. Cookie Dough Ice Cream: Rs. 50");
[Link]("7. Rocky Road Ice Cream: Rs. 55");
[Link]("8. Coffee Ice Cream: Rs. 40");
[Link]("9. Neapolitan Ice Cream: Rs. 55");
[Link]("10. Salted Caramel Ice Cream: Rs. 50");

17
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==3)
amt= qnt4*30;
if(ch4==2||ch4==8)
amt= qnt4*40;
if(ch4==4||ch4==7||ch4==9)
amt= qnt4*55;
if(ch4==5||ch4==6||ch4==10)
amt= qnt4*50;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Salted Butter: Rs. 400/kg");
[Link]("2. Unsalted Butter: Rs. 450/kg");
[Link]("3. Clarified Butter: Rs. 400/kg");
[Link]("4. Whipped Butter: Rs. 600/kg");
[Link]("5. Garlic Butter: Rs. 450/kg");
[Link]("6. Honey Butter: Rs. 600/kg");
[Link]("7. Truffle Butter: Rs. 700/kg");
[Link]("8. Cinnamon Butter: Rs. 600/kg");
[Link]("9. Maple Butter: Rs. 700/kg");
[Link]("10. Pumpkin Spice Butter: Rs. 700/kg");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==3)

18
amt= qnt5*400;
if(ch5==2||ch5==5)
amt= qnt5*450;
if(ch5==4||ch5==6||ch5==8)
amt= qnt5*600;
if(ch5==7||ch5==9||ch5==10)
amt= qnt5*700;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 4:
[Link]("===== Meat and Poultry =====");
[Link]("[Link] Meat");
[Link]("[Link]");
[Link]("[Link]");
[Link]("[Link] Meat");
[Link]("[Link]");
[Link]("Please select a subcategory: ");
sc_ch4=[Link]();
switch (sc_ch4)
{
case 1:
[Link]("1. : Rs. 100");
[Link]("2. Beef: Rs. 200");
[Link]("3. : Rs. 150");
[Link]("4. Goat: Rs. 200");
[Link]("5. Venison: Rs. 100");

19
[Link]("6. Veal: Rs. 200");
[Link]("7. Mutton: Rs. 100");
[Link]("8. Buff: Rs. 150");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==5||ch1==7)
amt=qnt *100;
if(ch1==2||ch1==4||ch1==6)
amt=qnt *200;
if(ch1==3||ch1==8)
amt=qnt *150;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. : Rs. 100");
[Link]("2. Turkey: Rs. 150");
[Link]("3. Duck: Rs. 130");
[Link]("4. Goose: Rs. 130");
[Link]("5. Guinea Fowl: Rs. 100");
[Link]("6. Japanese Quail: Rs. 150");
[Link]("7. Ham: Rs. 200");
[Link]("8. Emu: Rs. 200");
[Link]("9. Partridge: Rs. 150");
[Link]("10. Loin: Rs. 200");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();

20
if(ch2==1||ch2==5)
amt= qnt2*100;
if(ch2==2||ch2==6||ch2==9)
amt= qnt2*100;
if(ch2==3||ch2==4)
amt= qnt2*100;
if(ch2==7||ch2==8||ch2==10)
amt= qnt2*100;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Alaskan Salmon: Rs. 120");
[Link]("2. Cod: Rs. 150");
[Link]("3. Mackerel: Rs. 120");
[Link]("4. Sardines: Rs. 120");
[Link]("5. Tuna : Rs. 150");
[Link]("6. Surmai: Rs. 150");
[Link]("7. Rohu : Rs. 200");
[Link]("8. Katla: Rs. 200");
[Link]("9. Pompfret: Rs. 150");
[Link]("10. Bhangra: Rs. 200");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==3||ch3==4)
amt= qnt3*120;
if(ch3==2||ch3==5||ch3==6||ch3==9)
amt= qnt3* 150;
if(ch3==7||ch3==8||ch3==10)

21
amt= qnt3*200;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Ham: Rs. 180");
[Link]("2. Sausage: Rs. 220");
[Link]("3. Cream n' Onion Sausage: Rs. 180");
[Link]("4. Pepperoni: Rs. 220");
[Link]("5. Salami: Rs. 180");
[Link]("6. Beef Jerky: Rs. 180");
[Link]("7. Bacon: Rs. 220");
[Link]("8. Corned Beef: Rs. 220");
[Link]("9. Chicken Nuggets: Rs. 180");
[Link]("10. Canned Sardines: Rs. 180");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==3||ch4==5||ch4==6||ch4==9||ch4==10)
amt= qnt4*180;
if(ch4==2||ch4==4||ch4==7||ch4==6)
amt= qnt4*220;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Ground Turkey: Rs. 120");
[Link]("2. Turkey Breast: Rs. 150");
[Link]("3. Turkey Wings: Rs. 120");

22
[Link]("4. Turkey Thighs: Rs. 120");
[Link]("5. Turkey Drumsticks: Rs. 100");
[Link]("6. Turkey Sausages: Rs. 100");
[Link]("7. Turkey Burger Patties: Rs. 100");
[Link]("8. Turkey Meatballs: Rs. 150");
[Link]("9. Turkey Bacon: Rs. 100");
[Link]("10. Ground Turkey Breast: Rs. 100");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==3||ch5==4)
amt= qnt5*120;
if(ch5==2||ch5==8)
amt= qnt5*150;
if(ch5==5||ch5==6||ch5==7||ch5==9||ch5==10)
amt= qnt5*100;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 5:
[Link]("===== Bakery =====");
[Link]("[Link]");
[Link]("[Link] & Buns");
[Link]("[Link]");
[Link]("[Link]");
[Link]("[Link]");

23
[Link]("Please select a subcategory: ");
sc_ch5=[Link]();
switch (sc_ch5)
{
case 1:
[Link]("[Link] Chocolate Cake 600 Rs.");
[Link]("[Link] Candy Cake 600 Rs.");
[Link]("[Link] Kat Cake 650 Rs.");
[Link]("[Link] Cheesecake 650 Rs.");
[Link]("[Link] Mousse Royale 800 Rs.");
[Link]("[Link] n' Cream 650 Rs.");
[Link]("[Link] Almond Fudge 800 Rs.");
[Link]("[Link] Forest 500 Rs.");
[Link]("[Link] Forest 500 Rs.");
[Link]("[Link] Cake 550 Rs.");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==8||ch1==10)
amt= qnt*50;
if(ch1==2||ch1==3)
amt= qnt*70;
if(ch1==4||ch1==5||ch1==6)
amt= qnt*100;
if(ch1==7||ch1==9)
amt= qnt*150;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:

24
[Link]("Welcome to Breads & Buns");
[Link]("[Link] Bread 50 Rs.");
[Link]("[Link] Bread 50 Rs.");
[Link]("[Link] Bun 50 Rs.");
[Link]("[Link] 30 Rs.");
[Link]("[Link] Base 30 Rs.");
[Link]("[Link] Bread 50 Rs.");
[Link]("[Link] Wheat Bread 80 Rs.");
[Link]("[Link] Grain Bread 80 Rs.");
[Link]("[Link] Bun 50 Rs.");
[Link]("[Link] Bread 80 Rs.");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==1||ch2==7||ch2==8||ch2==9)
amt= qnt2*150;
if(ch2==2||ch2==5||ch2==6||ch2==10)
amt= qnt2*120;
if(ch2==3||ch2==4)
amt= qnt2*80;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("Welcome to Biscuits & Cookies ");
[Link]("[Link] Cookies 150 Rs.");
[Link]("[Link] Cookies 200 Rs.");
[Link]("[Link] Cookies 150 Rs.");
[Link]("[Link] Fruity Biscuits 150 Rs.");
[Link]("[Link] Cookies 100 Rs.");

25
[Link]("[Link] Biscuits 100 Rs.");
[Link]("[Link] Cookies 150 Rs.");
[Link]("[Link] Butter Cookies 100 Rs.");
[Link]("[Link] Cookies 150 Rs.");
[Link]("[Link] Bana Cookies 200 Rs.");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==4||ch3==7||ch3==10)
amt= qnt3*220;
if(ch3==2||ch3==5||ch3==8)
amt= qnt3*240;
if(ch3==3||ch3==6||ch3==9)
amt= qnt3*280;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("[Link] Truffle 150 Rs.");
[Link]("[Link] 100 Rs.");
[Link]("[Link] Velvet 150 Rs.");
[Link]("[Link] 100 Rs.");
[Link]("[Link] Kat 200 Rs.");
[Link]("[Link] 200 Rs.");
[Link]("[Link] Rocher 280 Rs.");
[Link]("[Link] Walnut 150 Rs.");
[Link]("[Link] 100 Rs.");
[Link]("[Link] 100 Rs.");
[Link]("10. Butter Cookies: Rs. 25");
[Link]("Enter you choice");

26
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==4||ch4==7)
amt= qnt4*20;
if(ch4==2||ch4==5||ch4==10)
amt= qnt4*25;
if(ch4==3||ch4==6||ch4==8||ch4==9)
amt= qnt4*40;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("[Link] 200 Rs.");
[Link]("[Link] Mousse 170 Rs.");
[Link]("[Link] 200 Rs.");
[Link]("[Link] 200 Rs.");
[Link]("[Link] Butter 170 Rs.");
[Link]("[Link] 170 Rs.");
[Link]("[Link] n' Cream 220 Rs.");
[Link]("[Link] Cheesecake 220 Rs.");
[Link]("[Link] Caramel 250 Rs.");
[Link]("[Link] Cheesecake 250 Rs.");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
amt=qnt5*100;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();

27
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 6:
[Link]("===== Beverages =====");
[Link]("1. Soft Drinks");
[Link]("2. Juice");
[Link]("3. Energy Drinks");
[Link]("4. Coffee");
[Link]("5. Tea ");
[Link]("Please select a subcategory: ");
sc_ch6=[Link]();
switch (sc_ch6)
{
case 1:
[Link]("1. Cola: Rs. 20");
[Link]("2. Lemon-Lime Soda: Rs. 20");
[Link]("3. Orange Soda: Rs. 20");
[Link]("4. Ginger Ale: Rs. 30");
[Link]("5. Root Beer: Rs. 30");
[Link]("6. Iced Tea: Rs. 30");
[Link]("7. Fruit Punch: Rs. 40");
[Link]("8. Energy Drink: Rs. 40");
[Link]("9. Lemonade: Rs. 40");
[Link]("10. Sparkling Water: Rs. 20");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==2||ch1==3||ch1==10)

28
amt= qnt*20;
if(ch1==4||ch1==5||ch1==6)
amt= qnt*30;
if(ch1==7||ch1==8||ch1==9)
amt= qnt*40;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. Orange Juice: Rs. 35");
[Link]("2. Apple Juice: Rs. 35");
[Link]("3. Cranberry Juice: Rs. 35");
[Link]("4. Grapefruit Juice: Rs. 35");
[Link]("5. Tomato Juice: Rs. 35");
[Link]("6. Pineapple Juice: Rs. 35");
[Link]("7. Mango Juice: Rs. 35");
[Link]("8. Pomegranate Juice: Rs. 35");
[Link]("9. Cucumber Juice: Rs. 35");
[Link]("10. Watermelon Juice: Rs. 35");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
amt= qnt2*35;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Red Bull Energy Drink: Rs. 120");
[Link]("2. Monster Energy Drink: Rs. 80");

29
[Link]("3. Rockstar Energy Drink: Rs. 80");
[Link]("4. Bang Energy Drink: Rs. 60");
[Link]("5. NOS Energy Drink: Rs. 60");
[Link]("6. Full Throttle Energy Drink: Rs. 80");
[Link]("7. Amp Energy Drink: Rs. 120");
[Link]("8. 5-hour Energy Drink: Rs. 60");
[Link]("9. Guru Energy Drink: Rs. 60");
[Link]("10. XS Energy Drink: Rs. 120");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==7||ch3==10)
amt= qnt3*120;
if(ch3==2||ch3==3||ch3==6)
amt= qnt3*80;
if(ch3==4||ch3==5||ch3==8||ch3==9)
amt= qnt3*60;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Espresso: Rs. 120");
[Link]("2. Cappuccino: Rs. 140");
[Link]("3. Latte: Rs. 160");
[Link]("4. Americano: Rs. 140");
[Link]("5. Mocha: Rs. 160");
[Link]("6. Macchiato: Rs. 180");
[Link]("7. Flat White: Rs. 120");
[Link]("8. Irish Coffee: Rs. 180");
[Link]("9. Vienna Coffee: Rs. 180");

30
[Link]("10. Cold Coffee: Rs. 160");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==7)
amt= qnt4*120;
if(ch4==2||ch4==4)
amt= qnt4*140;
if(ch4==3||ch4==5||ch4==10)
amt= qnt4*160;
if(ch4==6||ch4==8||ch4==9)
amt= qnt4*180;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Green Tea: Rs. 30");
[Link]("2. Black Tea: Rs. 30");
[Link]("3. Chai: Rs. 30");
[Link]("4. Earl Grey Tea: Rs. 35");
[Link]("5. Peppermint Tea: Rs. 35");
[Link]("6. Lemon Tea: Rs. 35");
[Link]("7. Rooibos Tea: Rs. 40");
[Link]("8. Oolong Tea: Rs. 40");
[Link]("9. Hibiscus Tea: Rs. 35");
[Link]("10. Jasmine Tea: Rs. 35");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();

31
if(ch5==1||ch5==2||ch5==3)
amt= qnt5*30;
if(ch5==4||ch5==5||ch5==6||ch5==9||ch5==10)
amt= qnt5*35;
if(ch5==7||ch5==8)
amt= qnt5*40;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 7:
[Link]("===== Snacks =====");
[Link]("1. Chips and Crackers");
[Link]("2. Energy Bars");
[Link]("3. Candy and Chocolate");
[Link]("4. Popcorn");
[Link]("5. Dried Fruits ");
[Link]("Please select a subcategory: ");
sc_ch7=[Link]();
switch (sc_ch7)
{
case 1:
[Link]("1. Potato Chips: Rs. 20");
[Link]("2. Tortilla Chips: Rs. 35");
[Link]("3. Popcorn: Rs. 20");
[Link]("4. Pretzels: Rs. 35");
[Link]("5. Cheese Crackers: Rs. 30");
[Link]("6. Rice Crackers: Rs. 30");

32
[Link]("7. Saltine Crackers: Rs. 20");
[Link]("8. Wheat Thins: Rs. 35");
[Link]("9. Corn Chips: Rs. 30");
[Link]("10. Pita Chips: Rs. 35");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==3||ch1==7)
amt= qnt*20;
if(ch1==2||ch1==4||ch1==8||ch1==10)
amt= qnt*35;
if(ch1==5||ch1==6||ch1==9)
amt= qnt*30;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. Clif Bar: Rs. 35");
[Link]("2. Luna Bar: Rs. 35");
[Link]("3. Kind Bar: Rs. 35");
[Link]("4. RXBAR: Rs. 35");
[Link]("5. Quest Bar: Rs. 35");
[Link]("6. PowerBar: Rs. 35");
[Link]("7. Gatorade Protein Bar: Rs. 35");
[Link]("8. ThinkThin Bar: Rs. 35");
[Link]("9. Nature Valley Bar: Rs. 35");
[Link]("10. Kashi Bar: Rs. 35");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");

33
qnt2=[Link]();
amt= qnt2*35;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. M&M's Candy: Rs. 50");
[Link]("2. Kit Kat Chocolate Bar: Rs. 25");
[Link]("3. Reese's Peanut Butter Cups: Rs. 40");
[Link]("4. Twix Chocolate Bar: Rs. 50");
[Link]("5. Skittles Candy: Rs. 40");
[Link]("6. Hershey's Chocolate Bar: Rs. 25");
[Link]("7. Haribo Gummy Bears: Rs. 40");
[Link]("8. Milky Way Chocolate Bar: Rs. 25");
[Link]("9. Starburst Candy: Rs. 50");
[Link]("10. Munch Bar: Rs. 25");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==4||ch3==9)
amt= qnt3*50;
if(ch3==2||ch3==6||ch3==8||ch3==10)
amt= qnt3*25;
if(ch3==3||ch3==5||ch3==7)
amt= qnt3*40;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:

34
[Link]("1. Butter Popcorn: Rs. 35");
[Link]("2. Caramel Popcorn: Rs. 45");
[Link]("3. Cheddar Popcorn: Rs. 45");
[Link]("4. Kettle Corn: Rs. 35");
[Link]("5. White Cheddar Popcorn: Rs. 55");
[Link]("6. Movie Theater Popcorn: Rs. 55");
[Link]("7. Garlic Parmesan Popcorn: Rs. 45");
[Link]("8. Buffalo Ranch Popcorn: Rs. 55");
[Link]("9. Jalapeno Popcorn: Rs. 45");
[Link]("10. Sour Cream & Onion Popcorn: Rs. 35");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==4||ch4==10)
amt=qnt4*35;
if(ch4==2||ch4==3||ch4==7||ch4==9)
amt=qnt4*45;
if(ch4==5||ch4==6||ch4==8)
amt=qnt4*55;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Raisins: Rs. 450");
[Link]("2. Apricots: Rs. 500");
[Link]("3. Dates: Rs. 400");
[Link]("4. Figs: Rs. 400");
[Link]("5. Prunes: Rs. 500");
[Link]("6. Walnuts: Rs. 550");
[Link]("7. Almonds: Rs. 550");

35
[Link]("8. Pinea: Rs. 500");
[Link]("9. Kashew: Rs. 450");
[Link]("10. Pistachio: Rs. 550");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==9)
amt= qnt5*450;
if(ch5==2||ch5==5||ch5==8)
amt= qnt5*500;
if(ch5==3||ch5==4)
amt= qnt5*400;
if(ch5==6||ch5==7||ch5==550)
amt= qnt5*550;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 8:
[Link]("===== Canned and packaged foods =====");
[Link]("1. Canned fruits and vegetables");
[Link]("2. Cereals and breakfast bars");
[Link]("3. Nuts and seeds");
[Link]("4. Baked beans and other legumes");
[Link]("5. Pasta and pasta sauce ");
[Link]("Please select a subcategory: ");
sc_ch8=[Link]();

36
switch (sc_ch8)
{
case 1:
[Link]("1. Beans: Rs. 100");
[Link]("2. Beets: Rs. 120");
[Link]("3. Carrots: Rs. 130");
[Link]("4. Corn: Rs. 100");
[Link]("5. Peans: Rs. 120");
[Link]("6. Green beans: Rs. 130");
[Link]("7. Tomatoes: Rs. 100");
[Link]("8. Carrots: Rs. 120");
[Link]("9. Corn kernels: Rs. 130");
[Link]("10. Mushrooms: Rs. 100");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==4||ch1==7||ch1==10)
amt= qnt*100;
if(ch1==2||ch1==5||ch1==8)
amt= qnt*120;
if(ch1==3||ch1==6||ch1==9)
amt= qnt*130;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. Rice: Rs. 60");
[Link]("2. Barley: Rs. 80");
[Link]("3. Rye: Rs. 100");
[Link]("4. Corn: Rs. 60");

37
[Link]("5. Wheat: Rs. 80");
[Link]("6. Birdseed: Rs. 100");
[Link]("7. Sorghum: Rs. 60");
[Link]("8. Triticale: Rs. 80");
[Link]("9. Burgundy wheat: Rs. 100");
[Link]("10. Spelt: Rs. 60");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==1||ch2==4||ch2==7||ch2==10)
amt= qnt2*60;
if(ch2==2||ch2==5||ch2==8)
amt= qnt2*80;
if(ch2==3||ch2==6||ch2==9)
amt= qnt2*100;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Cashew: Rs. 450");
[Link]("2. Pistachios: Rs. 500");
[Link]("3. Pecans: Rs. 550");
[Link]("4. Almonds: Rs. 550");
[Link]("5. Macadamia nuts: Rs. 500");
[Link]("6. Brazil nuts: Rs. 500");
[Link]("7. Peanuts: Rs. 450");
[Link]("8. Walnuts: Rs. 450");
[Link]("9. Hazelnuts: Rs. 550");
[Link]("10. Chestnuts: Rs. 500");
[Link]("Enter you choice");

38
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==7||ch3==8)
amt= qnt3*450;
if(ch3==2||ch3==5||ch3==6||ch3==10)
amt= qnt3*500;
if(ch3==3||ch3==4||ch3==9)
amt= qnt3*550;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Chickpeas: Rs. 350");
[Link]("2. Black beans: Rs. 400");
[Link]("3. Green peas: Rs. 450");
[Link]("4. Lima beans: Rs. 350");
[Link]("5. Kidney beans: Rs. 400");
[Link]("6. Black-eyed beans: Rs. 450");
[Link]("7. Navy beans: Rs. 350");
[Link]("8. Pinto beans: Rs. 400");
[Link]("9. Soy beans: Rs. 450");
[Link]("10. Lentils: Rs. 350");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==4||ch4==7||ch4==10)
amt= qnt4*350;
if(ch4==2||ch4==5||ch4==8)
amt= qnt4*400;

39
if(ch4==3||ch4==6||ch4==9)
amt= qnt4*450;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Spaghetti: Rs. 250");
[Link]("2. Long pasta: Rs. 300");
[Link]("3. Fettuccine: Rs. 350");
[Link]("4. Linguine: Rs. 250");
[Link]("5. Penne: Rs. 300");
[Link]("6. Rigatoni: Rs. 350");
[Link]("7. Macaroni: Rs. 250");
[Link]("8. Farfalle: Rs. 300");
[Link]("9. Risoni: Rs. 350");
[Link]("10. Rotini: Rs. 250");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==4||ch5==7||ch5==10)
amt= qnt5*250;
if(ch5==2||ch5==5||ch5==8)
amt= qnt5*300;
if(ch5==3||ch5==6||ch5==9)
amt= qnt5*350;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:

40
[Link]("Wrong Choice !!!");
}
break;
case 9:
[Link]("===== Personal care =====");
[Link]("1. Skin care");
[Link]("2. Hair care");
[Link]("3. Oral care");
[Link]("4. Body care");
[Link]("5. Bath and Shower");
[Link]("Please select a subcategory: ");
sc_ch9=[Link]();
switch (sc_ch9)
{
case 1:
[Link]("1. Face Wash: Rs. 150");
[Link]("2. Moisturizer: Rs. 200");
[Link]("3. Sunscreen: Rs. 200");
[Link]("4. Lip Balm: Rs. 150");
[Link]("5. Body Lotion: Rs. 250");
[Link]("6. Hand Cream: Rs. 250");
[Link]("7. Facial Serum: Rs. 200");
[Link]("8. Eye Cream: Rs. 150");
[Link]("9. Facial Oil: Rs. 250");
[Link]("10. Cleansing Wipes: Rs. 200");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
if(ch1==1||ch1==4||ch1==8)
amt= qnt*150;
if(ch1==2||ch1==7||ch1==10||ch1==3)

41
amt= qnt*200;
if(ch1==5||ch1==6||ch1==9)
amt= qnt*250;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("[Link] Shampoo: Rs. 250");
[Link]("2. Conditioner: Rs. 250");
[Link]("3. Hair Oil: Rs. 300");
[Link]("4. Hair Serum: Rs. 350");
[Link]("5. Hair Mask: Rs. 250");
[Link]("6. Hair Spray: Rs. 350");
[Link]("7. Hair Gel: Rs. 300");
[Link]("8. Hair Mousse: Rs. 250");
[Link]("9. Dry Shampoo: Rs. 350");
[Link]("10. Hair Color: Rs. 300");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==1||ch2==2||ch2==5||ch2==8)
amt= qnt2*250;
if(ch2==3||ch2==7||ch2==10)
amt= qnt2*250;
if(ch2==4||ch2==6||ch2==9)
amt= qnt2*250;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;

42
case 3:
[Link]("1. Toothbrush: Rs. 50");
[Link]("2. Toothpaste: Rs. 70");
[Link]("3. Mouthwash: Rs. 70");
[Link]("4. Dental Floss: Rs. 50");
[Link]("5. Tongue Scraper: Rs. 50");
[Link]("6. Teeth Whitening Strips: Rs. 70");
[Link]("7. Sugar-Free Gum: Rs. 75");
[Link]("8. Oral Probiotics: Rs. 75");
[Link]("9. Denture Cleaner: Rs. 75");
[Link]("10. Orthodontic Wax: Rs. 75");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1|ch3==4||ch3==5)
amt= qnt3*50;
if(ch3==2||ch3==3||ch3==6)
amt= qnt3*70;
if(ch3==7||ch3==8||ch3==9||ch3==10)
amt= qnt3*75;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Body Wash: Rs. 220");
[Link]("2. Body Lotion: Rs. 240");
[Link]("3. Body Scrub: Rs. 150");
[Link]("4. Body Butter: Rs. 240");
[Link]("5. Hand Cream: Rs. 220");
[Link]("6. Foot Cream: Rs. 150");

43
[Link]("7. Deodorant: Rs. 220");
[Link]("8. Body Oil: Rs. 240");
[Link]("9. Sunscreen: Rs. 150");
[Link]("10. Body moisturizer: Rs. 240");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==5||ch4==7)
amt= qnt4*220;
if(ch4==2||ch4==4||ch4==8||ch4==10)
amt= qnt4*240;
if(ch4==3||ch4==6||ch4==9)
amt= qnt4*150;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Body Wash: Rs. 350");
[Link]("2. Shower Gel: Rs. 350");
[Link]("3. Bar Soap: Rs. 250");
[Link]("4. Body Scrub: Rs. 250");
[Link]("5. Bath Bombs: Rs. 450");
[Link]("6. Bath Salts: Rs. 450");
[Link]("7. Bubble Bath: Rs. 450");
[Link]("8. Shower Oil: Rs. 350");
[Link]("9. Body Polish: Rs. 350");
[Link]("10. Shower Steamers: Rs. 250");
[Link]("Enter you choice");
ch5=[Link]();
[Link]("Enter quantity");

44
qnt5=[Link]();
if(ch5==1||ch5==2||ch5==8||ch5==9)
amt= qnt5*350;
if(ch5==3||ch5==4||ch5==10)
amt= qnt5*250;
if(ch5==5||ch5==6||ch5==7)
amt= qnt5*450;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
case 10:
[Link]("\n===== Household essentials =====");
[Link]("1. Cleaning supplies");
[Link]("2. Laundry supplies");
[Link]("3. Paper products");
[Link]("4. Trash bags");
[Link]("5. Storage and organisation");
[Link]("Please select a subcategory: ");
sc_ch10=[Link]();
switch (sc_ch10)
{
case 1:
[Link]("1. All-Purpose Cleaner: Rs. 250");
[Link]("2. Glass Cleaner: Rs. 250");
[Link]("3. Bathroom Cleaner: Rs.250");
[Link]("4. Kitchen Cleaner: Rs. 250");
[Link]("5. Disinfecting Wipes: Rs. 250");

45
[Link]("6. Toilet Bowl Cleaner: Rs. 250");
[Link]("7. Floor Cleaner: Rs. 250");
[Link]("8. Wood Polish: Rs. 250");
[Link]("9. Stainless Steel Cleaner: Rs. 250");
[Link]("10. Scrubbing Sponges: Rs. 250");
[Link]("Enter you choice");
ch1=[Link]();
[Link]("Enter quantity");
qnt=[Link]();
amt= qnt*250;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 2:
[Link]("1. Laundry Detergent: Rs. 250");
[Link]("2. Fabric Softener: Rs. 350");
[Link]("3. Dryer Sheets: Rs. 150");
[Link]("4. Bleach: Rs. 250");
[Link]("5. Stain Remover: Rs. 350");
[Link]("6. Laundry Pods: Rs. 150");
[Link]("7. Wool Dryer Balls: Rs. 250");
[Link]("8. Ironing Water: Rs. 350");
[Link]("9. Lint Rollers: Rs. 150");
[Link]("10. Hypoallergenic Laundry Detergent: Rs. 350");
[Link]("Enter you choice");
ch2=[Link]();
[Link]("Enter quantity");
qnt2=[Link]();
if(ch2==1||ch2==4||ch2==7)
amt= qnt2*250;
if(ch2==2||ch2==5||ch2==8||ch2==10)

46
amt= qnt2*350;
if(ch2==3||ch2==6||ch2==9)
amt= qnt2*150;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 3:
[Link]("1. Toilet Paper: Rs. 100");
[Link]("2. Paper Towels: Rs. 100");
[Link]("3. Facial Tissues: Rs. 100");
[Link]("4. Napkins: Rs. 100");
[Link]("5. Disposable Plates: Rs. 100");
[Link]("6. Disposable Cups: Rs. 80");
[Link]("7. Aluminum Foil: Rs. 80");
[Link]("8. Plastic Wrap: Rs. 80");
[Link]("9. Parchment Paper: Rs. 80");
[Link]("10. Wax Paper: Rs. 80");
[Link]("Enter you choice");
ch3=[Link]();
[Link]("Enter quantity");
qnt3=[Link]();
if(ch3==1||ch3==2||ch3==3||ch3==4||ch3==5)
amt= qnt3*100;
if(ch3==6||ch3==7||ch3==8||ch3==9||ch3==10)
amt= qnt3*80;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 4:
[Link]("1. Small Trash Bags: Rs. 100");

47
[Link]("2. Medium Trash Bags: Rs. 120");
[Link]("3. Large Trash Bags: Rs. 140");
[Link]("4. Extra-Large Trash Bags: Rs. 160");
[Link]("5. Biodegradable Trash Bags: Rs. 140");
[Link]("6. Compostable Trash Bags: Rs. 140");
[Link]("7. Drawstring Trash Bags: Rs. 120");
[Link]("8. Clear Trash Bags: Rs. 100");
[Link]("9. Scented Trash Bags: Rs. 140");
[Link]("10. Heavy-Duty Trash Bags: Rs. 160 ");
[Link]("Enter you choice");
ch4=[Link]();
[Link]("Enter quantity");
qnt4=[Link]();
if(ch4==1||ch4==8)
amt= qnt4* 100;
if(ch4==2||ch4==7)
amt= qnt4* 120;
if(ch4==3||ch4==5||ch4==9)
amt= qnt4* 140;
if(ch4==4||ch4==10)
amt= qnt4* 160;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
case 5:
[Link]("1. Storage Bins: Rs. 600");
[Link]("2. Hangers: Rs. 400");
[Link]("3. Drawer Organizers: Rs. 450");
[Link]("4. Closet Organizers: Rs. 450");
[Link]("5. Under-bed Storage: Rs. 600");
[Link]("6. Garment Rack: Rs. 450");

48
[Link]("7. Wall Shelves: Rs. 400");
[Link]("8. Over-the-door Organizer: Rs. 400");
[Link]("9. Jewelry Organizer: Rs. 600");
[Link]("10. Shoe Organizer: Rs. 600");
ch5=[Link]();
[Link]("Enter quantity");
qnt5=[Link]();
if(ch5==1||ch5==5||ch5==9||ch5==10)
amt= qnt5*600;
if(ch5==2||ch5==7||ch5==8)
amt= qnt5*400;
if(ch5==3||ch5==4||ch5==6)
amt= qnt5*450;
totamt=totamt+amt;
[Link]("Do you want to place more order? Enter Y/N");
choice=[Link]();
break;
default:
[Link]("Wrong Choice !!!");
}
break;
default:
[Link]("Wrong Choice !!!");
}
}
[Link]("The Total amount is:"+totamt);
gst=totamt*18.0/100.0;
tgst=gst+totamt;
[Link]("The total amount with tax is:"+tgst);
[Link]("Thank you visit again !!!");
}
}

49
Output
===== Welcome to our Grocery App =====
Please select a main category:
1. Fruits
2. Vegetables
3. Dairy products
4. Meat and poultry
5. Bakery
6. Beverages
7. Snacks
8. Canned and packaged foods
9. Personal care
10. Household essentials
1
===== Fruits =====
1. Citrus fruits
2. Berries
3. Tropical fruits
4. Melons
5. Stone fruits
Please select a subcategory:
1
1. Oranges: Rs. 80/kg
2. Lemons: Rs. 80/kg
3. Grapefruits: Rs. 90/kg
4. Lime: Rs. 90/kg
5. Mandarian: Rs. 100/kg
6. Tangerine: Rs. 90/kg
7. Pomelo: Rs. 80/kg
8. Yuzu: Rs. 120/kg
9. Bergamot: Rs. 120/kg

50
10. Citron: Rs. 100/kg
Enter your choice
4
Enter quantity
1
Do you want to place more order? Enter Y/N
y
Please select a main category:
1. Fruits
2. Vegetables
3. Dairy products
4. Meat and poultry
5. Bakery
6. Beverages
7. Snacks
8. Canned and packaged foods
9. Personal care
10. Household essentials
6
===== Beverages =====
1. Soft Drinks
2. Juice
3. Energy Drinks
4. Coffee
5. Tea
Please select a subcategory:
3
1. Red Bull Energy Drink: Rs. 120
2. Monster Energy Drink: Rs. 80
3. Rockstar Energy Drink: Rs. 80
4. Bang Energy Drink: Rs. 60
5. NOS Energy Drink: Rs. 60

51
6. Full Throttle Energy Drink: Rs. 80
7. Amp Energy Drink: Rs. 120
8. 5-hour Energy Drink: Rs. 60
9. Guru Energy Drink: Rs. 60
10. XS Energy Drink: Rs. 120
Enter you choice
1
Enter quantity
1
Do you want to place more order? Enter Y/N
n
The Total amount is:210
The total amount with tax is:247.8
Thank you visit again !!!

52
Data Description Table

Data Type Variable Description


String choice to check if to run while loop again
Double gst to calculate gst
Double tgst to add gst and total amount
Integer m_ch to accept choice for main menu
Integer sc_ch1 to accept choice for 1st sub-menu
Integer ch1 to accept item from 1st sub-menu
Integer qnt to accept quantity
Integer amt to calculate amount
Integer ch2 to accept choice from2nd sub-menu
to accept quantity from2nd sub-
Integer qnt2
menu
Integer ch3 to accept choice for 3rd sub-menu
Integer qnt3 to accept quantity for 3rd sub-menu
Integer ch4 to accept choice for 4th sub-menu
Integer qnt4 to accept quantity for 4th sub-menu
Integer ch5 to accept choice for 5th sub-menu
Integer qnt5 to accept quantity for 5th sub-menu
Integer totamt to add selected item price
Integer sc_ch2 to accept choice for 2nd sub-menu
Integer sc_ch3 to accept choice for 3rd sub-menu
Integer sc_ch4 to accept choice for 4rd sub-menu
Integer sc_ch5 to accept choice for 5th sub-menu
Integer sc_ch6 to accept choice for 6th sub-menu

53
Integer sc_ch7 to accept choice for 7th sub-menu
Integer sc_ch8 to accept choice for 8th sub-menu
Integer sc_ch9 to accept choice for 9th sub-menu
Integer sc_ch10 to accept choice for 10th sub-menu

54

You might also like