Question
C++ language You are required to build the course approval system for USP. Currently, during the registration week academics manually check if a student is
C++ language You are required to build the course approval system for USP. Currently, during the registration week academics manually check if a student is meeting prerequisites for a given course. Write a program in C++ to solve this problem. For simplicity, assume there is no more than one prerequisite for any given course. Four files are provided with this assignment. Courses.txt shows courses with corresponding prerequisites (0 means a course is offered in both semesters, 1 means that course is offered in semester 1 and 2 means that a course is offered in semester 2), CSstudents.txt shows list of courses passed by the students, Students.txt shows list of students at USP and Registration.txt shows list of students with current registration. Do not change the format (columns and first row) of the sample files so that your program can read any file of the same format. For any further clarification post your questions on Moodle. Some rules apart from prerequisite for courses apply during registration: ? A student can enrol in at most two courses per semester. ? A student can only do courses at the same level. For example, if a student has passed all 100lvel CS course than the student can do courses from 200- level. Currently its semester 2. Requirements 1. This problem must be solved Arrays. You need four arrays namely student, course, registration and CSstudents. 2. The main program should be able to do the following: ? Create necessary arrays to store the records of the file. ? Read the data file for up to size of 100. ? Create a menu for the user that can do the following: o Exit program o Display all students at USP o Display all Courses offered at USP o Display details of students (id, name, age, and phone) registered in a course entered by user. o Register a student into a course. This should also add detail in the necessary files and array. Note, registration has some rules apart from prerequisite of a course. o Display all registration ? Except the first menu, all others should be implemented using functions of the main program. TEXT FILES: Courses.txt course Prereq Semester cs111 NA 0 cs112 cs111 2 cs240 cs112 1 cs241 cs240 2 cs214 cs112 2 cs215 cs112 2 cs218 cs111 2 cs310 cs215 1 cs311 cs112 1 cs317 cs215 2 cs318 cs218 2 cs324 cs240 2 cs341 cs241 1 CSstudents.txt student courses s111 cs111 s111 cs112 s222 cs111 s333 cs111 s333 cs112 s333 cs214 s333 cs240 s444 cs111 s444 cs112 s444 cs214 s444 cs218 Registration.txt student courses s111 cs214 s222 cs112 Student.txt ID lname fname age phone s111 Chand Kay 22 12345 s222 Dev Ron 19 12346 s333 Tom John 20 12456 s444 Timothy Jacob 22 12486
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