diff --git a/src/LinkedListMultiSet.java b/src/LinkedListMultiSet.java new file mode 100644 index 0000000..d6646a8 --- /dev/null +++ b/src/LinkedListMultiSet.java @@ -0,0 +1,15 @@ +public class LinkedListMultiSet { + // the main body for the LinkedListMultiSet class still needs to be implemented + + // the Node class is meant to only be used by the LinkedListMultiSet class so I made it private and nested + // if anyone knows another way to do this can you show me/ + private class Node { + private Object item; + private Node next; + public Node(Object item) { + this.item = item; + this.next = null; + + } + } +} diff --git a/src/Multiset.java b/src/Multiset.java new file mode 100644 index 0000000..066b638 --- /dev/null +++ b/src/Multiset.java @@ -0,0 +1,32 @@ +public class Multiset { + public boolean add(Object item) { + throw new UnsupportedOperationException(); + + } + + public void remove(Object item) { + throw new UnsupportedOperationException(); + + } + + public boolean contains(Object item) { + throw new UnsupportedOperationException(); + + } + + public boolean is_empty() { + throw new UnsupportedOperationException(); + + } + + public int count(Object item) { + throw new UnsupportedOperationException(); + + } + + public int size() { + + throw new UnsupportedOperationException(); + } + +} diff --git a/src/Tree.java b/src/Tree.java index 458a7c7..cb0bc70 100644 --- a/src/Tree.java +++ b/src/Tree.java @@ -1,2 +1,16 @@ +import java.util.Collections; +import java.util.List; + public class Tree { -} + private Object _root; + private List _subtrees; + + public Tree(Object root, Object subtrees) { + this._root = root; + if (subtrees == null) { + this._subtrees = Collections.emptyList(); + + } + } + } + diff --git a/src/TreeMultiSet.java b/src/TreeMultiSet.java new file mode 100644 index 0000000..fd6239c --- /dev/null +++ b/src/TreeMultiSet.java @@ -0,0 +1,4 @@ +public class TreeMultiSet { + private Tree tree; + // Tree class needs to be implemented before this +}