Recordsmenu
Recordsmenu
class recordsmenu {
//menu
public void showMenu() throws IOException{
AddStudentRecords asr = new AddStudentRecords(); //creating an
object for the class AddStudentRecords
switch(choice) {
case 1:
asr.addingRecords(); //calling the addingRecords method
from the class AddStudentRecords
break;
case 2:
asr.readingRecords(); //calling the readingRecords method
from the class AddStudentRecords
break;
case 3:
asr.searchRecord(); //calling the searchRecords method from
the class AddStudentRecords
break;
case 4:
asr.editRecord(); //calling the editRecords method from the
class AddStudentRecords
break;
case 5:
asr.clear();//calling the clear method from the class
AddStudentRecords
break;
case 6:
System.exit(1); //exits the program
break;
default:
System.out.println("\nInvalid Choice!");
showMenu();
}
}//end showMenu
}