Search:

Type: Posts; User: PhHein

Search: Search took 0.10 seconds.

  1. Re: Could somebody help me with my homework? Calling method's from another class

    Better, but it still needs a lot of work. Your check account.contains(name) won't work as name is a String, but the ArrayList contains Accounts. Bank class doesn't need an atrribute balance, Account...
  2. Re: Could somebody help me with my homework? Calling method's from another class

    You've still got it wrong. The bank(class) is your room, in your room there is a folder(Arraylist) and with every 'enroll' call you put a new sheet with a name and balance(Account) into the folder....
  3. Re: Could somebody help me with my homework? Calling method's from another class

    Ok. You're confused. Your ArrayList will contain Accounts not Strings. The ArrayList will be created once. In enroll you create a new Account and add it to the ArrayList.
  4. Re: Could somebody help me with my homework? Calling method's from another class

    You didn't read the assignment properly! It says: The central class is "Bank" that contains the accounts (an ArrayList).
  5. Re: Could somebody help me with my homework? Calling method's from another class

    creating an instance means:

    Bank b = new Bank();
    CommandReader reader = new CommandReader(b);
  6. Re: Could somebody help me with my homework? Calling method's from another class

    Put the main method into Bank, create an instance of Bank. Create an instance of CommandReader using the constructor, that you've commented. Call Command reader's run() method.
  7. Re: Could somebody help me with my homework? Calling method's from another class

    please format your code Announcements - What's Wrong With My Code?
  8. Re: Could somebody help me with my homework? Calling method's from another class

    What have you tried? - Matt Gemmell
    Post your code and ask specific questions. Nobody will do your assignment for you.
Results 1 to 8 of 8