Click Here Code Skeleton.
Click Here HW Description.

Recommended Answers

All 5 Replies

what kind of problem are you having? why not paste your code here?

Really thanks for your interest with my problems:
The C++ Code:

//---------------------------------------------------------------------------
// Program:  Yarmouk University Pizza 
// Purpose:  This program simulates a Pizza Store  
//---------------------------------------------------------------------------
#include <iostream>
#include <iomanip>
#include <cstring>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

const char LARGE = 'L';
const char SMALL = 'S';
const char MEDIUM = 'M';
const char Yes = 'Y';
const char No = 'N';
const string YARMOUK = "Yarmouk Special" ;
const string CHEESE = "CHEESE";
const string VEGGIE = "VEGGIE";
const string CHICKEN = "CHICKEN";
const char CONTINUE= 'Y';
const char CASH = 'C';
const char CREDITCARD = 'D';



//---------------------------------------------------------------------------
// Name: confirmPizza
// Parameters: string, Pizza to indicate the type of Pizza
// Returns: char, Y or N, to confirm buying the Pizza
//---------------------------------------------------------------------------







//---------------------------------------------------------------------------
// Name: GetSize()
// Parameters: None.
// Returns: char, S, M or L. Indicates the size of PIZZA
//---------------------------------------------------------------------------







/************************************/
// Check the Data Type of the Input
/***********************************/






//---------------------------------------------------------------------------
// Name: GetNumber()
// Parameters: Non
// Returns: int, the number of pieces of Pizza needed.
//---------------------------------------------------------------------------






//---------------------------------------------------------------------------
// Name: ComputePrice()
// Parameters: double, int. The price and the number of the selected pizza. 
// Returns: double, the total cost of purchasing Pizza
//---------------------------------------------------------------------------








//---------------------------------------------------------------------------
// Name: Chicken Pizza
// Parameters: double (by reference). To return the cost of the selected Pizza 
// Returns: double as by reference, the price of chosen chicken pizza
//---------------------------------------------------------------------------








//---------------------------------------------------------------------------
// Name: Veggie Pizza
// Parameters: double (by reference). To return the cost of the selected Pizza 
// Returns: double as by reference, the price of chosen Veggie pizza.
//---------------------------------------------------------------------------









//---------------------------------------------------------------------------
// Name: Yarmouk Special Pizza
// Parameters: double (by reference). To return the cost of the selected Pizza 
// Returns: double as by reference, the price of chosen Yarmouk Special pizza..
//---------------------------------------------------------------------------







//---------------------------------------------------------------------------
// Name: Cheese Pizza
// Parameters: double (by reference). To return the cost of the selected Pizza 
// Returns: double as by reference, the price of chosen Cheese pizza.
//---------------------------------------------------------------------------








//---------------------------------------------------------------------------
// Name: PrintBill
// Parameters: double , Total Cost 
// Returns: None.
//---------------------------------------------------------------------------








//---------------------------------------------------------------------------
// Name: CONT
// Parameters: None.
// Returns: char, Y or N. To indicate continue shopping or not.
//---------------------------------------------------------------------------







//---------------------------------------------------------------------------
// Name: PrintMenu
// Parameters: None.
// Returns: None.
//---------------------------------------------------------------------------








//---------------------------------------------------------------------------
// Name: Pay
// Parameters: double, Price.
// Returns: double, change.
//---------------------------------------------------------------------------








//---------------------------------------------------------------------------
//      This is the main program that you need to write 
//---------------------------------------------------------------------------
int main()
{
// Declarations 
   // Declarations 
   double Price = 0.0;
   double Change = 0.0;
   int PChoice;



   // Print your name and UAID
   cout << "Name: Yarmouk Pizza \n";
   cout << "ID: 11111111\n\n";

   // Print the Menu
   PrintMenu(); 

   do
   {


   // Ask the customer what type of Pizza s/he prefers to buy, and always ask him/her
   // if s/he want to continue shopping.
   do
   {
   cout << "What type of Pizza you like to Buy, Enter a Number between 1 and 4:  ";
   cin >> PChoice;
   CheckDataTypeError();
   } while (PChoice < 1 || PChoice >4);

   // calling the appropriate functions
   if (PChoice == 1)
      Chicken(Price);
   else if (PChoice == 2)
      Veggie(Price);
   else if (PChoice == 3)
      YarmoukSpecial(Price);
   else if (PChoice == 4)
      Cheese(Price);
   else
      cout << "your choice is invalid" << endl; 



   } while (toupper(CONT()) == CONTINUE); 

   // Pay and return the change
   if (Price > 0) // transaction was not canceled
   {
     Change = Pay(Price);

     // Print the Bill
     PrintBill(Price, Change);
   }
   else 
       cout << "\nYour Transactions has been canceled! Come Back Again!\n";

   return 0;
}

what are you having a problem with?

Since we have no clue what that program is supposed to do how do you expect anyone to help you? Help you do what, exactly?? Do you take your car to a repair garage and tell them "it's broke. Please help me fix it."? Of course not, you have to tell then what you think is wrong. Same thing here.

It seems to me that you have not even started implementing the functions. The function comments (given by your tutor) give you a good hint of what you're suppose to do in each function.

First do this homework on paper, then implement the functions in this code. That way will make this coding so much easier.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.