Develop a program that allows you to run below commands stored in an ASCII file.
Add Jane Doe 723 258 524 list A Ali Musa 720 114 917 list Add James Smith 721 017 228 Add Mark Dunne 713 379 542 L Delete Ali Musa Sort
Program will take in the above data stored as ASCII text and display them as below.
Jane Doe 723 258 524 James Smith 721 017 228 Mark Dunne 713 379 542
Note that the contents of the input file may change between runs. Therefore, ensure that the program caters for the same. The program should also be able to handle incorrect input.
Commands explained Add or A will save the details. List or L - Will show all the names that have been saved. Delete or D - Will remove name that has been saved. Sort or S - Will sort alphabetically the names that have been save
Aucun commentaire:
Enregistrer un commentaire