Mini Quiz April 15
In some college students are allowed to register for next semester courses over four week period. The
registration week is determined based on the student year of study (freshman = 1, sophomore = 2, junior = 3,
senior = 4) and the first letter of the last name using the following rules:
- All senior students will register during first week
- Junior students with first letter of their last names A - K will register during second week
- Sophomore studens with first letter of their last name L - Z will register during second week
- Junior students with first letter of their last names L - Z will register during third week
- Freshman students with first letter of their last name L - Z will register during third week
- Sophomore students with first letter of their last name A - K will register during forth week
- Freshman students with first letter of their last name A - K will register during forth week
Write a function void registration(int size) that finds the number of students that will
register during each week. Function will process size students. For each student, function randomly generates the
uper case letter
that represents first letter of the last name and an integer between 1 and 4 that represents the year of study.
Function finds and prints the number of students that will
register during each week.
Write main that randomly generates the number of students (assume that this will be an integer between 5 and
20) and then finds the number of students to register each week using function registration.