Programe in c++

Department of computer science at Birzeit University offers a set of courses each semester. These courses are listed in a file as follows: course name, course id, year (120, 121 …), and max number of students.
The course id must start with COMP. The year refers to the student’s registration year (e.g., 115 means that the students who registered in this the year 2015 or before are allowed to register this course, while the 116 are not allowed). The file that contains the courses’ information is formatted as follows:
Java,COMP231,120,30
Data Structures Java,COMP242,119,30
Algorithms,COMP336,114,30
Introduction to programming,COMP133,116, 27
….
Students’ information; name, id, courses to be registered (COMP242, COMP336, COMP231…) are listed in a file as follows:
Ahmad Ali#1189999# COMP242#COMP336#COMP231#COMP338 Khaled Mahmoud#1191123# COMP242#COMP336#COMP231 Amal Mohammad#1199999# COMP242#COMP336#COMP231
….
Please note that the first three digits (from left) of the student’s ID represent the registration year.
To Do:
1. Read the offered courses from the courses file into a linked list, and then read the students (from the
second file) into another linked list. After that, the students are to be added to these courses in an array of linked lists. Before adding any student to any course, you have to make sure that:
a. The course is offered by the department (i.e. is available in the list). The student may ask to register for a course (i.e., Security) while it is not offered on that semester!
b. The student is allowed to take that course (according to his registration year).
c. The student can register for at most 5 courses each semester.

d. The student can not register in a closed course, e.g. number of registered students reach the maximum number. Alternatively, add this student to a waiting list for this course.
e. Show a relevant message in case the student can not register a course, e.g. closed course, course not offered, the student registered 5 courses, etc.
2. Your program should have all functionalities working properly.
3. There has to be adequate documentation and comments in the code (i.e., functions, loops, etc.).
4. Your code should follow the code convention (i.e., spaces, indentations, etc.); and
5. Your program should contain a menu to allow the user to select which option (s) he would like to
run (Choose any suitable menu that contains all functionalities).
6. Reports:
The department’s chair needs the following reports by the end of the registration process (give the user the ability to print on a file).
 Print the students’ list that contains all students’ information (ordered based on student’s ID) in each course in a table format (a table for each course).
 Print a course list (ordered based on course name) that contains, the course name, course id, number of registered students in that course, and number of students in the waiting list for that course.
 Print a list of all courses that have less than 5 students.
 Search for any course based on course ID, if found, print all students ids’ and names’ in this course.
 Search for any student based on student ID, in a given course

course txtfile

Data Structures Java,COMP242,115,20
Algorithms,COMP336,114,20
Introduction to programming,COMP133,116,27
INTRODUCTION TO COMPUTER,COMP121,115,15
INTRODUCTION TO COMPUTER,COMP122,115,20
INTRODUCTION TO COMPUTERS AND COMPUTING ETHICS,COMP131,113,25
COMPUTER AND PROGRAMMING,COMP142,115,15
COMPUTER AND PROGRAMMING,COMP230,114,13
ADVANCED PROGRAMMING,COMP231,113,,20
DATA STRUCTURES,COMP2321,114,13
DISCRETE MATHEMATICS,COMP233,115,10
SERIOUS GAMING FUNDAMENTALS,COMP2331,113,20
DATA STRUCTURES,COMP2421,114,15
LINUX OPERATING SYSTEMS LAB,COMP311,115,7
HUMAN COMPUTER INTERACTION,COMP332,113,9
DATABASE SYSTEMS,COMP333,112,10
WEB APPLICATION AND TECHNOLOGY,COMP334,113,15
ANIMATION,COMP3351,112,10
CONTENT CREATION,COMP3361,114,12
ARTIFICIAL INTELLIGENCE,COMP338,115,10
INTRODUCTION TO GRADUATION PROJECT,COMP4200,116,10
GRADUATION PROJECT,COMP4300,114,20
OPERATING SYSTEMS,COMP431,112,10
SOFTWARE ENGINEERING,COMP433,113,15
COMPILER CONSTRUCTION,COMP439
15,10

student file

Emma Stone#1169876#COMP242#COMP333#COMP336#COMP133#COMP231
Emma Watson#1169875#COMP336#COMP2421#COMP231#COMP338#CCOMP3351
Kevin Hart#1146542#COMP142#COMP242#COMP231#COMP336#COMP331#COMP334
George Clooney#1164561#COMP336#COMP2421#COMP231#COMP338#CCOMP3351
Matt Damon#1118764#COMP439#COMP4232#COMP422#COMP311#COMP338
Johnny Depp#1019876#COMP311#COMP242#COMP233#COMP3431#COMP333#COMP432
Dylan O'Brien#1167653#COMP433#COMP422#COMP439#COMP334#COMP311
Leonardo Dicaprio#1165429#COMP2421#COMP122#COMP142#COMP230#COMP311
Keira Knightly#1135632#COMP432#COMP431#COMP242#COMP336
Emilia Clarke#1143256#COMP432#COMP3361#COMP311#COMP411
Ahmad Ali#1159999#COMP242#COMP336#COMP231#COMP338 
Khaled Mahmoud#1169999#COMP121#COMP2331#COMP242#COMP336#COMP231 
Amal Mohammad#1139999#COMP242#COMP411#COMP336#COMP231
Hala Salameh#1159873#COMP311#COMP121#COMP333
Jon Snow#1156666#COMP311#COMP334#COMP2421#COMP333
Khulood Sabri#1152561#COMP2331#COMP3351#COMP332
Khaled Sabri#1130022#COMP2421#COMP3361#COMP3351
Mohammad Sabri#1168743#COMP411#COMP432#COMP422
Huda Jameel#1134321#COMP131#COMP3351#COMP311#COMP121
Tuqa Nawareh#1140932#COMP336#COMP311
Aseel Jubeh#1136754#COMP142#COMP122
Rinad Ahmad#1127632#COMP231#COMP422#COMP131
Muna Rami#1154936#COMP311#COMP311#COMP133#COMP334#COMP233
Shahd Bashar#1140001#COMP332#COMP311#COMP24211
Jameel Ahmad#1166666#COMP230#COMP121#COMP231
Deema Ahmad#1137632#COMP133#COMP439#COMP334#COMP24211
Taqwa Adham#1164354#COMP311#COMP233#COMP3351
Adam Waheedi#1166983#COMP332#COMP2421#COMP131
Reem Naqeeb#1150683#COMP131#COMP3351#COMP311#COMP122
Hani Saleh#1143896#COMP233#COMP411#COMP311#COMP333
Taim Tamimi#1153957#COMP122#COMP431#COMP133#COMP121
Rami Sami#1167384#COMP231#COMP338#COMP3361#COMP24211
Donia Khaled#1145213#COMP121#COMP336#COMP334
Yara Basel#1130043#COMP142#COMP2331#COMP131
Saleh Kharoubi#1129745#COMP131#COMP122
Seema Quraan#1159832#COMP121#COMP233#COMP24211
Rawand Sbeh#1145283#COMP131#COMP133
Wael Remawi#1111111#COMP133#COMP122
Mahmod Odeh#1148425#COMP230#COMP121
Fadi Awwad#1153256#COMP121#COMP230
Shailene Woodley#1126548#COMP411#COMP338#COMP311#COMP334
Daniel Radcliffe#1136578#COMP233#COMP230#COMP122
Jennifer Lawrance#1156784#COMP439#COMP433#COMP422
Miles Teller#1135632#COMP333#COMP311#COMP4451#COMP2421
Brad Pitt#1126573#COMP142#COMP2331#COMP411
Mark Walhlberg#1142578#COMP432#COMP431#COMP439#COMP2421#COMP311#COMP3351
Natalie Portman##1146574#COMP230#COMP336#COMP422
Mark Ruffalo#1118759#COMP3361#COMP338#COMP439#COMP242#COMP24211
Anne Hathaway#1151111#COMP332#COMP131#COMP113#COMP411
Tom Hardy#1136578#COMP231#COMP242#COMP3
أضف اجابة

أضف اجابة

‫تصفح