Regardles of its particular nature, all financial accounts provide a way to deposit and withdraw money. Define an interface Account that has two methods : deposit and withdraw, both of which accept a parameter of type Cash and return a boolean

Regardles of its particular nature, all financial accounts provide a way to deposit and withdraw money. Define an interface Account that has two methods : deposit and withdraw, both of which accept a parameter of type Cash and return a boolean

LANGUAGE: JAVA

CHALLENGE:

Regardles of its particular nature, all financial accounts provide a way to deposit and withdraw money. Define an interface Account that has two methods : deposit and withdraw, both of which accept a parameter of type Cash and return a boolean

SOLUTION:

interface Account
{
    public boolean deposit(Cash c);
    public boolean withdraw(Cash c);
}

Add comment