Hi,
Im making a simple menu style interface. Ive got a class RegistryInterface which creates the interface menu and then a class RegistryApp with a main method to initiate it.
My problem is i have the main menu public void doMenu, within this i have options where a user enters a number 1-4 and are then taken to the chosen menu option they decide.
Below is the basic layout of it, if a user enters 1 then i want to invoke the method doAddStudent. I know how to store the value entered by the user etc i just need to know how i would invoke the doAddStudent method from inside the doMenu method.
Thanks for the help.
public class RegistryInterface
{
    private Registry aRegistry = null;
 
    public RegistryInterface(Registry aRegistry)
    {
 
    }
 
    public void doMenu(Registry theRegistry)
    {
        System.out.println("Registry Main Menu");
        System.out.println("******************");
        System.out.println("1. Add a Student");
        System.out.println("2. Delete a Student");
        System.out.println("3. Print Registry");
        System.out.println("4. Quit");
        System.out.print("\nSelect option [1, 2, 3, 4] :> ");
 
 
    }
 
    private void doAddStudent()
    {
 
    }
 
    private void doDeleteStudent()
    {
 
    }
}