And now for something completely different. This is not very related to the gradebook problem. We'll come back to that next time. This is practice creating and using classes and collections.
First the data. This is a file of names, your names to be exact. The file can be seen here and this is a sample.
ASHER MOHamMAD BADZIAK jason BELFOURE TRISTA CABALLES ARLENE CiotKOwskI RALPH
You will need to create a class that holds a single name. It will have a firstname and lastname property. It will have methods to get and put the first and last names. It will also have methods to returns a string that contains the whole name, either first name first or last name first. The two parts of the name will be separated by commas. Note that the input data is in mixed case. When stored in a class instance, it will be changed to having the first letter of each part upper case and the rest in lower case. So, this
ArchIE kentis stored as
firstname = Kent lastname = Archie
Now you need a second class to hold a collection of these name objects. It will use the builtin collection class to hold the set of names. It will have properties like count that tells how many are in the collection. It is read-only. Other methods include
Here is a picture of the main form of the problem. First the user clicks the load data button. If they try to do other things before hitting the load data button, they should be informed of an error. If they put a name (either first or last) in the text box, they can click one of the two buttons. This will start a search of the data in the collection for names that match the textbox contents, either first or last name. The names that match are presented in the list box at the right side.
They can then pick a name from the list box and click the delete button. This will do two things, it will remove the name from the collection and from the list box. Then they can save the data.
The executable may help clarify the requirements. Download the Zip file that contains the executable and data files . Yours does not have to look just like that. The position of the controls, their names or the labels on them is not the primary thing. ASK if you aren't sure what I mean or if you want to know if you are going in the right direction.
ASK if you have any questions.