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

Colossus Airlines (from Q2) acquires a second plane (same capacity) and expands

ID: 3671774 • Letter: C

Question

Colossus Airlines (from Q2) acquires a second plane (same capacity) and expands its service to four flights daily (Flights 102, 311, 444, and 519). Expand the program to handle four flights. Have a top-level menu that offers a choice of flights and the option to quit. Selecting a particular flight should then bring up a menu similar to that of Q2. However, one new item should be added: confirming a seat assignment. Also, the quit choice should be replaced with the choice of exitingto the top-level menu. Each display should indicate which flight is currently being handled. Also, the seat assignment display should indicate the confirmation status

Explanation / Answer

#include #include #include #define CAPACITY 12 #define MAXNAML 20 struct Seat { int id; bool assigned; char last[MAXNAML]; char first[MAXNAML]; }; int size = sizeof(struct Seat); struct Seat seats[CAPACITY]; char * get(char *, int); void printmenu(void); void countempty(void); void listempty(void); void showalphabetical(void); void assigncustomer(void); void deleteassignment(void); int main(void) { FILE * fp; int ch = 0; int id; struct Seat tmp; for (int i = 0; i