Should have done that already :confused:
Seems to be working alright.
Norm youre a great help. Thanks a million.
One day ill look back and wonder how the hell i struggled with it but thats...
Type: Posts; User: trancecommunity
Should have done that already :confused:
Seems to be working alright.
Norm youre a great help. Thanks a million.
One day ill look back and wonder how the hell i struggled with it but thats...
Is this looking like its heading in the right direction?
for(int i = 0 ; i < 2 ; i++){
System.out.println("How much to deposit to Account " + (i + 1) + " ?");
...
Bit i cant figure out is how to move to the next deposit? Switch between deposit0 and deposit1 variables. Cant figure out the use of i.
for(int i = 0 ; i < 2 ; i++){
...
Thanks. Should it take and store the variables then run the loop?
System.out.println("How much to deposit to Account 1 ?");
double deposit1 = EasyScanner.nextDouble();
...
Ask the user how much they would like to deposit into the first account and how much would they like to deposit into the second account. Update the accounts accordingly.
You must use a loop here...
Well then im miles off :)
BankAccount bankAccount1 = new BankAccount("123456","Sandra Murphy");
Is this not an array with 2 strings stored in it?
Sorry im a complete beginner. Only at this...
Thanks for the quick reply
i was using it in a for loop
for(int i = 0 ; i < bankAccount1.length i ++ ){
}
I basically need it to run the same amount as the amount of objects that are in...
Question
create an array that can hold two BankAccount objects.
In this array, add the following BankAccount objects to it:
Account Number Name
123456 Sandra Murphy
789465 ...