Wine Shop Management System using C++

Wine Shop Management System using C++ (With Source Code)

 Wine Shop Management System using C++ (With Source Code)

Hello, coders. Welcome to the codewithrandom blog. In this article, we will learn how to create a Wine Shop Management System using C++

The Wine Shop Management System is built on the notion of maintaining orders and managing a specific brand of alcohols and wines. The customer can take a look at the available items in the wine shop and as per the need, they can order the items and then pay for them via cash or credit card.

This project is divided into two sections:

  • An immediate alcohol order system
  • An admin panel.

The user can keep daily ordering records by utilizing this technique. When you pick option1 – Alcohol and Wine Order, the system presents a selection of available branded alcohols and wines, and you must place an order with item quantity. Following that, he/she moves on to Order confirmation and Payment methods. This system accepts cash and credit cards as payment options. When using a credit card, the user must input the card number and pin number for transactions.

Creating a Wi-fi Password generator using C++

The wine shop management system allows a customer and the admin to do their tasks, i.e ordering and keeping track of items and orders respectively in an efficient and a convenient manner.

Overview of the UI:

  1. Wine and alcohol list
  2. Admin Control Section
  3. Exit

When the user clicks on 1 (Wine and alcohol list) – It displays the list of alcohols available in the shop with their price and available stock. Then the user places the order by entering the item number and the quantity customer wants.

The screen after entering displays the –

Choice item (item name) its price is (item price)

  1. Confirm to buy this
  2. Alcohol List

Press 1 to confirm and 2 to back to the list:1 (confirmed order by pressing 1)

  1. Cash
  2. Credit

Select method pf payment 1-2: (Press 1 if payment has to be done by Cash or 2 if by credit)

After PAYMENT:

Item ordered successfully …

  1. Wanna buy another drink
  2. Main Menu

Select: (Press 1 or 2 depending upon the customers choice)

Wine Shop Management System using C++ Source code:

You can directly use this code by copying it in your IDE to understand the working and then can create it by understanding the project.

#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
#include<windows.h>
#include<time.h>


///Logic Functions

   /// Update & Insert Function
void insertfirst(int data, char foodname[25], int quantity, float price);
void insertmid(int pos, int data, char foodname[25], int quantity, float price);
void insertend(int data, char foodname[25], int quantity, float price);
void updatefood(int udata, int uquantity);

     /// Display Function
void foodlist();
void order_view(int order, int quantity, int or_no);
void main_menu();

    ///Delete & Count Function
void deletefood(int serial);
int countitem();




///extra design Function

void cls();
void echo(char print[]);
void br(int line);
void pre(int tab);
void span(int space);
void ccolor(int clr);
void pwellcome();
void loadingbar();
void middle1(void);
void middtab1(void);
void backuploader(void);


        ///START Structure Here

struct Node{

    char foodname[50];
    int quantity;
    float price;
    int data;
    struct Node *next;

};

   ///Global Type

typedef struct Node node ;

node *head, *list;

int main(){

    system("title Wine Seller System");
    system("mode con: cols=88 lines=30");


    loadingbar(); cls();
    pwellcome();
    Sleep(300);
    cls();

    int c=0; int any;
    int cardno[100];
    float cardmoney[100];
    float totalmoney = 0;
    int total_order[100];
    int order_quantity[100];
    int order=0;
    int uquantity;
    int citem;

    head = NULL;
    insertfirst(5,"Ruslan Vodka",23,7000);
    insertend(6,"Rum",13,400);
    insertend(1,"Spanish ivy",8,340);
    insertend(2,"Tuborg",46,650);
    insertend(3,"Carlsberg",46,1200);
    insertend(4,"Red Wine",34,3000);




    mainmenu:
    br(1);

    main_menu();

    int main_menu_choice;

    br(1); pre(4); fflush(stdin); scanf("%d",&main_menu_choice);

    if((main_menu_choice >=1 && main_menu_choice <=3)){

        if(main_menu_choice == 1){

            foodlist:

            cls();
            printf("=> 0. Main Menu ");
            foodlist();


        }

        else if( main_menu_choice == 2){

            adminpanelchoice:

            int admin_panel_choice;

            cls(); middle1() ;   pre(4);  printf("1. Main Menu\n\n\t"); Sleep(300);
            printf("Please Enter Password or ( 1 to Back in Main Menu ) : ");


            fflush(stdin);  scanf("%d",&admin_panel_choice);

            if(admin_panel_choice==1234567){



                node *temp;

                temp = list;

                adminchoise:

                cls();  br(3); pre(4); echo(">>>> Admin Control Section <<<<   \n\n");
                pre(4);
                printf(" 1. Total Cash Generated Today \n\n");Sleep(250);pre(4);
                printf(" 2. View Card Payments \n\n");Sleep(250);pre(4);
                printf(" 3. Add Wine and Alcohols \n\n");Sleep(250);pre(4);
                printf(" 4. Delete Alcohols \n\n");Sleep(250);pre(4);
                printf(" 5. Instant Available Alcohols \n\n");Sleep(250);pre(4);
                printf(" 6. Wine Counter \n\n");Sleep(250);pre(4);
                printf(" 7. Backup System\n\n");Sleep(250);pre(4);
                printf(" 8. Instant Order Preview\n\n");Sleep(250);pre(4);
                printf(" 0. Main Menu \n\n");
                printf("Enter Your From 1-0: ");
                Sleep(250);

                int adminchoise;



                fflush(stdin);   scanf("%d",&adminchoise);

                if(adminchoise==1){

                    cls();  middle1(); pre(4);   printf("Todays Total Cash : %0.2f  \n",totalmoney);

                    Sleep(2000);

                    goto adminchoise;
                }
                else if(adminchoise==2){

                    if(c!=0){

                        cls();  br(3); pre(4);

                        printf(" ____________________________\n");pre(4);
                        printf("|   Card NO.   |   Money $   |\n");pre(4);
                        printf("------------------------------\n");pre(4);

                        for(int z=1; z<=c;z++){

                            printf("|  %d  | %0.2f |\n",cardno[z],cardmoney[z]);pre(4);
                            printf("------------------------------\n");pre(4);
                            Sleep(150);

                        }
                        Sleep(1500);
                    }

                    if(c==0){

                        cls();  middle1(); pre(4);
                    printf("No Card History\n");}
                    Sleep(1500);
                    goto adminchoise;
                }

                else if(adminchoise==3){

                    foodadd:
                    cls();

                    char ffoodname[25];
                    int fquantity;
                    int fdata;
                    float fprice;
                    int fposi;


                    br(3);pre(4);      printf(" Enter Alcohol Brand :  ");

                    fflush(stdin);     scanf("%[^\n]s",ffoodname);
                    fquantity:
                    fflush(stdin);

                    br(2);pre(4);
                    printf(" Enter Wine Quantity :  ");

                    scanf("%d",&fquantity); fflush(stdin);

                        foodserial:
                    br(2);pre(4);  printf(" Wine Brand Serial NumberS :  ");
                      scanf("%d",&fdata);
                            node *exist;
                            exist = list;
                      while(exist->data!=fdata){
                            if(exist->next==NULL){
                                break;
                            }
                        exist=exist->next;
                      }
                      if(exist->data==fdata){
                       cls(); br(5);pre(3);  printf(" Alcohol Serial Number Already Exists, Please Re-Enter  "); Sleep(2000);
                       goto foodserial;
                      }

                    fprice:
                      fflush(stdin);

                    br(2);pre(4);  printf(" Enter Alcohol Price :  ");fflush(stdin);

                    scanf("%f",&fprice);



                    br(2);pre(4);  printf("Submitting your data");for(int cs=0;cs<4;cs++){printf(" .");Sleep(500);}


                    insertend(fdata,ffoodname,fquantity,fprice);

                    br(2);pre(4);      printf("Adding Item  Successfull.......\n");

                    Sleep(2000);

                    goto adminchoise;

                }
                else if(adminchoise==4){

                    cls();
                    middle1();pre(2);
                    printf("Enter Serial No of the Wine To Delete : ");
                    fdelete:
                    int fdelete;
                    fflush(stdin); scanf("%d",&fdelete);
                    node *temp;
                    temp=list;
                    while(temp->data != fdelete){
                        temp = temp->next;
                    }
                    if(temp->data==fdelete){
                        deletefood(fdelete);
                    }
                    else{
                        br(2); pre(2); printf("Please Enter Correct Number :  "); Sleep(500);
                        goto fdelete;
                    }


                    goto adminchoise;
                }

                else if(adminchoise==5){

                    cls();    foodlist(); Sleep(1000);

                    br(2);pre(4);  printf("1. <-- back  \n\n");pre(5);



                    fflush(stdin);   scanf("%d",&any);

                    goto adminchoise;

                }

                else if(adminchoise==6){

                    citem = countitem();
                    cls();
                    for(int cs=1;cs<=citem;cs++){
                        middle1(); pre(4);
                        printf("Item Counting ");
                        printf(" %d ",cs);
                        Sleep(150);
                        cls();
                    }
                    cls();
                    middle1();pre(4);
                    printf("Total Alcohol Available is --> %d  \n",citem); Sleep(2000);
                    goto adminchoise;
                    
                    // calling a function
                    // int maain (){
                    // int =  88987
                    //}

                }

                        ///Backup System
                else if(adminchoise==7){


                    char date[35]=__DATE__;

                    strcat(date,".txt");
                    FILE *fptr;
                    fptr=fopen(date,"w");
                    backuploader();
                    if(fptr==NULL){
                        br(3); pre(3); printf("Error!"); Sleep(500);
                        goto adminchoise;
                    }
                    fprintf(fptr,"Total Cash Today : %0.2f\n\n\n",totalmoney);
                    fprintf(fptr,"Card No ------- Money \n\n");
                    for(int l=1; l<=c;l++){
                        fprintf(fptr,"%d ------- %0.2f \n",cardno[l],cardmoney[l]);
                    }
                    br(2);pre(4); printf("Backup Successfull..."); Sleep(1500);



                    fclose(fptr);
                    goto adminchoise;
                }
                else if(adminchoise==8){

                    cls();br(2);pre(2);
                    ccolor(26);
                    printf("\n\t\t"); ccolor(240);
                    printf("______________________________________________________ "); ccolor(26);
                    printf("\n\t\t");  ccolor(240);
                    printf("|  Order No.  |   Alcohol Name   |  Quantity |  In Stock |"); ccolor(26);
                    printf("\n\t\t");  ccolor(240);
                    printf("------------------------------------------------------"); ccolor(26);
                    for(int o=1;o<=order;o++){
                        order_view(total_order[o],order_quantity[o],o);
                    }

                    br(2);pre(4);  printf("1. <-- back  \n\n");pre(5);

                    fflush(stdin);   scanf("%d",&any);

                    goto adminchoise;



                }
                else if(adminchoise==0){

                    goto mainmenu;
                }

                else{
                    br(2); pre(4); printf("Please Select From List :  "); Sleep(500);
                    goto adminchoise;
                }



            }

            else if(admin_panel_choice==1){
                goto mainmenu;
            }
            else{
                br(2); pre(4);  printf("Please Enter Correct Choice");
                goto adminpanelchoice;
            }

        }

        else if(main_menu_choice==3){
            cls();
            middle1(); pre(3); printf("Thank You For Using Our System. \n\t\t\tBrought To You By code-projects.org \n\n\n\n\n\n\n");
            Sleep(1000);

            exit(1);

        }

    }
    else{
        br(2); pre(4); printf("Please Enter Correct Choice"); Sleep(300);
        goto mainmenu;
    }


    int get_food_choice;


    br(2); pre(3);fflush(stdin);
    printf("Place Your Order: ") ;
    scanf("%d",&get_food_choice);

    if(get_food_choice==0){
        goto mainmenu;
    }

    node *temp;

    temp = list ;

    while(temp->data != get_food_choice){

        temp = temp->next;
        if(temp==NULL){
            br(2); pre(4);  echo("Please Choice From List: "); br(2); Sleep(1000);
            goto foodlist;
        }

    }
    if(get_food_choice == temp->data){

        fcquantity:
        br(2); pre(4);
        printf("Enter Alcohol Quantity : ");

        int fcquantity;

        fflush(stdin); scanf("%d",&fcquantity); cls();



        if(fcquantity==0){
            cls(); middle1();pre(3); printf("Quantity Can not be Zero "); Sleep(2000);
            cls();
            goto foodlist;
        }
        else if(fcquantity>temp->quantity){
            cls(); middle1();pre(3); printf("Out of Stock ! "); Sleep(2000);

            goto foodlist;
        }

        middle1();pre(4);  printf("Choice item %s  its price is %0.2f \n\n",temp->foodname,temp->price*fcquantity);pre(4);
        printf("1. Confirm to buy this \n\n");pre(4);
        printf("2. Alcohol List \n\n");
        printf("Press 1 to confirm and 2 to back to list :");

        confirm:
        int confirm;

        fflush(stdin); scanf("%d",&confirm);

        if(confirm == 1 ){

            br(2);pre(4);
            printf(" 1. Cash ");
            br(2);pre(4);
            printf(" 2. Credit\n");
            printf("Select Method Of payment 1-2: ");
            payment:
            int payment;

            fflush(stdin);  scanf("%d",&payment);

            if(payment==1){


                totalmoney += temp->price*fcquantity;
                order++;
                total_order[order]=get_food_choice;
                order_quantity[order]=fcquantity;
                uquantity = temp->quantity - fcquantity;

                updatefood(get_food_choice,uquantity);


                cls();middle1();pre(4);  printf("===>THANK YOU<===");
                br(2);pre(4);  printf("Item Ordered Successfully ...");
                br(2);pre(4);  printf("1. Wanna Buy Another Drink ? ");
                br(2);pre(4);  printf("2. Main Menu \n");
                br(2);pre(4);   printf("Select: ");
                psmenu:
                int ps_menu;

                fflush(stdin);  scanf("%d",&ps_menu);

                if(ps_menu==1){goto foodlist;}
                else if(ps_menu==2){goto mainmenu;}
                else{br(2);pre(4);printf("Please Choice from list : "); goto psmenu;}

            }

            ///Credit Card Option

            else if(payment==2){

                int card_number[100];

                c++;

                cls();middle1();pre(4); printf("Enter Your Card No : ");

                fflush(stdin);   scanf("%d",&card_number[c]);



                cardno[c] = card_number[c];

                int pin;

                br(2);pre(2);  printf("Enter Your Card Pin [we never saved your pin]  : ");

                fflush(stdin);     scanf("%d",&pin);

                cardmoney[c] = temp->price*fcquantity;

                totalmoney += temp->price*fcquantity;
                order++;
                total_order[order]=get_food_choice;
                order_quantity[order]=fcquantity;

                uquantity = temp->quantity - fcquantity;

                updatefood(get_food_choice,uquantity);

                br(2);pre(4);  printf("Payment Success...");
                br(2);pre(4);    printf("1. Wanna Buy Another Drink ? ");
                br(2);pre(4);    printf("2. Main Menu \n");
                br(2);pre(4);   printf("select: ");
                psmenu2:
                int ps_menu2;

                scanf("%d",&ps_menu2);

                if(ps_menu2==1){goto foodlist;}
                else if(ps_menu2==2){goto mainmenu;}
                else{br(2);pre(4);printf("Please Choice from list : "); goto psmenu2;}

            }

            else{

                br(2);pre(4);   printf("Enter Choice from List : ");

                goto payment;


            }


        }    ///END Confirm Y/y



        else if(confirm == 2){

            goto foodlist;

        }

        else{
            br(2);pre(4);    printf("Enter Choice from List : ");

            goto confirm;


        }  ///end confirm;


    }  ///end get food choice if line


    else{

        br(2);pre(4);  echo("Please Choose From List "); br(2); Sleep(300);

        goto foodlist;

    }  ///end get food choice
}

void cls(){

    system("cls");

}

void echo(char print[]){

    printf("%s",print);
}

void br(int line){
    for(int i=0; i<line;i++){
        printf("\n");
    }
}

void pre(int tab){

    for(int i=0; i<tab;i++){
        printf("\t");
    }

}
void span(int space){

    for(int i=0; i<space;i++){
        printf(" ");
    }

}

void main_menu(){

    cls();
    br(5); pre(3); echo(">> 1.Wine And Alcohol List"); Sleep(400);
    br(2); pre(3); echo(">> 2. Admin Control Section"); Sleep(400);
    br(2); pre(3); echo(">> 3. Exit");  Sleep(400);
    //   br(2); pre(3); echo("=> 4. Admin Panel");  Sleep(400);

    br(1);

}

void insertend(int data, char foodname[25], int quantity, float price){

    node *temp;

    temp=(node *)malloc(sizeof(node));

    temp->data = data;

    temp->price = price;

    temp-> quantity = quantity;

    strcpy(temp->foodname,foodname);

    temp->next = NULL;


    if(head==NULL){
        head = temp;
        list = head;
    }
    else{

        while(head->next != NULL){
            head = head->next;
        }

        head->next = temp;
    }

}

void insertfirst(int data, char foodname[25], int quantity, float price){

    node *temp;

    temp=(node *)malloc(sizeof(node));

    temp->data = data ;

    temp->price = price;

    strcpy(temp->foodname,foodname);

    temp-> quantity = quantity;


    temp->next = head;

    head = temp;

    list = head ;

}

void insertmid(int pos, int data, char foodname[25], int quantity, float price){

    node *temp;

    temp=(node *)malloc(sizeof(node));

    temp->data = data;

    temp->price = price;

    temp-> quantity = quantity;

    strcpy(temp->foodname,foodname);

    while(head->next->data != pos ){


        head = head->next ;

    }

    temp->next = head->next;
    head->next = temp ;

    //    free(temp);
}

void deletefood(int serial){

    node *temp;
    temp=(node *)malloc(sizeof(node));

    temp = list;


    if(temp->data != serial){

        while(temp->next->data != serial){
            temp = temp->next;
        }

        if(temp->next->data == serial){

            temp->next = temp->next->next;
            cls();
            printf("\n\n\n\n\t\t\tDeleting Item %d ",serial);for(int cs=0;cs<4;cs++){printf(" .");Sleep(400);}

            printf("\n\n\n\n\t\t\tDeleted Successfully \n"); Sleep(500);

        }
        else{
            printf("\n\n\n\n\t\t\tThe choosed Wine Is Not Found\n"); Sleep(500);
        }

        head = temp ;

    }
    else{

        temp = temp->next;
        cls();
        printf("\n\n\n\n\t\t\tDeleting Item %d ",serial);for(int cs=0;cs<4;cs++){printf(" .");Sleep(400);}

        printf("\n\n\n\n\t\t\tDeleted Successfully \n"); Sleep(500);

        head = temp ;

        list=head;
    }
}

void updatefood(int udata, int uquantity){

    node *temp;
    temp = list;

    while(temp->data!=udata){
        temp = temp->next;

    }
    if(temp->data == udata){
        temp->quantity = uquantity;
    }

}

int countitem(){

    node *temp;

    temp = list;

    int countitem=0;

    if(temp==NULL){
        countitem = 0;
    }
    else{
        countitem = 1;
        while(temp->next != NULL){
            countitem++;
            temp = temp->next;
        }

    }


    return countitem;

}
void foodlist(){

    ccolor(0);

    printf("\n\t\t"); ccolor(240);
    printf("______________________________________________________ ");ccolor(26);
    printf("\n\t\t"); ccolor(240);
    printf("|  Item No.  |   Wine Name   |  Price  |   In Stock   |");ccolor(26);
    printf("\n\t\t"); ccolor(240);
    printf("-------------------------------------------------------");ccolor(26);

    node *temp;

    temp = list;

    while(temp != NULL){

        ccolor(26);


        printf("\n\t\t"); ccolor(62);
        printf("|     %d      |    %s  |    %0.2f   |    %d    |",temp->data,temp->foodname, temp->price, temp->quantity);
        ccolor(26);
        printf("\n\t\t"); ccolor(62);
        printf("-------------------------------------------------------");


        temp = temp->next ;

        Sleep(100);

    }

    ccolor(26);

    //  free(temp);

}


void order_view(int order, int quantity, int or_no){



    ccolor(26);

    node *temp;

    temp = list;

    while(temp->data != order){

        temp = temp->next;

    }
    if(temp->data == order){

        ccolor(26);

        printf("\n\t\t"); ccolor(62);
        printf("|     %d      |    %s  |     %d     |     %d     |",or_no,temp->foodname,quantity,temp->quantity);
        ccolor(26);
        printf("\n\t\t"); ccolor(62);
        printf("-------------------------------------------------------");

        Sleep(100);

    }

    ccolor(26);

}

void ccolor(int clr){

    HANDLE  hConsole;
    hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    //SetConsoleTextAttribute(hConsole, clr);

//the above code displays colorful background. if you want colorful then you can remove the above comment but not the code, only comment//
}


///HEERE PRINTF STYLE FUNCTION

void pwellcome(){
    ccolor(26);

    char welcome[50]="WELCOME";
    char welcome2[50]=" TO";
    char welcome3[50]=" WINE SHOP";
    char welcome4[50]=" MANAGEMENT SYSTEM";
    printf("\n\n\n\n\n\t\t\t");
    for(int wlc=0; wlc<strlen(welcome);wlc++){

        printf(" %c",welcome[wlc]);
        Sleep(100);
    }
    ccolor(26);
    printf("\n\n\t\t\t\t ");
    for(int wlc2=0; wlc2<strlen(welcome2) ;wlc2++){

        printf(" %c",welcome2[wlc2]);
        Sleep(100);
    }
    ccolor(26);
    printf("\n\n\n\t\t\t ");
    for(int wlc3=0; wlc3<strlen(welcome3) ;wlc3++){
        if(welcome3[wlc3]!='D'){

            printf(" %c",welcome3[wlc3]);
        }
        else{

            printf(" %c",welcome3[wlc3]);
        }

        Sleep(100);
    }
    ccolor(26);
    printf("\n\n\n\t\t\t\t ");
    for(int wlc3=0; wlc3<strlen(welcome4) ;wlc3++){
        if(welcome4[wlc3]!='A' && welcome4[wlc3]!='E'){

            printf(" %c",welcome4[wlc3]);
        }
        else{

            printf(" %c",welcome4[wlc3]);
        }
        Sleep(100);
    }
    ccolor(26);

}
void loadingbar(void){

    for (int i=15;i<=100;i+=5){

        cls();

        printf("\n\n\n\n\n\n\n\t\t\t\t");
        printf("%d %% Loading...\n\n\t\t",i);

        printf("");

        for (int j=0; j<i;j+=2){

            ccolor(160+j);
            printf(" ");
            ccolor(26);

        }
        Sleep(100);
        if(i==90 || i==50 || i==96 || i==83){
            Sleep(100);
        }

    }

}
void backuploader(void){

    for (int i=15;i<=100;i+=5){

        cls();
        ccolor(26);

        printf("\n\n\n\n\n\n\n\t\t\t\t");
        printf("%d %% Backing UP DATA...\n\n\t\t",i);

        printf("");

        for (int j=0; j<i;j+=2){

            ccolor(120+j);
            printf(" ");
            ccolor(26);

        }
        Sleep(50);
        if(i==90 || i==50 || i==96 || i==83){
            Sleep(50);
        }
    }

}


void middle1(void){

    printf("\n\n\n\n\n\n\n");
}

void middtab1(void){
    printf("\t\t\t\t\t");
}

Now let us understand the code:-

After writing the header of the code with the required libraries, we will declare the functions to provide logic to the project. The functions declared are –

Update & Insert Functions

  1. insertfirst(int data, char foodname[25], int quantity, float price)
  2. insertmid(int pos, int data, char foodname[25], int quantity, float price)
  3. insertend(int data, char foodname[25], int quantity, float price)
  4. updatefood(int udata, int uquantity)
Display Functions
  1. foodlist()
  2. order_view(int order, int quantity, int or_no)
  3. main_menu()
Delete & Count Functions
  1. deletefood(int serial)
  2. countitem()
Extra design Function
  1. void cls();
  2. void echo(char print[]);
  3. void br(int line);
  4. void pre(int tab);
  5. void span(int space);
  6. void ccolor(int clr);
  7. void pwellcome();
  8. void loadingbar();
  9. void middle1(void);
  10. void middtab1(void);
  11. void backuploader(void);
  • We will create a struct node – A node is a struct that contains at least one data field as well as a reference to another node of the same type. It is a self-referential object, is one that has a pointer to a variable that refers to another variable of the same type. It will contain data about wine such as  –
     char foodname[50]; int quantity; float price; int data;
  • Now creating an alias called node for the struct Node using typedef – (typedef struct Node node ).
  • Passing a pointer(head) and pointer(list) of type node, so changes made to this would be permanent.
  •  Inside the main() function we will give functionalities to show the title, use sleep command and cls and how our functions declared after main function will be utilized to use this project. All the variables for the quantity of the Alcohols available will also be created here.
  • We will use nested if-else if control statements to describe the main menu choice section of our project. It will also contain the functionality for the admin panel choice. These control statements will control the aftermath of the choices entered by users like which alcohol they want, the quantity and etc., as described above in the UI.
  • To make the payment using either cash or credit, the if-else if control statements will be used. For credit, user has to “Enter Your Card No : ” then “Enter Your Card Pin [we never saved your pin]  : “
  • After the payment user will if they wish to continue or not.
  • After main() we will define the functions used inside main.
  • This sums up our project of Wine Shop Management using C++.

Simple Currency Convertor using C++ (with source code)

Final Output:-

Here is an example to show how this project works.

Wine Shop Management System using C++

Main screen after loading the project on console.

Wine Shop Management System using C++

The user will select from the given 3 options. To place an order, select 1, to open the admin panel, select 2 and to exit from the program, select 3.

ADVERTISEMENT

Wine Shop Management System using C++

ADVERTISEMENT

Upon clicking 1 – The list of alcohol available with their stock number to place the order.

ADVERTISEMENT

Wine Shop Management System using C++

ADVERTISEMENT

Confirming the order and making the payment.

ADVERTISEMENT

Wine Shop Management System using C++

The item selected has been ordered successfully.

Wine Shop Management System using C++

Conclusion

We have reached the end of this article and have a lot more projects in C++ coming so stay tuned. We have started with awesome and fun projects for you all to understand C++. Learning C++ by creating fun projects makes learning easy and interesting.

Creating a Wi-fi Password generator using C++

If you enjoyed the article and learned something new today, let us know in the comments.

Thank you.

Happy Reading! 🙂

Follow: CodeWithRandom



Leave a Reply