please help me here
please show me how can this show the right output that i need please continue doing this program using only if else and do while please please"
here is the problem
Automatic Teller Machine [B] 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?
...
heres the code thati did:
/**
* @param args
*/
public static void main(String[] args) {
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= "B";
String D="D";
String W="W";
String Q="Q";
String b = "b";
int balance= 0;
int deposit = 0;
int withdraw= 0;
double bal = 0;
int ans = 0;
int trans = 0;
do {
if(a.equalsIgnoreCase(B))
{
{
JOptionPane.showMessageDialog(null, "Your Balance is: ","BALANCE INQUIRY"+ bal,JOptionPane.PLAIN_MESSAGE );
bal=bal+deposit;
}
ans=JOptionPane.showConfirmDialog(null, "Would you like to generate bank slip?","Generate Bank Slip",JOptionPane.YES_NO_OPTION);
if (ans == 1);
{ //no
trans =JOptionPane.showConfirmDialog(null,"Would You Like Another Transaction?","Another Transaction",JOptionPane.YES_NO_OPTION);
if (trans == 1)
{
JOptionPane.showMessageDialog(null, "Thanks For Using My Program!!");
System.exit(0);
}
else if (trans == 0)
{
b =(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));
}
else if (ans == 0); // yes
{ JOptionPane.showMessageDialog(null, "BALANCE INQUIRY \n AMOUNT BALANCE: "+ bal+ "\nPrinting Bank slip.....");
}
}
}
else if (a.equalsIgnoreCase(D))
{
int dep =Integer.parseInt(JOptionPane.showInputDialog (null,"Enter Your Deposit Amount" ));
if (ans == 1);
{ //no
trans =JOptionPane.showConfirmDialog(null,"Would You Like Another Transaction?","Another Transaction",JOptionPane.YESNOOPTION);
if (trans == 1)
{
JOptionPane.showMessageDialog(null, "Thanks For Using My Program!!");
System.exit(0);
}
else if (trans == 0)
{
b=(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));
}
else if (ans == 0); // yes
{ JOptionPane.showMessageDialog(null, "BALANCE INQUIRY \n AMOUNT BALANCE: "+ deposit+ "\nPrinting Bank slip.....");
}
}
}
else if (a.equalsIgnoreCase(W))
{
int wht= Integer.parseInt(JOptionPane.showInputDialog(null," Enter the Withdrawal Amount:"));
}
ans=JOptionPane.showConfirmDialog(null, "Would you like to generate bank slip?","Generate Bank Slip",JOptionPane.YES_NO_OPTION);
if (ans == 1)
{ //no
JOptionPane.showConfirmDialog(null,"Would You Like Another Transaction?","Another Transaction",JOptionPane.YES_NO_OPTION);
if (trans == 1)
{
JOptionPane.showMessageDialog(null, "Thanks For Using My Program!!");
}
else if (trans == 0)
{
b =(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));
}
else if (ans == 0)
{ // yes
JOptionPane.showMessageDialog(null, "DEPOSIT INQUIRY \n AMOUNT DEPOSIT: "+ withdraw+ "\nPrinting Bank slip.....");
}
}
} while (a == Q);
}}
View Answers
Ads
Related Tutorials/Questions & Answers:
please help me here
please help me here
please show
me how can this show the right output that i need
please continue doing this program using only if else and do while
please please"
here is the problem
Automatic Teller Machine [B] Balance [D
please help me here
please help me here
please show
me how can this show the right output that i need
please continue doing this program using only if else and do while
please please"
here is the problem
Automatic Teller Machine [B] Balance [D
Advertisements
please help me.
please help me.
Please send
me a code of template in opencms and its procedure.so i can implement the code.
Thanks
trinath
please help me.
please help me. How to read a properties file in java with a suitable example.
Please send
me.
Thanks
Trinath
Please visit the following link:
Java read properties file
urgent...pleAse help me.....please!
urgent...
pleAse help me.....
please!
please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
please help me.
please help me.
Please send
me the validation of this below link.
the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
Thanks
Trinath
please help me.
please help me. How to move the edits.jsp in below link?
http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
please help me.
please help me. I have a jsp page under that i add a list box under i get the countries through my database.
so how can i do
help me please
help me please Hello
I want helping for this question ,
Please
Write a program that reads some friends� names, stores them in an array, and then prints out on the screen all friends who start by a particular letter
please help me
before. This name list should get from the database.
Please help me.
By the way, I'm...
please help me Dear sir, I have a problem. How to write JSP coding, if a user select a value from drop down list for example department, the another
Please help me.
Please help me. Hi i am trinath in below there is a url.In that url there is a code of edit a jsp page.I understand that code but only one thing i not get it i.e; What is the work of "id".and what is the data type of id?
http
please help me.
please help me. I have three table in mysql,and i hava create a excel sheet and add this sheet.but my question is in every sheet i can display one one table result.how can i do
please help me...
please help me... write an application that print number in the following order using a FOR-Loop
1 2 3 4 5
2 4 6 8 10
3 6 9 1215
4 8 121620
5 10152025
please help me in these prog
please help me in these prog
create 2 jdbc programs including awt
create 2 jdbc programs including swing
create 2 jdbc programs including command line argument
create 2 jdbc programs including io class
4 jdbc prog using
please help me to this problem..
please help me to this problem.. i wrote a program like keyboard... inside the JTextField) but i want to make this program to let
me write where i clicked (i.e allows
me to write any thing at the field where i clicked
Please help me
Please help me program for when a user enter his card number, it has to create default security pin in the database
please help me
please help me interface Test1 { String toString(); }
public class Test {
public static void main(String[] args) {
System.out.println(new Test1() {
public String toString() { return "test
Please help me
Please help me Hi Sir,
please send
me the code for the following progrems...
1) all sets are integer type:
input:
set1={10,20,30,40}
set2={15,25,35}
output:
union={10,15,20,25,30,35,40}
2) input: "Hi what
help me please
help me please how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
please help me?
please help me? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
Please help me??
Please help me?? Question_1: Using one-dimension array of primitive type elements.
Objective: The purpose of this lab exercise is to practice how to declare, create and manipulate a one-dimension array of primitive type
Please help me out
Please help me out
Description* You are hired to develop a laptop inventory information system for Sheridan College in order to keep track of the information about the laptops lent to the students. Users can add or remove data
please help me
please help me how to use two browse buttons, one browse button for displaying the first image and second for the second image along with its file path and also to display text file along with its path using layouts or panels
please help me
please help me how to use two browse buttons, one browse button for displaying the first image and second for the second image along with its file path and also to display text file along with its path using layouts or panels
HQL Statement: Please help me
= Product.productGroupVersionId and
Product.lobId = ?
Can you
please help me equallent HQL...HQL Statement:
Please help me Select ProductFamily.*
from
ProductFamily, ProductGroup, Product
where
ProductFamily.productFamilyVersionId
Please help me understand this query
Please help me understand this query Hi,
Could someone
please help me understand the following query. Im finding difficulty relating it :-( Pls
Help!
select * from cbpartner where CBPartner.IsSummary='N' and salesrep_id
Begineer in coding please help me
address to a person object..
please help me...Begineer in coding
please help me I have
Person class{
int pid;
String Pname;
//and have a Address filed of type Address not String!!!
Address
would you please help me?
would you
please help me? Write a class Amount which stores sums of money given in pounds and pence. Your con-
structor should take two ints, for pounds and pence seperately. The class should also
provide methods to add
Please help me... its very urgent
Please help me... its very urgent
Please send
me a java code to check whether INNODB is installed in mysql...
If it is there, then we need to calculate the number of disks used by mysql
Help me please with my final homework
Help me please with my final homework Write a Java program of your choice that demonstrates the following concepts:
? Input and Output.
? Selection/Conditional (e.g. if statement).
? Arithmetic.
? Loops.
? Arrays