-)(+) 51.5% Problem 2 (40 points)-Write a program. Submit a file named chili.cpp
ID: 3911074 • Letter: #
Question
-)(+) 51.5% Problem 2 (40 points)-Write a program. Submit a file named chili.cpp Louise is famous in her town for making chili. Every day, she cooks a certain amount (each batch is 4 cups) and she reads in a file with customer information. To save on costs, she uses Starbucks cups (given to her by the local Starbucks) to serve the chili. Notes: -You should have a minimum of 2 classes (you decide which classes and how many) The program should read in a file in the ollowving format Sample file: Natassa GrandeExplanation / Answer
#include <iostream>
using namespace std;
// DECLARING FUNCTIONS
char customers(void);
// START MAIN
int main()
{
// DEFINING VARIABLES
int chili= 50;
string ordertype;
string order;
int n=1;
int i=0;
int batchcount;
// WELCOME SCREEN
nextline(); nextline();
cout << ' ' << " " << "!..... WELCOME LOUISE .....!";
nextline();
customers();
cout << "Checking Today's Customers .....Done!";//checking customers
cout << "How many batches of your famous chili are you making today?";
cin >> batchcount;
if(batchcount>4)
{
cout << "batch count not more than 4";
}
else
{
order();
}
void customers()
{
string names[20];
names[0]="Natassa";
names[1]="Demy";
names[2]="Elena";
while(i>2)
{
string name=names[i];
order();
}
}
void order()
{
cout << "Starting Orders......";
cout<<"enter order type";
void ordertype()
{
cout<<"Grande";
cout<<"Tall";
cout<<"short";
cin>>ordertype
}
i=i+1;
customers();
cout << "--customer"+n ":"+name"'s order is"+ordertype;
if(ordertype=="Grande")
cout << "Order Served.Still got lots of chili";
cout<<"Continue with orders or take a break?";
cin<<order;
if(order=="continue")
{
orders();
}
elseif(order=="break")
{
cout<<"OK, Press enter to continue when you are finished with your break";
}
else
{
cout<<"enter valid options break/continue";
if (cin.get() == ' ')
{
order()
}
}
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.