I now need to create a menu which will allow users to enter the information and to find information on their account for the following:

1. Add the customers details
2. Make a deposit to the business account
3. Record a meter reading to the business account
4. Display current balance of the business account
5. Display full account details
6. Change the discount value for the business account
7. Change the cost per unit for all business accounts
8. How to use the menu system

Up to this point every time I have tried to create a menu system I just could not get it to work. I would greatly appreciate if someone could help me out on how to go about doing it.

Here is what my attempted menu looks like up to the fifth option. I am doing something horribly wrong with calling in the methods from the other classes as BuisnessAccount.getMethod always shows up as an error. I am also pretty sure declaring the variables again is completely wrong as then they have no link to my other classes.

If someone could help me solve this it would be greatly appreciated

Code:

import java.util.Scanner;

public class Menu

{
public static void main(String [] args)
{

Scanner input = new Scanner(System.in);

int Choice;

{
System.out.println("------------------------------");
System.out.println ( "1. Add the customers details" ) ;
System.out.println ( "2. Make a deposit to the business account" );
System.out.println ( "3. Record a meter reading to the business account" ) ;
System.out.println ( "4. Display current balance of the business account" ) ;
System.out.println ( "5. Display full account details" ) ;
System.out.println ( "6. Change the discount value for the business account" ) ;
System.out.println ( "7. Change the cost per unit for all business accounts ");
System.out.println ( "8. How to use the menu system ");
System.out.println ( "Any other number will exit the program");
System.out.println("------------------------------");
System.out.println ( "\n\nEnter a number from 1 to 8" );
Choice = input.nextInt();