Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use the C language. Description of Programming Tasks Task 1 - Empty Classroom Seating Chart W e a program that points a seating chart

Please use the C language.
image text in transcribed
image text in transcribed
image text in transcribed
Description of Programming Tasks Task 1 - Empty Classroom Seating Chart W e a program that points a seating chart ar to that from the Prosect04 Description for an empty room site specified by the user Have the user enter in both the number of rows and the number of seats per row. Make sure the user input is reasonable by checking that the number of rows is 26 or less that the number of seats per row is not greater than 30, and that both are at least 1. Then, print to screen a carefully formatted seating chart where each row is represented with a letter and every seat in each row is uniquely identified with a letter and a number (see the sample output section below for examples). Some important considerations The format of your seating chart must match the sample output precisely (including whitespaces) in order to pass the test cases Capital letters Two digits for all numbers (eg, A05. K14, W24, etc.). Single space after each seat (including the last seat per row, before the new line character '), which means each seat uses a total of 4 characters The first row is at the bottom of the seating chart, and thus must be printed last. To achieve this task for general input from the user, a nested loop must be used. However, arrays and/or structs must not be used as they are beyond the scope of the course to this point. Task 2 - Every-Other Seating Chart Extend your program to also print out a seating chart where every other seat is taken by a student. Represent a taken seat as an "X". To keep the formatting neat, make sure to still reserve 4 total characters for each seat, ie if seat B12 is taken, replace it with an "X' that has one space before the 'X' and two spaces after (again, see the sample output section below for examples). Additionally, report the number of students that can be seated using this arrangement One important consideration: The first seat, A01, is taken, in addition to every other seat in row A Then, the taken seats in row Bare offset from row A and the pattern repeats for all the rows. Task 3 - More-Complicated Seating Chart Extend your program to also print out a seating chart that matches the pattern from the Project04 filled seating chart Use the logic you developed for your Project04 program, wrap it into appropriate loop(s), and modify the functionality for general user input for number of rows and seats per row (again, see the sample output section below for examples) Additionally, report the number of students that can be seated using this arrangement Sample Input/Output The following are sample executions of the program with m ed input and output. Recall the program should only take in two integer inputs for the number of rows and number of seats per row. Enter number of rows: 11 Enter number of seats por rows 16 BOOKS L ABE Printing Seating Charts ZbOORS C og HIFAU Harteng Lin - Empty Classroom Beating Chart: KOL KOZ KO3 K04 KOS K06 KOT KOS KO9 K10 K11 K12 K13 K14 K15 K16 J01 JOZ J03 304 JOS J06 JO7 JO8 J09 J10 J11 J12 J13 J14 J15 J16 TOI TO2 103 104 105 106 107 108 109 110 111 112 113 114 115 116 HOT HOZ HO3 04 05 06 07 08 09 110 1111 112 113 114 115 116 601 G02 G03 G04 G05 G06 GOT GO8 G09 G10 G11 G12 G13 G14 G15 G16 F01 F02 FO3 F04 F05 F06 F07 FOB FOO F10 F11 F12 F13 F14 415 416 01 02 03 04 05 06 07 EOS 09 10 11 12 13 14 15 16 D01 DO2 D03 004 DOS 106 107 DOS DO9 D10 D11 D12 113 114 115 116 C01 CO2 CO3 C04 COS C06 C07 C08 C09 C10 C11 C12 C13 C14 C15 C16 B01 B02 303 304 305 306 307 BOB B09 310 311 312 313 314 315 316 A01 A02 A03 104 105 A06 A07 A08 409 410 411 412 413 414 A15 A16 Every-Other Seating Chart: X KO2 XK04 X K06 X KOBX X10 X K12 XK14 X K16 JO1 X JO3 X J05 X JO7XJ09XJ11 X J13 J15 X X 102 X 104 X 106 x 108 x 110 X 112 X 114 X 116 H01 XHO3 X HOS X HO7 X HOS X H11 X H13 X H15 X X GO2 X G04 G06 GOB X 610 X G12 X 614 X G16 F01 X F03 X F05 X FO7 X FO9 X F11 X F13 X F15 X X EO2 X E04 XE06 X EOS X E10 X EIZ XE14 X E16 DOI X DO3 X DOS X D07 X 009 X D11 X D13 X D15 X X CO2 X C04 X 006 X COB X CIO X C12 X C14 X C16 B01 X B03 XB05 X BO7 X 209 x B11 X B13 X 315 X X A02 X A04 X 206 X A08 X A10 X A12 X 14 X A16 *88 students have seats in this arrangement More-Complicated Seating Chart: X X KO3 X X 206 X X 309 X X K12 X X K15 X J01 X JO3 X JOS X JO7 X J09 X J11 X J13 J15 X 101 X X 104 105 X X TO 109 X X 112 113 X X 116 X X HO3 X X H06 X X HO9X X 12 X X H15 X G01 XG03X GOS X 607 X G09 X 611 X 613 x G15 X F01 X X F04 F05 X X F08 F09 X X F12 F13 X X F16 X X E03 X X E06 X X E09 X X E12 X X 15 X DO1 X DO3 X DOS X DO7 X DO9X D11 X D13 X D15 X coi X X 004 C05 X X COB CO9 X X C12 C13 X X c16 X X B03 X X 306 X X 309 X X B12 X X 315 X A01 XA03 X A05XA07 X A09 X A11 XA13 X A15 X * 100 students have seats in this arrangement Enter number of Ows: 5 Enter number of seats per row: 7 Empty Classroom Seating Chart: E01 E02 E03 E04 E05 E06 E07 D01 DOZ D03 004 005 006 DO7 C01 CO2 C03 004 005 006 007 B01 B02 303 304 305 306 307 A01 A02 A03 A04 A05 A06 A07 Every-Other Seating Chart: 101 102 103 104 105 106 107 A01 A02 A03 104 105 106 107 Every-Other Seating Chart: X EO2 X E04 X 206 X DO1 X DO X DOS X DO7 X CO2 X C04 X 006 X B01 x B03 X BOS X B07 X A02 X A04 X 206 X * 18 students have seats in this arrangement More-Complicated Seating Chart: X X E03 X X E06 X D01 X DO3 X D05 X D07 C01 X X C04 C05 X X X XB03 X XB06 X A01 XA03 X A05XA07 *20 students have seats in this arrangement Enter number of rows: 30 Too many rows! Max. number of rows is 26. Enter number of rows: 0 Number of rows must be at least 1. Enter number of rows: 15 Enter number of seats per row: 50 Too many seats per rows! Max. number of seats per row is 30. Enter number of rows: 11 Enter number of seats per row: 0 Number of seats per TOW must be at least 1. PLEASE READ THIS COPYRIGHT STATEMENT Copyright 2020 Scott Reckinger. This assignment description is protected by U.S. copyright law. Reproduction and distribution of this work including posting or sharing through any medium, such as to websites like chegg.com, is explicitly prohibited by law and also violates UIC's Student Disciplinary Policy (A2-c. Unauthorized Collaboration and A2 e3. Participation in Academically Dishonest Activities: Material Distribution), Material posted on any third party sites in violation of this copyright and the website terms will be removed. Your user information will be released to the author 4.24.1: LAB": Printing Seating Charts 0140 L main.c

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago