ATM Machine

I need help with switch statement.
import java.util.Scanner;
public class HW8_2 {
public static void main(String args) {
Scanner input = new Scanner(System.in);
Account account = new Account[10];
System.out.println(“Enter an ID between between 0 and 9,”
+ "999 to quit the game: ");
int id = input.nextInt();
while(id < 0 || id > 9) {
System.out.print("Please enter a valid id: ");
int id2 = input.nextInt();
}
int choice = input.nextInt();
switch (choice) {
case 1:
System.out.print("Enter a choice: ");
System.out.println("The balance is " + account.getBalance());
break;
case 2:
System.out.print("Enter a choice: ");
System.out.print("Enter an amount to withdraw: ");
double withdraw = input.nextDouble();
break;
case 3:
System.out.print("Enter a choice: ");
System.out.print("Enter an amount to deposit: ");
double deposit = input.nextDouble();
break;
case 4:
System.out.print("Enter a choice: ");
System.out.println(“Game over. Good bye!”);
break;
}
}

class Account{
    private int id;
    private double balance;
    private double monthlyFee;
    
    Account() {
        id = 0;
        balance = 100;
        monthlyFee = 0;
    } 

    public Account(int newID,double newBalance){
        this.id = newID;
        this.balance = newBalance;
    }
    

    public int getID() {
        return id;
    }

    public void setID(int setID){
        this.id = setID;
    }

    public double getBalance(){
        return balance;
    } 

    public void setBalance(double newBalance) {
        this.balance = newBalance;
    }
    public void withdraw(double amount ){
        balance -= amount;
    }

    public void deposit(double amount){
        balance += amount;
    } 
}

}

I think the line
System.out.print("Enter a choice: ");
should be before the switch statement, not inside of that block.

It looks like you’re missing actually doing the deposit in case 2.
account.deposit(deposit);

It looks like you’re missing actually doing the deposit in case 3
account.withdraw(withdraw);

And I assume you want the program (and the main function) to end for case 4
so there should be a return in that case (at the end).