Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finished with Term project part Two #23

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
299 changes: 299 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Large diffs are not rendered by default.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions SDEV333-Term-Project.iml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,31 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="JUnit4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="JUnit5.8.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter/5.8.1/junit-jupiter-5.8.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
25 changes: 25 additions & 0 deletions src/Bag.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Bag interface
* @param <Item> class / data type of the items in the queue
*/
public interface Bag<Item> extends Iterable<Item> {

/**
* Add an item to the bag
* @param item the item to be added
*/
void add(Item item);

/**
* Checks to see if the bag is empty
* @return true if empty, false is not empty
*/
boolean isEmpty();

/**
* Returns the count of items in the queue
* @return the number of items in the queue
*/

int size();
}
12 changes: 12 additions & 0 deletions src/List.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public interface List<E> extends Iterable<E> {
*/
void set(int i, E item);

void addFront(int value);

void addBack(int value);

void add(int index, int value);

/**
* Remove item at the front of the list.
* @return the item that was removed
Expand Down Expand Up @@ -69,6 +75,10 @@ public interface List<E> extends Iterable<E> {
*/
boolean contains(E item);

boolean contains(int value);

int indexOf(int value);

/**
* Checks if the list is empty.
* @return true if the list is empty, false otherwise
Expand All @@ -80,4 +90,6 @@ public interface List<E> extends Iterable<E> {
* @return number of items in the list
*/
int size();

void clear();
}
Loading