Search:

Type: Posts; User: trancecommunity

Search: Search took 0.13 seconds.

  1. Re: Loop to deposit money into bank account array

    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...
  2. Re: Loop to deposit money into bank account array

    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) + " ?");

    ...
  3. Re: Loop to deposit money into bank account array

    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++){
    ...
  4. Re: Loop to deposit money into bank account array

    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();

    ...
  5. Loop to deposit money into bank account array

    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...
  6. Re: Beginner : Using a loop to print object array

    Thanks
  7. Re: Beginner : Using a loop to print object array

    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...
  8. Re: Beginner : Using a loop to print object array

    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...
  9. Beginner : Using a loop to print object array

    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 ...
Results 1 to 9 of 9