All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bancomat.Bank Maven / Gradle / Ivy

package bancomat;

import java.util.HashMap;
import java.util.Map;

public class Bank {

    private final Map accounts  = new HashMap();

    public Account createAccount(User user, int initialAmount) {
        final Account account = new Account(initialAmount);
        accounts.put(user,account);
        return account;
    }

    public Atm getAtm(int intialFund) {
        return new Atm(intialFund,this);
    }

    public Account getAccount(User user) {
        return accounts.get(user);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy