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

Rapunzel i could use your help on this array question. Iaready pm you about the

ID: 3618027 • Letter: R

Question

Rapunzel i could use your help on this array question. Iaready pm you about the information about the question it is theseating assignment: This is the display of the seat assignment: 1   A B C D 2   A B C D 3   A B C D 4   A B C D 5   A B C D 6   A B C D 7   A B C D The program should display the seat pattern, with an X markingthe seats already assigned. For example, after seats 1A, 2B,4D are taken, the display should look like this: 1   X B C D 2   A X C D 3   A B C D 4   A B C X 5   A B C D 6   A B C D 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice. Rapunzel i could use your help on this array question. Iaready pm you about the information about the question it is theseating assignment: This is the display of the seat assignment: 1   A B C D 2   A B C D 3   A B C D 4   A B C D 5   A B C D 6   A B C D 7   A B C D The program should display the seat pattern, with an X markingthe seats already assigned. For example, after seats 1A, 2B,4D are taken, the display should look like this: 1   X B C D 2   A X C D 3   A B C D 4   A B C X 5   A B C D 6   A B C D 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice. 1   A B C D 2   A B C D 3   A B C D 4   A B C D 5   A B C D 6   A B C D 7   A B C D The program should display the seat pattern, with an X markingthe seats already assigned. For example, after seats 1A, 2B,4D are taken, the display should look like this: 1   X B C D 2   A X C D 3   A B C D 4   A B C X 5   A B C D 6   A B C D 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice. 1   A B C D 2   A B C D 2   A B C D 3   A B C D 3   A B C D 4   A B C D 4   A B C D 5   A B C D 5   A B C D 6   A B C D 6   A B C D 7   A B C D The program should display the seat pattern, with an X markingthe seats already assigned. For example, after seats 1A, 2B,4D are taken, the display should look like this: 1   X B C D 2   A X C D 3   A B C D 4   A B C X 5   A B C D 6   A B C D 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice. 7   A B C D The program should display the seat pattern, with an X markingthe seats already assigned. For example, after seats 1A, 2B,4D are taken, the display should look like this: 1   X B C D 2   A X C D 3   A B C D 4   A B C X 5   A B C D 6   A B C D 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice. 1   X B C D 2   A X C D 2   A X C D 3   A B C D 3   A B C D 4   A B C X 4   A B C X 5   A B C D 5   A B C D 6   A B C D 6   A B C D 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice. 7   A B C D After displaying the seats available, the program prompts forthe seat desired, the user types in a seat, and then the display ofavailable seats is updated. This continues until all seats arefilled or until the user signals that the program should end. Ifthe user types in a seat that is already assigned, the programshould say that that seat is occupied and ask for anotherchoice.

Explanation / Answer

please rate - thanks hope you've learned functions-easy to change if you haven't //Airplane seat assignment #include #include using namespace std; const int MAX_ROW = 7; const int MAX_SEAT = 4; void chooseseat(char[][MAX_SEAT]); void purchase(int,int,char[][MAX_SEAT]); void clearseats(char[][MAX_SEAT]); void display_seating(char [][MAX_SEAT]); bool assign_seat(char [][MAX_SEAT], int rows, int row, intcol); int main() { int row, col; int input_row,left; left=MAX_SEAT*MAX_ROW; char seat[MAX_ROW][MAX_SEAT],more='Y'; clearseats(seat); display_seating(seat); while(left>0&&toupper(more)=='Y') {chooseseat(seat);    display_seating(seat);    coutmore; } system("pause"); return 0; } void clearseats(char seats[][MAX_SEAT]) {int i,j; for(i=0;i