Overview
A teacher has asked you to make a program that will allow her to store all of the names of her students in each of her classes. She would like to be able to enter a list of students in different files and later display various student lists from the file.
Instructions
For this programming challenge, you will provide a program to the teacher with the following functionalities:
- The program should start by displaying a menu to allow the teacher to choose whether to create a new class list, display a present class list, or exit the program.
- If the teacher chooses to create a new class list, the program should also prompt the teacher to enter a filename in which to store the new class list.
- The program should then allow the teacher to enter the number of students in the class, then loops to read that many names.
- Those names should then be written to a file with the filename provided by the teacher.
- A message should also be displayed if the file was successfully saved and then return the user to the menu.
- If the teacher chooses to view a present class list, the program should prompt the teacher for the filename of the student list she would like to view.
- The program should then open that file to read all of the student's names into array.
- Prior to displaying the names, you must short the names in the array and then display them in alphabetical order.
- You may assume that no two students have the same name.
Input Validation: Do not accept a number less than 1 or greater than 25 for the number of students.