Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Absolutely no arrays or vectors may be used ) Purpose:Under the Charm budgetary measures, fill rates will determine the number of sections offered by a
Absolutely no arrays or vectors may be used Purpose:Under the Charm budgetary measures, fill rates will determine the number of sections offered by a department and whether a given class will be canceled or not.In this Lab you will write a C program to determine fill rates and output report needed by the CIS department. See file Springtxt Structure mandated: There is to be main an output function and no other function except for an optional signature function.In main open an input file Springtxt that will remain open for the entire program execution.Also in main open an output file that will remain open until the end of the execution see slide of Everything you need to know about File IOOutput the heading directly to the file from mainWithin a loop process the following input, calculation, and output until end of file.Inputstring for course CRN number,string for class name eg CIS DZstring for modalityinteger for current enrollmentinteger for maximum enrollment,integer for number of students on waitlist,Use getlinefile string name to input text with spaces such as the name of the class. You will enjoy knowing about file.ignore Mac users usually are using a text editor that has rl ie two characters, at the end of each line. See separate item in this module. If modality is not "ONLINE" change it to "HYBRID". Computation Warning: avoid integer division truncation issues. File rate is sum of current enrollment plus number of students on waitlist divided by the maximum enrollment. NB If the maximum enrollment is zero, skip this data completely since dividing by zero is undefined.Output: Call output function to output to the file opened the CRN # class title, the fill rate formatted with one digit to the right of the decimal point, and the modality. After all data is read, ie after the loop is done executing, output the highest fill rate along with the class name only these two data items! THEME ISSUES: file input, file output Sample output:CRN Course Fill Modality Rate CIS Z ONLINE CIS Z ONLINE CIS Z ONLINE. CIS Z ONLINE CIS Z ONLINEHighest Fill Rate: CIS DZ
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started