Program Assignment
Objectives
• Practice reading from and writing to files.
• Practice using data structures.
• Learn to work in a team
Description:
Using the same team you had for program 1, create a program that reads in a list of CSCI classes from a file (must use file pointers). Store the list in a data structure. Allow the user (a student) to have the following options:
1) Print all classes by CSCI number (include all information) in order of CSCI number.
2) Print all classes available on MWF or available on TR in order of times.
3) Print the class available at a specific time (test this with MWF 0900 and TR 1100)
4) Print classes available to freshman, sophomore, junior or senior (corresponds to last number on each line in the input file) in order of CSCI number. This means you have to convert back and forth between the strings (freshman, ...) and the numbers (1,2, ...).
5) Quit
Requirements:
You must use the input file in /home/csci112 called classes.txt to input the data.
You must provide the options to the user on the screen as shown above in description.
You must write all information asked for by the user to an output file. This means that you will need to interact with the user (asking for options) by printing to STDOUT but print all the responses to the queries to a file.
To print class information, print in the following order:
Title, Class number (ex: CSCI112), available for (freshman, soph...), day, time.
You must loop on user queries until the user selects the quit option.
You must exit with a failure if any error is found in user input.
Place each function or group of functions in a separate file (.c) and have a Makefile that compiles all your code together to make the executable. A group of functions means that you might have all your print functions in one file, but you would not have the query function in the same file as the print functions.
Format your assignment according to the following formatting requirements:
1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.
2. The response also include a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.
3. Also Include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.