Write a program in C++ that reads a list of enrollments from a file and prints a class roster for the teacher. The program would use files, functions, and classes. Here's what the output should look like: $ ./enroll.out Welcome to the Roster Generator Program!!! Please enter the name of your names file: bob.dat I'm sorry, I could not open 'bob.dat'. Please enter another name: csc442 File 'csc442' opened successfully! Name | Major | Phone # | Town ----------------+--------------------+---------------+------------------- Jason James | Computer Science | 555/555-1122 | Westfalia, HI 665 Faruk Ahmed | Medeaval French Po | 332-4546 | Slimsville, PQ 22 Sean Ramirez | Underwater Basket | 1-444/411-441 | Fritter, HO 44331 Happy Gilmore | Yellow Tail Migrat | | Simonton, SZ 1124 Total Enrollment: 4 Thank you for using the RGP!! Endeavor to have a gyroscopic day! $
Write a
Here's what the output should look like:
$
./enroll.out
Welcome to the Roster Generator Program!!! Please enter the name of your names file: bob.dat
I'm sorry, I could not open 'bob.dat'.
Please enter another name: csc442
File 'csc442' opened successfully!
Name | Major | Phone # | Town
----------------+--------------------+---------------+-------------------
Jason James | Computer Science | 555/555-1122 | Westfalia, HI 665
Faruk Ahmed | Medeaval French Po | 332-4546 | Slimsville, PQ 22
Sean Ramirez | Underwater Basket | 1-444/411-441 | Fritter, HO 44331
Happy Gilmore | Yellow Tail Migrat | | Simonton, SZ 1124
Total Enrollment: 4
Thank you for using the RGP!!
Endeavor to have a gyroscopic day!
$
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images