![]() |
help! with simple ATM machine
/*Hello. I dont't know what wrong i do. It seems that i can't show the transactions history.
It works well until the 10 transactions. But then the program can't rewrite the first array so only ten latest transactions should be shown. The problem is that i am stuck and i don't know how to go further. Plese, could someone help me...*/ Code:
import java.util.Scanner; |
Re: help! with simple ATM machine
it seems strange. I think the array only save the 10 transactions. But what about the balance?
I Try to make about 15 transactions with deposit and withdrawl. Look att the balance. It seems strange to me???? Can you note something wrong that I don't understand, maybe is the array of only 10 saved index? Anyway the balance should save all the transactions from the beginning... Do you have any idea about that, so the balance will save all transactions from beginning? this is what the program should do: array of 10 index were the latest 10 transactions will be saved. The balance should save all the deposit and withdrawl from the beginning. the program should show the 10 latest transaction and show the final balance from all inputs of the user. Can someone help me out how i can go thru this problem. |
Re: help! with simple ATM machine
try the changes i've made and tell if this is what you want
Code:
import java.util.Scanner; |
Re: help! with simple ATM machine
Thank you very much for you help, virxen!
|
Re: help! with simple ATM machine
How can I print out the transaction array in JOptionPane???
Can someone help me? This code snippet is from a method... But it just this I want that the transactions will be shown in JoptionPane. I appriciate all help.. Code:
|
Re: help! with simple ATM machine
one way is this
Code:
public static void showTransactions(int [] transactions, int balance){ |
Re: help! with simple ATM machine
1 Attachment(s)
I am doing a similar project. it is due in 5 hours...
virxen, if you can help me... thanks. But i warn you, my program is all over the place. This is the project Iam trying to do: 1) main class who asks for customer's cash. Who execute all the methods. 2) Account class that takes the customer's amount of cash 3)withdraw class who extends from Account, who takes the amount withdrawed (from either savings or checkings) then returns the totals of customers cash and balance. 4)deposit class who extends from account, who takes theamount deposited (from either savings or checkings) then returns the totals of customers cash and balance. ---- Must have: 1. client class, 2 classes + 1 subclass. 2. one constructor, 3 instance varible per class. 3. the program must loop untill user decides to stop. 4. all input/output in client. ---- want (at least): 1 public static variable 1 static method 1 toString() method 1 random number generator 1 array 3 Enum declarations ------------------- P.S. Don't mind the NewAccount class I dont think I have enough time to do it. |
| All times are GMT +5.5. The time now is 02:28. |