Sobes.tech
Назад к задачам
Junior — Senior
151

In‑memory financial ledger service implementation

Условие задачи

livecode

Implement the LedgerService interface that provides basic banking operations. All data (accounts, balances) must be stored in memory using standard Java collections such as HashMap.

import java.math.BigDecimal;

public interface LedgerService {
    long createAccount();

    void transferFunds(long source, long destination, BigDecimal sum);

    BigDecimal getBalance(long id);
}