diff --git a/src/MultiSet.java b/src/MultiSet.java new file mode 100644 index 0000000..99af8f4 --- /dev/null +++ b/src/MultiSet.java @@ -0,0 +1,29 @@ +import jdk.jshell.spi.ExecutionControl; +public class MultiSet { + + public static void add() throws Exception { + throw new Exception("Exception message"); + } + + public static void remove() throws Exception { + throw new Exception("Exception message"); + } + + public static void contains() throws Exception { + throw new Exception("Exception message"); + } + + public static void is_empty() throws Exception { + throw new Exception("Exception message"); + } + public static void count() throws Exception { + throw new Exception("Exception message"); + + } + + public static void size() throws Exception { + throw new Exception("Exception message"); + + } + +} \ No newline at end of file diff --git a/src/Tree.java b/src/Tree.java index 458a7c7..4a46f9f 100644 --- a/src/Tree.java +++ b/src/Tree.java @@ -1,2 +1,25 @@ +import java.util.ArrayList; +import java.lang.Object; + public class Tree { -} + + //root of the tree + private Object root; + // list of all subtrees + private ArrayList subtrees; + + public Tree(Object root, ArrayList subtrees){ + this.root = root; + this.subtrees = subtrees; + if (subtrees.isEmpty()){ + this.subtrees = new ArrayList<>(); + } + else { + this.subtrees = subtrees; + } + } + + public boolean is_empty(){ + return this.root == null; + } +} \ No newline at end of file