Question: Assignment 5: File I/O CS 3424 - Systems Programming For this assignment, you will use Cs 1/O functions to create a simple course catalog database

Assignment 5: File I/O CS 3424 - Systems
Assignment 5: File I/O CS 3424 - Systems Programming For this assignment, you will use Cs 1/O functions to create a simple course catalog database for administrators to update the details of each course offered by the CS department. The system will store basic information about each course, allowing the user to create, read, update, and delete them. All information for all courses will be stored as binary records in a single file. This assignment requires only the utilities used so far in the 1/O lecture notes. Do not use bash, sed, awk, find, grep, Python, or any programming languages or utilities besides the C binary functions used and discussed in class. Only binary 1/O functions should be used to store data to the file system (it is acceptable to use other functions when prompting the user for command input sequences). Storing Course Information All course information will be stored in a single binary structure as records of the following structure, where name is the name of the course (which may contain spaces), schedule represents the course schedule (either strings MWF or TR), hours is the number of credit hours for the course, and size is the number of students currently enrolled in the course. You will use a zero-valued hours member value to determine and control a course's existence/validity within the file. 1 typedef struct { 2 char name [80]; char schedule[4]; 4 unsigned hours; 5 unsigned size; unsigned padding; // unused but required 7 } COURSE; The program will store all courses using the above struct in a single file called courses.dat, located within the same directory as the program (this file is provided to you). All courses will be referenced using their course number as their index (e.g., course i will be located in the data file at relative byte offset i * sizeof(COURSE). Course records will be stored in courses.dat in course-number order. Note that the course numbers will be specified by the user when a course is entered, and will not necessarily be sequential. If courses.dat does not exist, it should be created by the program in the current directory. You must use the files located at: Assignment 5: File 1/0 Page 1 of 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!