Created
January 21, 2019 20:07
-
-
Save anoited007/0616c159796786605d10d7f341a23d8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Bagable<T> { | |
//Open the bag | |
void open(); | |
//Add item to the bag | |
void add(T t); | |
//Remove item from the bag | |
T remove(T t); | |
//Empty the bag | |
T[] empty(); | |
//Check if bag is empty | |
boolean isEmpty(); | |
//Check if bag is full (since we will use Arrays to store data) | |
boolean isFull(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment