I'm currently try to write a program as below :
A college would like to automate managing courses offered to students. initially only three courses are involved. each courses has a code, a name, students enrolled, a current number of student, a maximum number of students allowed (quota) which is 10. a user should be able to add\drop a student to\from the course. a student can only be added to a course if the student is not yet enrolled in the course and the current number of students is not exceeding the maximum number allowed. a student can be dropped from a course only if she\he is enrolled in the course .
To test your program , you need to read an input file that contains ;
- *begin to indicate a course followed by the course code and name
- an integer to indicate the number of students enrolled so far in the course
- a list of matric numbers to represent students enrolled in the course,one matric number per line
- *end to indicate the end of data
Below is an example input data :
*begin SSK3100 Programming I
3 //number of current students enrolled in the course
*begin SSK3101 Programming II
*begin SSK3107 Data Structures
A kind-hearted person has help me with my code,but the problem is I still can't get the output to add and drop student..Any help would be greatly appreciated .
The link to my code :