Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C++ program that will simulate a drive-in for a new fast-food place, Tac

ID: 3763170 • Letter: W

Question

Write a C++ program that will simulate a drive-in for a new fast-food place, Taco Fry, where you get good greasy food, Mexican style.You may use a linked list for the eventList. Find the average wait for people going through the drive-in. Read the input from a sample file like:

20 5

22 4

23 2

30 3

The output would be:

Taco Fry drive-in

new event A 20 5

new event A 22 4

new event A 23 2

new event D 25

Customer at time 22 had to wait 3

new event D 29

Customer at time 23 had to wait 6

new event A 30 3

new event D 31

Customer at time 30 had to wait 1

new event D 34

Average wait time was 2.5

Explanation / Answer

#include #include #define GST 0.05 #define PST 0.08 struct food { char *item; double price; int count; } menu[] = { "Double Cheeseburger", 2.25, 0, "Onion Rings", 1.00, 0, "Veggie Burger", 2.50, 0, "Bottled Drink", .95, 0, "Ice Cream Cone", .95, 0, }; double total(double index) { double price = 0.00; price += 100 * index; return price; } void print_menu(int max) { int i; int c = 'A'; printf(" Welcome to Max's Hamburgers "); fprintf(stdout, "%-10s%-10s%-24s%-14s ", "Item", "Count", "ENTREES", "Price"); for (i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote