im trying to do a program like this:
i need to do a program like this:
Automatic Teller Machine Balance [D] Deposit [W] Withdrawal [Q] Quit select you OPtions:
once i have chosen an option then i should proceed here
if i choose b:
YOur Balance is __
if i chose D:
Enter you deposit amount:
if i choose W:
Enter the Withdrawal amount:
(if balance is >= withdrwal display transaction, if balance is < withdrawal display "insufficient Amount"
every after each of the choices a window like this should come out:
Would you Like to generate bank slip? YES NO
if yes: for balance:
BALANCE INQUIRY AMOUNT BALANCE:
Printing bank slip....
for deposit: DEPOSIT AMOUNT:_ printing book slip:
for withdrawal: your withdrwal amount:
if no: it will return to: Would you like another transaction?
this is what i did :
public static void main(String[] args) {
int balance= 0;
int deposit = 0;
String a =(JOptionPane.showInputDialog(null, "Automatic Teller Machine\n [B] Balance Inquiry\n [D]Deposit\n [W] Withdrawal\n [Q] Quit\n Select you Options: ","Automatic Teller Machine",JOptionPane.PLAIN_MESSAGE));
String B= "";
if (a == B)
{
JOptionPane.showMessageDialog(null, "Your Balance is: ");
}
}
}
why cant this program run the way that i want it to?