Medium
Course Enrolment
Write
class Course with a name, a capacity, a student list and enroll(name) returning enrolled, already enrolled or full. Read the capacity and then names; print the result for each name, then the number enrolled.Input
Capacity, then names.
Output
Lines.
Sample 1
Input
2 Mim Rafi Mim Sara
Output
enrolled enrolled already enrolled full 2
Sample 2
Input
1 A
Output
enrolled 1
Output appears here