If the program is run like this:
registration.exe courses1.dat requests1.dat report1.csv
where the input file courses1.dat contains
4
CS100 50
CS150 3
MATH241 25
HIST300A 5
and requests1.dat contains:
CS150 Doe, John
ART421 Doe, John
CS150 Jones, Jenna
MATH241 Jones, Jenna
CS150 Smith, Stanley
CS150 Ford, Henry
the output on the screen should be:
Doe, John has enrolled in CS150
Doe, John cannot enroll in ART421
Jones, Jenna has enrolled in CS150
Jones, Jenna has enrolled in MATH241
Smith, Stanley has enrolled in CS150
Ford, Henry cannot enroll in CS150
and the output in file report1.csv should be
"CS100",0
"CS150",3
"HIST300A",0
"MATH241",1