Declare a method create
.
create
takes a single Int
parameter and returns an anonymous object that implements the Bracket
interface:
The returned object should implement top
so that it returns the passed Int
and bottom
so that it returns the
passed Int
* -1.
So, for example:
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: