\"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;\"> This proj
ID: 3536055 • Letter: #
Question
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
This project deals with creating a menu-driven program that
employees of the coffee shop in the university student union will
use. The shop sells coffee in three sizes : small (9 oz), medium
(12 oz), and large (15 oz). The cost of one small cup
is $1.75, one medium cup is $1.90, and one large cup is
$2.00. The program must allow the Spot coffe employee
to do the following :
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
a. Enter the customer coffee order (the size and
number of cups).
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
b. At any time, show the total number of cups of each
size sold up to that point.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
c. At any time show the total amount (in
ounces) of coffee sold up to that point.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
d. At any time show the total money made up to that
point.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
The program must consist of at least these functions :
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
1. A function to present the menu
choices. The choices are :
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
-
1: Enter 1 to order coffee."
- 2: Enter 2 to check the total money
made up to this time."
- 3: Enter 3 to check the total amount of
coffee sold up to this time."
- 4: Enter 4 to check the number of cups
of coffee of each size sold."
- 5: Enter 5 to show
all the data for choices 1 through 4 so far.
- 9: Enter 9 to exit the
program."
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
2. A function to record the coffee order from the
customer. This function can present the following
coffee menu :
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
- 1: Enter 1 to
buy coffee in a small cup size (9 oz)
- 2: Enter 2 to
buy coffee in a medium cup size (12 oz)
- 3: Enter 3 to
buy coffee in a large cup size (15 oz)
- 9: Enter 9 to
exit.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
3. A function to show the number of cups of each size sold.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
4. A function to show the total amount of coffee sold.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
5. A function to show the total money made.
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
This is what I have so far and I have NO clue where to go from
here. Please help:
"font-family:Arial, Verdana, Helvetica, sans-serif;font-size:16px;">
#include
#include
using namespace std;
void Menu();
void OrderCoffee();
void CupsSoldA(int CupsSoldB[3]);
const double SmallCost=1.75;
const double MediumCost=1.90;
const double LargeCost=2.00;
int main(void)
{
int choice;
int Size;
int ZeroCups;
system("PAUSE");
return EXIT_SUCCESS;
}
void menu()
{
cout<
to order coffee"<<" "; p="">
cout<
to check the total money made up to this time"<<" "; p="">
cout<
to check the total amount of coffee sold up to this
time"<<" "; p="">
cout<
to check the number of cups of coffee of each size
sold"<<" "; p="">
cout<
to show all the data for choices 1 through 4 so
far"<<" "; p="">
cout<
to exit the program"<<" "; p="">
}
void OrderCoffee()
{
int ch=0;
menu();
}
void CupsSoldA(int CupsSoldB[3])
{
cout<
number of small cups sold: "<[0]>
cout<
number of medium cups sold: "<[1]>
cout<
number of large cups sold: "<[2]>
}
Explanation / Answer
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #000000;
background-color: #FFFFFF;
padding: 0px;
margin-top: 32px;
margin-right: 0px;
margin-bottom: 10px;
margin-left: 0px;
vertical-align: top;
text-align: left;
}
p {
font-size: 11px;
padding_top: 0px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
text-align: left;
vertical-align: top;
padding-top: 0px;
margin: 0px;
line-height: 24px;
}
h1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 20px;
text-transform: capitalize;
color: #D22C30;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #CDCDCD;
font-weight: normal;
letter-spacing: 2px;
word-spacing: 2px;
background-color: #FFFFFF;
width: 552px;
padding-top: 16px;
padding-right: 10px;
padding-left: 10px;
padding-bottom: 10px;
text-decoration: none;
line-height: 20px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 12px;
margin-left: 0px;
}
h2 {
color: #333333;
padding-left: 10px;
letter-spacing: 1.25px;
font-size: 11px;
text-decoration: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
text-transform: uppercase;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 5px;
margin: 0px;
}
h3 {
color: #D22C30;
letter-spacing: 1.25px;
font-size: 18px;
text-decoration: none;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: bold;
text-transform: uppercase;
margin: 0px;
padding: 10px 0px 0px 10px;
}
h4 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
text-transform: capitalize;
color: #000000;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #CDCDCD;
font-weight: bold;
letter-spacing: 2px;
word-spacing: 2px;
background-color: #FFFFFF;
width: 552px;
padding-top: 16px;
padding-right: 10px;
padding-left: 10px;
padding-bottom: 10px;
text-decoration: none;
line-height: 16px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 14px;
margin-left: 0px;
}
#ListTitle {
font-size: 14px;
font-weight: bold;
color: #640200;
padding-top: 16px;
padding-right: 0px;
padding-bottom: 6px;
padding-left: 10px;
font-family: Arial, Helvetica, sans-serif;
}
#hubTable {
width: 500px;
}
#link {
font-weight: bolder;
color: #660000;
text-decoration: none;
letter-spacing: 1px;
text-transform: none;
}
table, td {
padding: 0px;
border-collapse: collapse;
border: none;
}
#tableLayout {
color: #333333;
background-color: #FFFFFF;
width: 764px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
#tableNav td {
padding: 0px;
background-color: #D3D3D3;
}
#tableFooter {
width: 100%;
}
#tdFooterLeft {
width: 190px;
background-image: url(../rule1.gif);
background-repeat: no-repeat;
background-position: center top;
}
#tdFooterRight {
width: 574px;
text-align: right;
padding-top: 4px;
padding-right: 6px;
padding-bottom: 0px;
padding-left: 0px;
background-image: url(../rule2.gif);
background-repeat: no-repeat;
background-position: center top;
}
#tdTopNav1 {
width: 190px;
}
#tdTopNav2 {
height: 242px;
}
#tdTopNav3 {
width: 168px;
}
#tdTopNav4 {
width: 88px;
}
#tdTopNav5 {
width: 76px;
}
#tableContent {
width: 100%;
}
#tdLeftMenu {
width: 190px;
vertical-align: top;
background-image: url(../leftmenu_bkg.gif);
background-repeat: repeat-y;
background-color: #363636;
}
#tdContentWindow {
width: 574px;
background-image: url(../content_bkg.gif);
background-repeat: repeat-y;
vertical-align: top;
}
#tableBanner {
width: 100px;
}
#tdBannerCenter {
width: 764px;
}
#ulFooter {
margin: 0px;
padding: 0px;
}
#ulFooter li {
display: inline;
float: right;
padding-right: 0px;
padding-top: 10px;
padding-bottom: 100px;
padding-left: 4px;
}
#ulFooter a:link, a:visited, a:active {
color: #333333;
font-weight: normal;
text-decoration: none;
}
#ulFooter a:hover {
text-decoration: underline;
color: #990000;
font-weight: normal;
}
ul {
padding: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 10px;
list-style-type: none;
}
#indent {
padding-top: 0px;
padding-right: 20px;
padding-bottom: 0px;
padding-left: 20px;
}
.bold {
font-weight: bold;
}
.redbold {
color: #990000;
font-weight: bold;
}
.darkgrey {
color: #333333;
}
.list {
line-height: 8px;
}
#ParaTitle {
font-size: 14px;
font-weight: bold;
color: #333333;
padding-top: 16px;
padding-right: 0px;
padding-bottom: 6px;
padding-left: 10px;
font-family: Arial, Helvetica, sans-serif;
letter-spacing: 1px;
}
#ParaNumber {
font-size: 11px;
color: #990000;
margin: 0px;
padding-top: 4px;
padding-right: 0px;
padding-left: 0px;
padding-bottom: 0px;
text-decoration: none;
font-weight: bold;
text-indent: 10px;
text-align: left;
}
#ParaTitleTop {
font-size: 14px;
font-weight: bold;
color: #333333;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 6px;
padding-left: 10px;
font-family: Arial, Helvetica, sans-serif;
letter-spacing: 1px;
}
.lightgrey {
color: #999999;
}
a:link {
color: #333333;
text-decoration: none;
}
a:visited {
color: #333333;
text-decoration: none;
}
a:hover {
color: #990000;
text-decoration: underline;
}
a:active {
color: #333333;
text-decoration: none;
}
.SpaceBelow {
padding-top: 0px;
padding-right: 10px;
padding-bottom: 20px;
}
.SpaceAtBottom {
padding-top: 0px;
padding-right: 10px;
padding-bottom: 52px;
}
.white {
color: #FFFFFF;
}
.directory {
line-height: 22px;
text-indent: 10px;
background-color: #E6E6E6;
}
.directory_alt {
background-color: #F8F8F8;
line-height: 22px;
text-indent: 10px;
}
.directory_clear {
line-height: 22px;
text-indent: 10px;
}
Plsz rate me 1st
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.