Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create an application to do the following tasks: 1.Register a new customer as a

ID: 3536606 • Letter: C

Question


Create an application to do the following tasks:
1.Register a new customer as a buyer and/or a seller: name and email address. 2.Add a customer%u2019s item to be listed for sale. 3.Calculate a 10% commission of an item price when sold. 4.List a list of items for sale of a particular customer. 5.List a list of all items for sale: what it is, how much, contact information of a seller. 6.List a list of items sold, their prices, and date listed and date sold. 7.List a list of items that contain bids of customers and a cut off date and time for a bid. 8.Enter a bid for an item and the bids are stored in an STL priority_queue object. This allows the highest bid to be at front of the queue.
Required code components-

-Create at least two classes for the application .The two classes are Customer Class and Item Class -Create data files (text files or binary files) -Enter a few records so that you can test the application. -Incorporate at least two STLs into your application.
Create an application to do the following tasks:
1.Register a new customer as a buyer and/or a seller: name and email address. 2.Add a customer%u2019s item to be listed for sale. 3.Calculate a 10% commission of an item price when sold. 4.List a list of items for sale of a particular customer. 5.List a list of all items for sale: what it is, how much, contact information of a seller. 6.List a list of items sold, their prices, and date listed and date sold. 7.List a list of items that contain bids of customers and a cut off date and time for a bid. 8.Enter a bid for an item and the bids are stored in an STL priority_queue object. This allows the highest bid to be at front of the queue.
Required code components-

-Create at least two classes for the application .The two classes are Customer Class and Item Class -Create data files (text files or binary files) -Enter a few records so that you can test the application. -Incorporate at least two STLs into your application.

Explanation / Answer

           /*****************************************/
    /*************PROJECT FOR RESTAURANT MANAGEMENT*************/
           /*****************************************/


#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<iomanip.h>
#include<graphics.h>
#include<stdio.h>
#include<string.h>
#include<fstream.h>
#include<stdlib.h>
#include<ctype.h>
#include<process.h>
void main()
        /***************************/
{         /********STRUCTURE OF RESTUARANT********/
        /***************************/
struct rest
{int dishno;
char namedish[25];
float dprice;
public:
void getdata()
{cout<<"Dish no";
cin>>dishno;
cout<<"Name Of The Dish";
gets(namedish);
cout<<"Enter The Price";
cin>>dprice;
}
void putdata()
{cout<<dishno<<" "<<namedish<<" "<<dprice;
}
int dno()
{return dishno;
}
}r1,r;
clrscr();
               /***************/
         /**********STARTING PAGE**********/
              /***************/
int gd=DETECT,gm;
    initgraph(&gd,&gm,"c:\tc\bgi");
    setbkcolor(0);
    delay(1000);
    setcolor(RED);
    settextstyle(4,0,5);
    outtextxy(230,50," WELCOME"); delay(1000);
    settextstyle(7,0,5);
    setcolor(BLUE);
    outtextxy(290,150," TO"); delay(1000);
    settextstyle(8,0,5);
    setcolor(GREEN);
    outtextxy(245,250,"RESTRAUNT"); delay(1000);
    setcolor(WHITE);
    settextstyle(5,0,5);
    for(int i=-225,j=639;i<71;i++,j--)
    {
    outtextxy(i,360,"    ROYAL"); outtextxy(j,360,"DIVINE");
    delay(15); setcolor(BLACK);
    outtextxy(i,360,"    ROYAL"); outtextxy(j,360,"DIVINE");
    setcolor(YELLOW);
    }
    outtextxy(70,360,"    ROYAL");
    outtextxy(j,360,"DIVINE"); delay(1000);
    i=1;
    setbkcolor(WHITE);
    do
    {
    setcolor(i);
    settextstyle(4,0,5);
    outtextxy(230,50," WELCOME"); delay(100);
    settextstyle(7,0,5);
    setcolor(i+1);
    outtextxy(290,150," TO"); delay(100);
    settextstyle(8,0,5);
    setcolor(i+1);
    outtextxy(245,250,"RESTRAUNT"); delay(100);
    setcolor(i+3);
    settextstyle(5,0,5);
    outtextxy(70,360,"    ROYAL");
    outtextxy(j,360,"DIVINE"); delay(100);
    i++;
    } while(i!=13);
    delay(1000); cleardevice();
    settextstyle(0,0,0);
    for(i=400;i>=0;i--) { setcolor(BLUE); circle(320,240,i); delay(5); }
    for(i=0;i<=400;i++) { setcolor(RED); circle(320,240,i); delay(5); }
    cleardevice();
int n,cha,no,x=0,y;
char ch,ans,c,found='n';
            /************************/
        /**********OPTIONS FOR RESTAURANT**********/
            /************************/
do
{       cleardevice();
    setcolor(RED);
    settextstyle(10,0,5);
    outtextxy(180,-20,"OPTIONS ");
    settextstyle(10,0,1);
    setcolor(BLACK);
    setcolor(RED);
    settextstyle(8,0,1);
    outtextxy(180,65,"MAIN MENU");
    settextstyle(8,0,7);
    setcolor(RED);
    setbkcolor(BLACK);
    setcolor(RED);
    settextstyle(8,0,1);
    outtextxy(180,95,"1.MENU");
    settextstyle(8,0,7);
    setcolor(RED);
    setcolor(RED);
    settextstyle(8,0,1);
    outtextxy(180,110,"2.ORDER");
    settextstyle(8,0,7);
    setcolor(RED);
    setcolor(RED);
    settextstyle(8,0,1);
    outtextxy(180,125,"3.BILL");
    settextstyle(8,0,7);
    setcolor(RED);
    setcolor(RED);
    settextstyle(8,0,1);
    outtextxy(180,150,"ENTER YOUR CHOICE");
    settextstyle(8,0,7);
    setcolor(RED);
    cin>>n;
            /************************/
        /**********CASES FOR RESTAURANT**********/
            /************************/
    switch(n)
        {
        case 1: ifstream infile;
            infile.open("res.dat");
            setcolor(RED);
            settextstyle(8,0,1);
            outtextxy(180,175,"MENU");
            settextstyle(8,0,7);
            setcolor(RED);
            cleardevice();
            setbkcolor(RED);
            while(!infile.eof())
            {infile.read((char*)&r1,sizeof(r1));
            cout<<" "<<r1.dishno<<" "<<r1.namedish<<" "<<r1.dprice;

            }break;
            infile.close();
            break;
        case 2: cleardevice();
            setbkcolor(RED);
            do
            {
            cout<<" ENTER THE CODE OF DISH YOU WANT TO ORDER";
            cin>>cha;
            ifstream infile;
            infile .open("res.dat");
            while(!infile.eof())
            { infile.read((char*)&r1,sizeof(r1));
               if(r1.dishno==cha)
               {   cout<<" "<<r1.dishno<<" "<<r1.namedish<<" "<<"Rs."<<r1.dprice;
                   found='y';
                   break;
               }
            }
            if(found=='n')
            cout<<" INVALID CHOICE";
            infile.close();
            cout<<" WISH TO ORDER MORE";
            cin>>ans;
            }while(ans=='y');
            cout<<" KINDLY PAY YOUR BILL ON COUNTER NO.5";
            cout<<" THANK YOU";break;
        case 3: cleardevice();
            setbkcolor(RED);
            do
            {cout<<" ENTER THE CODE OF DISH YOU HAVE ORDERED";
            cin>>cha;
            ifstream infile;
            infile .open("res.dat");
            while(!infile.eof())
            { infile.read((char*)&r1,sizeof(r1));
               if(r1.dishno==cha)
               {cout<<" "<<r1.dishno<<" "<<r1.namedish<<" "<<"Rs."<<r1.dprice;
                   found='y';
                   y=r1.dprice;
                   no=x+y;
                   x=no;

                   break;
               }
            }
            if(found=='n')
            cout<<" INVALID CHOICE";
            infile.close();
            cout<<" HAVE YOU ORDERED ANY THING MORE?(y/n)";
            cin>>ans;
            }while(ans=='y');
            cout<<" TOTAL BILL:"<<no;
            cout<<" HOPE YOU LIKED OUR SERVICES THANK YOU FOR VISITING RESTRAUNT DIVINE";
            break;
        default:cout<<"INVALID CHOICE";

        }
    cout<<" WISH TO DO MORE";
    cin>>ch;
}while(ch=='y');
getch();
}



Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote