Skip to content
Victoria Brown edited this page Nov 13, 2015 · 1 revision

QUESTION:

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

CODE:

public interface Account {

	// deposit method:
	boolean deposit(Cash a);

	// withdraw method:
	boolean withdraw(Cash a);

}
Clone this wiki locally