Question: Assignment descriptions: This assignment contains four files. 1 . orderMenu . h This header file contains the following structs and function prototypes. 1 #ifndef ORDERMENU
Assignment descriptions:
This assignment contains four files.
orderMenuh
This header file contains the following structs and function prototypes.
#ifndef ORDERMENU H
#define ORDERMENUh
typedef structi
char food
;
float price;
int quantity;
JOrder;
typedef struct
char name
;
int numberOfOrder;
Order order
;
Customer;
void orderMenu
void
;
void makeOrder
Customer
;
void printReceipt
Customer
;
#endif
orderMenuc
Implement all the functions listed on the orderMenu.h
algomaFastfoodc
This is a test file. You can use the file below to test your program.
#include
#include "orderMenu.h
int main
int argc, char
argvil
Customer customer; makeOrder
customer
; printReceipt
customer
;
return
;
makefile
This file contains a set of instructions or rules to compile your program. When you are ready to submit your assignment, please rename your 'makefile' to
'makefile.txt
Otherwise you will not be able to upload it to the Moodle.
Functions Specification:
void orderMenu
void
;
Description: This function displays a menu of eight food items with their corresponding prices on the screen.
Pre
condition: none
Post
condition: An order menu is displayed on the screen.
void makeOrder
Customer
;
Description: This function prompts the customer with the message "Hello, what is your name?" to obtain the customer's name. The customer's name will be stored in a Customer object. Then, the function prompts the customer to place food orders. The function will continue prompting the customer for orders until the customer indicates they do not want to order anymore.
Pre
condition: A customer object must exist.
Post
condition: All customer orders will be stored in the Customer object. The action of the makeOrder function is shown below. benkam@AlgomaU:~
algoma
week
assign$
order
Hello, what is your name? Jack Bauer Filet
O
Fish................$
Ham Sandwich................$
French Fries................ $
Cheeseburger...............$
Chicken Salad.............$
Soft Drinks.................$
Milk$
Prat woute you like? Ham Sandwich
How many would you like?
Would you like to continue your order?
Please enter either yes or no: yes
Han Sandwich.
Filet
O
Fish................$
Ham Sandwich................$
French Fries................$
Cheeseburger................$
Chicken Salad...............$
Soft Drinks.................$
Milk$
Premium Tea.........
What would you like? French fries
How many would you like?
Would you like to continue your order?
Please enter either yes or no: no
void printReceipt
Customer
;
Description: This function prints the order information for a customer, including the customer's name, food items, prices, and total cost.
Pre
condition: A Customer object must exist.
Post
condition: A receipt is printed on a screen.
An example of a receipt is shown below.
Order Receipt
French Fries @$
x
$
Ham Sandwich @$
x
$
Tax
$
Total:............................$
write c code according to this
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
