Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program in C using Conditionals, Loops, Bubble Sort, and Arrays. Your classroom program will help teachers by automatically assign the most appropriate class

Create a program in C using Conditionals, Loops, Bubble Sort, and Arrays.
Your classroom program will help teachers by automatically assign the most appropriate class room based on the capacity of the classrooms available and the number of students expected to be enrolled in a given course.
To complete this assignment, you will need to understand Conditionals, Loops and Arrays.
Write a program that uses the data provided in the table below using arrays to determine the best classroom for the list of classes provided by the teacher.
Room Capacity
101 8
102 25
103 33
104 50
105 51
200 70
201 88
202 15
203 100
204 66
Create a program which prompts the user to enter in the following information for up to 5 courses:
Course Number
Enrollment
If the user enters E after listing their courses or the user enters 5 courses determine the best classroom for each course based on the number of students to be enrolled. The best room will have the least number of remaining seats.
For example, if I entered enrollments of 24 students for course 1 and 25 students for course 2, I would expect course 1 to be assigned Room 102 and course 2 to be assigned room 103.
HINT: Sort the data by capacity, use a bubble sorting algorithm in a function called Sort where your arrays are parameters (will be covered in lecture)
The output should look like this:
Room Assignments
Course Room Capacity Enrollment Number of Empty Seats
1 102 25 24 1
2 103 33 25 8
Save your program as ClassroomScheduler_01.c
Turn in ClassroomScheduler_01.c
image text in transcribed
The output should look like this: Room Assignments Course Room 102 103 25 24 2 Save your program as ClassroomScheduler_01.c Turn in ClassroomScheduler 01.c 25 8

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions