Description
class item_detail
{
int price;
// Create an array to keep detail of the ingredient used in an item string name;
int id; static int total_order=0;
item_detail(????) /*create a constructor to initialize the class variable, make use of variable length arguments for input of ingredient*/
{
??????
}
}
// end of class class person
{
string name; int mobile_no; int order_no;
// create an array to keep track of items the person order during his/her visit, a person can visit restaurant multiple time person(string name,int mobile_no)
{
this.name=name; this.mobile_no=mobile_no; order_no=0;
}
void placeOrder(item_detail[] a) // this method will accept the item_detail for one order and store the detail in order history
{
??
}
void displayHistory()
{
// this method will traverse array and display the detail of order the person has placed
}
}
// end of class class Restaurant
{
// create an array to store the item serve by the restaurant
// create an array that will hold the detail of the customer that visit restaurant
Restaurant() // this constructor will initialize the menu of the restaurant
{
}
void addcustomer(person p) // this method will add customer to the restaurant
{
}
void placeOrder(person p) // this method will accept person object and update the order placed by the person in his/her order history
{
}
void DisplayPersonHistory(person p) // this method will display the detail of the order placed by the person
{
}
void DisplayMenu() // this method will display the item served by the restaurant
{
}
void DisplayBill(Person p) // this method will display the bill of a person
{
}
void totalrevenue() // this method will display the total revenue of the restaurant
{
}
void displayPremiumCustomer()// this method will display the customer who has spent more than 1000 rs in the restaurant
{
}
//end of class
// create a main class that will display option to user for viewing menu of the restaurant.
// view total revenue of the restaurant
// view order history of a person and current bill of a person, a person is identified by his/her mobile number
// view premium customer
// place order
//add customer




Reviews
There are no reviews yet.