0% found this document useful (0 votes)
25 views6 pages

P Inagawa

This C++ program defines functions for a coffee shop point-of-sale system. The main function calls the mainScreen function which displays an menu and gets user input to call different functions for ordering items, viewing orders, updating orders, deleting orders or viewing payslips. The orderitem function gets customer details and order selections, calculates totals, and displays the order before returning to the main screen.
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)
25 views6 pages

P Inagawa

This C++ program defines functions for a coffee shop point-of-sale system. The main function calls the mainScreen function which displays an menu and gets user input to call different functions for ordering items, viewing orders, updating orders, deleting orders or viewing payslips. The orderitem function gets customer details and order selections, calculates totals, and displays the order before returning to the main screen.
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
You are on page 1/ 6

#include <iostream>

#include <cstdlib>

using namespace std;

void mainScreen();

void orderitem();

void vieworderitem();

void updateorde();

void deleteitem();

int main()

mainScreen();

void orderitem()

system("cls");

string name;

int coffee;

int cofqty;

double cofprice;

string cofname;

cout<<"enter your name: ";

cin>>name;

cout << "\n____________________________________" <<endl;


cout << "[1]\tCold Brew................Php90.00" <<endl;

cout << "[2]\tEspresso.................Php90.00" <<endl;

cout << "[3]\tSpanish Latte............Php120.00" <<endl;

cout<<"\tWhat is your coffee? :";

cin>>coffee;

cout<<"\thow many?: ";

cin>>cofqty;

cout<<endl;

switch (coffee)

case 1:

cofprice = 90.00;

cofname = "Cold Brew";

break;

case 2:

cofprice = 90.00;

cofname = "Espresso";

break;

case 3:

cofprice = 120.00;

cofname = "Spanish Latte";

break;

default:

cout<<" invalid input"<<endl;


}

cout << "\n____________________________________" <<endl;

cout << "[1]\tApple Pie Php120.00" <<endl;

cout << "[2]\tCheesecake.................Php150.00" <<endl;

cout << "[3]\tBanana Pudding.............Php120.00" <<endl;

int dessert;

int desqty;

string desname;

int desprice;

cout<<"what is your dessert?: ";

cin>>dessert;

cout<<"how many?: ";

cin>>desqty;

switch (dessert)

case 1:

desprice = 120.00;

desname = "Apple Pie";

break;

case 2:

desprice = 150.00;

desname = "Cheesecake";

break;

case 3:
desprice = 120.00;

desname = "Banana Pudding";

break;

default:

cout<<" invalid input"<<endl;

double cof = cofprice * cofqty;

double des = desprice * desqty;

cout<< "name: "<< name<<endl;

cout<<"Your order is: "<<endl;

cout<< cofname <<" "<<cofprice<<"X"<<cofqty << " "<<cof<<endl;

cout<<desname<<" "<<desprice<<"x"<<desqty<<" "<<des<<endl;

system("pause");

system("cls");

mainScreen();

void vieworderitem()
{

void updateorde()

void deleteitem()

void mainScreen()

cout << "+----------------------------------+" << endl;

cout << " Select an option:" << endl;

cout << " [1] Order item" << endl;

cout << " [2] View Order" << endl;

cout << " [3] Update Order" << endl;

cout << " [4] Delete Order" << endl;

cout << " [5] View Payslip" << endl;

cout << "+----------------------------------+" << endl;

int choice;

cout << "Choice: ";

cin >> choice;

switch (choice)
{

case 1:

orderitem();

break;

case 2:

vieworderitem();

break;

case 3:

updateorde();

break;

case 4:

deleteitem();

break;

case 5:

orderitem();

break;

default:

cout<<"invalid input, please try again."<<endl;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy