diff --git a/ss2010/gdi2/exercise/GDI_H_12_6.pdf b/ss2010/gdi2/exercise/GDI_H_12_6.pdf
new file mode 100644
index 00000000..557a290f
Binary files /dev/null and b/ss2010/gdi2/exercise/GDI_H_12_6.pdf differ
diff --git a/ss2010/gdi2/exercise/uebung-12.pdf b/ss2010/gdi2/exercise/uebung-12.pdf
new file mode 100644
index 00000000..4cc7db28
Binary files /dev/null and b/ss2010/gdi2/exercise/uebung-12.pdf differ
diff --git a/ss2010/gdi2/java/P2.7z b/ss2010/gdi2/java/P2.7z
new file mode 100644
index 00000000..d7861a83
Binary files /dev/null and b/ss2010/gdi2/java/P2.7z differ
diff --git a/ss2010/gdi2/java/Project4.7z b/ss2010/gdi2/java/Project4.7z
new file mode 100644
index 00000000..cae9868b
Binary files /dev/null and b/ss2010/gdi2/java/Project4.7z differ
diff --git a/ss2010/gdi2/java/Project4.zip b/ss2010/gdi2/java/Project4.zip
new file mode 100644
index 00000000..eca79ff2
Binary files /dev/null and b/ss2010/gdi2/java/Project4.zip differ
diff --git a/ss2010/gdi2/java/Project4/.classpath b/ss2010/gdi2/java/Project4/.classpath
new file mode 100644
index 00000000..b10b8d9b
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/ss2010/gdi2/java/Project4/.project b/ss2010/gdi2/java/Project4/.project
new file mode 100644
index 00000000..81b74009
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/.project
@@ -0,0 +1,17 @@
+
+
+ Project4
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/ss2010/gdi2/java/Project4/.settings/org.eclipse.jdt.core.prefs b/ss2010/gdi2/java/Project4/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..321a26e9
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Thu Jun 24 12:30:46 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/ss2010/gdi2/java/Project4/src/GDI2BTree.java b/ss2010/gdi2/java/Project4/src/GDI2BTree.java
new file mode 100644
index 00000000..48f6c988
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/src/GDI2BTree.java
@@ -0,0 +1,201 @@
+
+import java.util.ArrayList;
+
+/**
+ * This class represents the GDI2 B-Tree
+ */
+
+public class GDI2BTree
+{
+ private GDI2BTreeNode root; // the root of the B-Tree
+ private int order; // the order (=k) of the B-Tree
+
+ // TODO: Specify other private data, variables
+ // TODO: Implement other necessary methods, e.g. a method to traverse the B-Tree
+
+ /**
+ * This method inserts into the B-Tree the given key/entry (String)
+ * @param entry the value to add into the tree
+ * @return true - if successful, false otherwise
+ */
+ public boolean addData(String entry) {
+ if(root == null){
+ return false;
+ }
+
+ GDI2BTreeNode newroot = root.add(entry,order);
+
+ if(newroot == null)
+ {
+ return false;
+ } else {
+ root = newroot;
+ return true;
+ }
+ }
+
+ /**
+ * This method deletes from the B-Tree the given key/entry (String)
+ * @param entry the value to delete from the tree
+ * @return true - if successful, false otherwise
+ */
+ public boolean delData(String entry) {
+ if(root == null){
+ return false;
+ }
+
+ if(root.del(entry,order) == null){
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Checks if the given entry/key can be found in the B-Tree
+ * @param entry The entry/key which is to be found
+ * @return the B-Tree node containing the given key/entry (String), otherwise null
+ */
+ public GDI2BTreeNode findData(String entry) {
+ if(root == null){
+ return null;
+ }
+
+ return root.find(entry);
+ }
+
+ /**
+ * Checks if the B-Tree is empty
+ * @return true - if B-Tree empty, otherwise false
+ */
+ public boolean isBTreeEmpty(){
+ return !(root == null || root.hasKeys());
+ }
+
+ /**
+ * This method prints the B-Tree
+ */
+ public void printBTree()
+ {
+ if(isBTreeEmpty())
+ {
+ System.out.println("B-Tree is empty");
+ return;
+ }
+
+ System.out.println( "GDI2 B-Tree: order = " +
+ this.getOrder() +
+ ", keys = " +
+ root.countKeys() +
+ ", height = " +
+ root.getTotalDepth()+1);
+ System.out.println("------------------------------------------------");
+
+ ArrayList list = new ArrayList();
+ list.add(root);
+ int lastdepth = 0;
+
+ while(!list.isEmpty())
+ {
+ if(list.get(0).getDepth() > lastdepth)
+ {
+ System.out.println("\n\n");
+ }
+
+ String element = list.get(0).toString();
+
+ //order - number of data = how many times should '#' be inserted
+ for(int len = order - ((element.length()+1) / 2); len > 0; len--)
+ {
+ element += ",#";
+ }
+
+ element = "[" + element + "]";
+
+ System.out.println(element + " ");
+ list.addAll(list.get(0).getChildren());
+ list.remove(0);
+ }
+ }
+
+ /**
+ * This method helps to check the correctness
+ * of the B-Tree after adding/deleting data.
+ *
+ * You can and should extend/modify this method
+ * to check the correctness of your B-Tree implementation.
+ * You are allowed to change the signature
+ * of this methods according to your needs.
+ *
+ * We will use a similar method
+ * correctnessCheckPrivate(...) to test your implementation.
+ */
+ public void correctnessCheckPublic()
+ {
+ // OPTIONAL TODO: extend/modify this method
+
+ // the following checks are only some examples
+
+ // check if the root has data
+ if (getRoot().hasKeys())
+ {
+ // check if the number of children is correct (root not being a leaf)
+ if (!getRoot().isLeaf() && (getRoot().getData().size() + 1 < getRoot().getChildren().size()))
+ {
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.BTREE,
+ "Too many children.");
+ }
+ // check if the number of keys is conform to the given order
+ if (getRoot().getData().size() > 2 * getOrder()){
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.BTREE,
+ "Too many keys - the given order is violated.");
+ }
+ }
+ // check if the root has children
+ if (getRoot().hasChildren())
+ {
+ // check if root is a leaf
+ if (getRoot().isLeaf()){
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.BTREE,
+ "It should not be possible for a leaf to have children.");
+ }
+ // check if the correct number of children is provided
+ if (getRoot().getData().size() >= getRoot().getChildren().size()){
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.BTREE,
+ "Too few children.");
+ }
+ }
+ }
+
+ /**
+ * @param root the root to set
+ */
+ public void setRoot(GDI2BTreeNode root) {
+ this.root = root;
+ }
+
+ /**
+ * @return the root
+ */
+ public GDI2BTreeNode getRoot() {
+ return root;
+ }
+
+ /**
+ * @param order the order to set
+ */
+ public void setOrder(int order) {
+ this.order = order;
+ }
+
+ /**
+ * @return the order
+ */
+ public int getOrder() {
+ return order;
+ }
+}
diff --git a/ss2010/gdi2/java/Project4/src/GDI2BTreeDataReader.java b/ss2010/gdi2/java/Project4/src/GDI2BTreeDataReader.java
new file mode 100644
index 00000000..5a397fe4
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/src/GDI2BTreeDataReader.java
@@ -0,0 +1,128 @@
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+
+/**
+ * GDDI2 B-Tree data reader
+ */
+
+public class GDI2BTreeDataReader
+{
+ private BufferedReader reader;
+
+ /**
+ * Sets the reader for the GDI2 B-Tree data file
+ *
+ * @param dataFile the file where the B-Tree data is given
+ * @throws GDI2BTreeFileFormatException
+ */
+ public GDI2BTreeDataReader(String dataFile)
+ {
+ try
+ {
+ setReader(new BufferedReader(new FileReader(dataFile)));
+ }
+ catch (IOException e)
+ {
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "IOException raised while reading the file.");
+ }
+ }
+ /**
+ * This method reads the next line from the file
+ *
+ * @return a string or null if the end of the stream is reached
+ * @throws GDI2BTreeFileFormatException
+ */
+ public String[] getNextLine()
+ {
+ // TODO: extend this method with further checks
+ String line = null;
+ try
+ {
+ line = reader.readLine();
+ if (line == null)
+ return null;
+ }
+ catch (IOException e)
+ {
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "IOException raised while reading the file.");
+ }
+ line = line.trim();
+ String[] commandLine = line.split(" ");
+ // checking if the line has the correct format ( )
+ if (commandLine.length != 2)
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "Wrong command/key line!");
+ // checking the commands
+ if (!(commandLine[0].equals("add") || commandLine[0].equals("del")))
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "Unknown command!");
+ return commandLine;
+ }
+ /**
+ * Reads the order from the file
+ * @return the order for the B-Tree
+ * @throws GDI2BTreeFileFormatException
+ */
+ public int readOrder()
+ {
+ String line = "";
+ int order = -1;
+ try
+ {
+ line = reader.readLine();
+ line = line.trim();
+ // get the order of the B-Tree
+ order = Integer.parseInt(line);
+ }
+ catch (IOException ioe)
+ {
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "IOException raised while reading file.");
+ }
+ catch (NumberFormatException nfe)
+ {
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "NumberFormatException raised while reading order.");
+ }
+ return order;
+ }
+ /**
+ * This method closes the data reader
+ *
+ * @throws GDI2BTreeFileFormatException
+ */
+ public void closeGDI2BTreeDataReader()
+ {
+ try
+ {
+ getReader().close();
+ }
+ catch (IOException ioe)
+ {
+ throw new GDI2BTreeFileFormatException(
+ GDI2BTreeFileFormatException.GDI2TypeOfException.FILE,
+ "IOException raised while closing the file.");
+ }
+ }
+ /**
+ * @param reader the reader to set
+ */
+ public void setReader(BufferedReader reader) {
+ this.reader = reader;
+ }
+ /**
+ * @return the reader
+ */
+ public BufferedReader getReader() {
+ return reader;
+ }
+}
diff --git a/ss2010/gdi2/java/Project4/src/GDI2BTreeFileFormatException.java b/ss2010/gdi2/java/Project4/src/GDI2BTreeFileFormatException.java
new file mode 100644
index 00000000..bc09bc6d
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/src/GDI2BTreeFileFormatException.java
@@ -0,0 +1,68 @@
+
+
+/**
+ * GDI2 B-Tree and file format exception
+ */
+
+public class GDI2BTreeFileFormatException extends RuntimeException
+{
+ private static final long serialVersionUID = 1L;
+
+ static public enum GDI2TypeOfException {
+ /**
+ * File format is incorrect
+ */
+ FILE,
+
+ /**
+ * An error regarding the B-Tree
+ */
+ BTREE
+ }
+ /**
+ * The error message
+ */
+ protected String errorMessage;
+ /**
+ * The error type
+ */
+ protected GDI2TypeOfException errorType;
+ /**
+ * Constructor
+ * @param s The message string
+ */
+ public GDI2BTreeFileFormatException(String s) {
+ super(s);
+ }
+ /**
+ * Constructor
+ * @param type The type of the error (FILE or BTREE)
+ * @param message The error message
+ */
+ public GDI2BTreeFileFormatException(GDI2TypeOfException type, String message)
+ {
+ errorMessage = message;
+ errorType = type;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Throwable#getMessage()
+ */
+ @Override
+ public String getMessage()
+ {
+ return "GDI2 B-Tree Error: " + errorMessage;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Throwable#toString()
+ */
+ @Override
+ public String toString()
+ {
+ String message = new String();
+ if (errorType == GDI2TypeOfException.FILE)
+ message = "FileFormatException";
+ else if (errorType == GDI2TypeOfException.BTREE)
+ message = "BTreeException";
+ return "GDI2 B-Tree Error: " + message + " : " + errorMessage;
+ }
+}
diff --git a/ss2010/gdi2/java/Project4/src/GDI2BTreeMain.java b/ss2010/gdi2/java/Project4/src/GDI2BTreeMain.java
new file mode 100644
index 00000000..937012b3
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/src/GDI2BTreeMain.java
@@ -0,0 +1,15 @@
+/**
+ * The Main class
+ */
+
+public class GDI2BTreeMain
+{
+ /**
+ * @param args
+ */
+ public static void main(String[] args)
+ {
+ new GDI2BTree();
+ // TODO: add the needed code to work with your implementation
+ }
+}
diff --git a/ss2010/gdi2/java/Project4/src/GDI2BTreeNode.java b/ss2010/gdi2/java/Project4/src/GDI2BTreeNode.java
new file mode 100644
index 00000000..599f4462
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/src/GDI2BTreeNode.java
@@ -0,0 +1,321 @@
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class represents the node of the GDI2 B-Tree
+ */
+public class GDI2BTreeNode
+{
+ private GDI2BTreeNode predecessor; // the parent node
+ private List data; // the list of keys (the data)
+ private List children; // the list of children nodes
+ private boolean leaf; // leaf or no leaf
+ private int depth = 0; // Depth of this node
+
+ // TODO: implement the getter/setter methods, e.g., getPredecessor() and setPredecessor()
+
+ // TODO: Implement other necessary methods, e.g., a method to sort the keys
+
+ /**
+ * Constructor
+ * @param parent the predecessor node (if the current node is root, then parent = null)
+ */
+ public GDI2BTreeNode(GDI2BTreeNode parent){
+ this.setPredecessor(parent);
+ data = new ArrayList();
+ children = new ArrayList();
+ leaf = true;
+
+ if(parent == null)
+ {
+ setDepth(0);
+ } else
+ {
+ setDepth(parent.getDepth() + 1);
+ }
+ }
+
+ private void setDepth(int depth)
+ {
+ this.depth = depth;
+ }
+
+ /**
+ * Checks if the node has keys/data
+ * @return true - if the node has keys/data, otherwise false
+ */
+ public boolean hasKeys()
+ {
+ return (data.size() > 0);
+ }
+
+ /**
+ * Checks if the node has children
+ * @return true - if the node has children, otherwise false
+ */
+ public boolean hasChildren()
+ {
+ return (children.size() > 0);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ String result = "";
+
+ for(int i= 0; i< data.size(); i++)
+ {
+ result += data.get(i) + ",";
+ }
+
+ //remove last comma
+ return result.substring(0,result.length()-1);
+ }
+
+ public int countKeys()
+ {
+ int count = data.size();
+
+ for(int i = 0; i< children.size(); i++)
+ {
+ count += children.get(i).countKeys();
+ }
+
+ return count;
+ }
+
+ public int getTotalDepth()
+ {
+ if(isLeaf())
+ {
+ return depth;
+ }
+
+ return children.get(0).getTotalDepth();
+ }
+
+ /**
+ * @return the data
+ */
+ public List getData() {
+ return data;
+ }
+ /**
+ * @param data the data to set
+ */
+ public void setData(List data) {
+ this.data = data;
+ }
+ /**
+ * @return the children
+ */
+ public List getChildren() {
+ return children;
+ }
+ /**
+ * @param children the children to set
+ */
+ public void setChildren(List children) {
+ this.children = children;
+ }
+ /**
+ * Checks if the node is a leaf
+ * @return true - if the node is a leaf, otherwise false
+ */
+ public boolean isLeaf()
+ {
+ return this.leaf;
+ }
+ /**
+ * @param leaf the leaf to set
+ */
+ public void setLeaf(boolean leaf) {
+ this.leaf = leaf;
+ }
+
+ private void setPredecessor(GDI2BTreeNode parent) {
+ this.predecessor = parent;
+ }
+
+ public int getDepth() {
+ return depth;
+ }
+
+ private GDI2BTreeNode split(String entry, int order, GDI2BTreeNode l, GDI2BTreeNode r){
+ //insert sorted
+ for(int i=0; i i) {
+ return children.get(i).add(entry,order);
+ }
+ } else {
+ throw new UnsupportedOperationException();
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public GDI2BTreeNode find(String entry) {
+ //TODO binary search
+
+ for(int i= 0; i< data.size(); i++)
+ {
+ int compared = data.get(i).compareTo(entry);
+
+ if(compared == 0) {
+ return this;
+ }
+
+ if(compared < 0) {
+ if(children.size() > i)
+ {
+ return children.get(i).find(entry);
+ } else {
+ return null;
+ }
+ }
+ }
+
+ //last child
+ if( children.size() == data.size()+1){
+ return children.get(data.size()+1).find(entry);
+ }
+
+ return null;
+ }
+
+ public GDI2BTreeNode del(String entry,int order) {
+
+ GDI2BTreeNode node = find(entry);
+
+ if(node == null)
+ {
+ return null;
+ }
+
+ for(int i= 0; i < node.getData().size(); i++){
+ if(node.getData().get(i).compareTo(entry) == 0)
+ {
+ node.getData().remove(i);
+ //TODO AJUST CHILDREN
+ break;
+ }
+ }
+
+ if(data.size() >= order)
+ {
+ //TODO falsch - nicht nur in den blättern löschen
+ return null;
+ }
+
+ //unterlauf
+ /**
+ * predecessor.getMyLeft()
+ *
+ * if myleft == null
+ * predecessor.getMyRight()
+ *
+ * zähle schlüssen in data und dem gefundenen
+ * ausgleichsschlüssel falls >= 2*order alles ok
+ * -> schlüssel verschieben und aufteilen.
+ *
+ * -> Andernfalls: knoten löschen und aufteilen
+ *
+ * UNTERSCHEIDE: Blatt/Innerer Knoten?!
+ *
+ */
+
+ return null;
+ }
+}
diff --git a/ss2010/gdi2/java/Project4/test_0 b/ss2010/gdi2/java/Project4/test_0
new file mode 100644
index 00000000..206f0c01
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/test_0
@@ -0,0 +1,5 @@
+3 4
+add 1 3
+add 2
+add 3
+del 3
\ No newline at end of file
diff --git a/ss2010/gdi2/java/Project4/test_00 b/ss2010/gdi2/java/Project4/test_00
new file mode 100644
index 00000000..e212d276
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/test_00
@@ -0,0 +1,5 @@
+3
+add 1 3
+add 2
+add 3
+del 3
\ No newline at end of file
diff --git a/ss2010/gdi2/java/Project4/test_01 b/ss2010/gdi2/java/Project4/test_01
new file mode 100644
index 00000000..04a6b3b0
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/test_01
@@ -0,0 +1,5 @@
+order
+add 1
+add 2
+add 3
+del 3
\ No newline at end of file
diff --git a/ss2010/gdi2/java/Project4/test_02 b/ss2010/gdi2/java/Project4/test_02
new file mode 100644
index 00000000..bf79bc3c
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/test_02
@@ -0,0 +1,6 @@
+3
+add 1
+add 2
+add 3
+del 3
+mov 5
\ No newline at end of file
diff --git a/ss2010/gdi2/java/Project4/test_03 b/ss2010/gdi2/java/Project4/test_03
new file mode 100644
index 00000000..f4f96b8f
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/test_03
@@ -0,0 +1,5 @@
+1
+add 1
+add 2
+add 3
+del 3
\ No newline at end of file
diff --git a/ss2010/gdi2/java/Project4/test_04 b/ss2010/gdi2/java/Project4/test_04
new file mode 100644
index 00000000..1b0f8346
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/test_04
@@ -0,0 +1,7 @@
+2
+add G
+add D
+add I
+del G
+del D
+add CS
\ No newline at end of file
diff --git a/ss2010/gdi2/java/Project4/tests/GDI2BTreeTest.java b/ss2010/gdi2/java/Project4/tests/GDI2BTreeTest.java
new file mode 100644
index 00000000..ac5309ec
--- /dev/null
+++ b/ss2010/gdi2/java/Project4/tests/GDI2BTreeTest.java
@@ -0,0 +1,90 @@
+import java.util.ArrayList;
+import org.junit.Test;
+
+
+/**
+ * Test Cases
+ */
+
+public class GDI2BTreeTest
+{
+ /*
+ * Write your own tests to thoroughly check your implementation.
+ * Passing the following tests does not mean that your implementation is 100% correct.
+ *
+ */
+ @Test(expected=GDI2BTreeFileFormatException.class)
+ public void treeTest0()
+ {
+ // read data
+ GDI2BTreeDataReader dataReader = new GDI2BTreeDataReader("test_03");
+ // create tree and root
+ GDI2BTree tree = new GDI2BTree();
+ GDI2BTreeNode root = new GDI2BTreeNode(null);
+ // initialise root
+ root.setData(new ArrayList());
+ root.setChildren(new ArrayList());
+ // read order
+ int order = dataReader.readOrder();
+ // initialise tree
+ tree.setOrder(order);
+ tree.setRoot(root);
+
+ String[] commandKey;
+ while ((commandKey = dataReader.getNextLine()) != null)
+ {
+ if (commandKey[0].equals("add"))
+ {
+ root.getData().add(commandKey[1]); // simulating addData()
+ System.out.println("Add: " + commandKey[1]);
+ tree.correctnessCheckPublic(); // check the correctness of the B-Tree
+ }
+ else if (commandKey[0].equals("del"))
+ {
+ System.out.println("Del: " + commandKey[1]);
+ }
+ }
+ dataReader.closeGDI2BTreeDataReader(); // close the stream
+ }
+ @Test(expected=GDI2BTreeFileFormatException.class)
+ public void treeTest1()
+ {
+ // read data
+ GDI2BTreeDataReader dataReader = new GDI2BTreeDataReader("test_04");
+ // create tree and root
+ GDI2BTree tree = new GDI2BTree();
+ GDI2BTreeNode root = new GDI2BTreeNode(null);
+ // initialise root
+ root.setData(new ArrayList());
+ root.setChildren(new ArrayList());
+ // read order
+ int order = dataReader.readOrder();
+ // initialise tree
+ tree.setOrder(order);
+ tree.setRoot(root);
+
+ String[] commandKey;
+ while ((commandKey = dataReader.getNextLine()) != null)
+ {
+ if (commandKey[0].equals("add"))
+ {
+ root.getData().add(commandKey[1]); // simulating addData()
+ System.out.println("Add: " + commandKey[1]);
+ tree.correctnessCheckPublic(); // check the correctness of the B-Tree
+ }
+ else if (commandKey[0].equals("del"))
+ {
+ System.out.println("Del: " + commandKey[1]);
+ }
+ }
+ dataReader.closeGDI2BTreeDataReader(); // close the stream
+ // until here everything should go well
+
+ // adding incorrectly a child node
+ GDI2BTreeNode child = new GDI2BTreeNode(root);
+ root.getChildren().add(child);
+ // the leaf variable is not set to false
+ // hasChildren() has to be correctly implemented to raise the exception here
+ tree.correctnessCheckPublic(); // check the correctness of the B-Tree
+ }
+}
diff --git a/ws2010/se/EiSE-Skript.pdf b/ws2010/se/EiSE-Skript.pdf
new file mode 100644
index 00000000..f3fb7c20
--- /dev/null
+++ b/ws2010/se/EiSE-Skript.pdf
@@ -0,0 +1,32510 @@
+%PDF-1.5
+%
+1 0 obj
+<< /S /GoTo /D (chapter.1) >>
+endobj
+4 0 obj
+(Vorlesungs\374berblick)
+endobj
+5 0 obj
+<< /S /GoTo /D (chapter.2) >>
+endobj
+8 0 obj
+(What is Software Engineering?)
+endobj
+9 0 obj
+<< /S /GoTo /D (chapter.3) >>
+endobj
+12 0 obj
+(Software Quality)
+endobj
+13 0 obj
+<< /S /GoTo /D (chapter.4) >>
+endobj
+16 0 obj
+(Software Projekt Management)
+endobj
+17 0 obj
+<< /S /GoTo /D (chapter.5) >>
+endobj
+20 0 obj
+(Risk Management)
+endobj
+21 0 obj
+<< /S /GoTo /D (chapter.6) >>
+endobj
+24 0 obj
+(Computer Aided Software Engineering \(CASE\))
+endobj
+25 0 obj
+<< /S /GoTo /D (chapter.7) >>
+endobj
+28 0 obj
+(Version Control Systems)
+endobj
+29 0 obj
+<< /S /GoTo /D (section.7.1) >>
+endobj
+32 0 obj
+(\334berblick)
+endobj
+33 0 obj
+<< /S /GoTo /D (section.7.2) >>
+endobj
+36 0 obj
+(Verteilte und Zentralisierte Versionskontrolle im Vergleich)
+endobj
+37 0 obj
+<< /S /GoTo /D (section.7.3) >>
+endobj
+40 0 obj
+(Typische Arbeitsschritte)
+endobj
+41 0 obj
+<< /S /GoTo /D (section.7.4) >>
+endobj
+44 0 obj
+(Git ArbeitsablaufVCS:UnderstandingGit, VCS:gitref)
+endobj
+45 0 obj
+<< /S /GoTo /D (chapter.8) >>
+endobj
+48 0 obj
+(Software Engineering Processes)
+endobj
+49 0 obj
+<< /S /GoTo /D (section.8.1) >>
+endobj
+52 0 obj
+(Software Process Models - A First Glimpse)
+endobj
+53 0 obj
+<< /S /GoTo /D (section.8.2) >>
+endobj
+56 0 obj
+(Software Engineering Processes - Overview)
+endobj
+57 0 obj
+<< /S /GoTo /D (section.8.3) >>
+endobj
+60 0 obj
+(Case Study)
+endobj
+61 0 obj
+<< /S /GoTo /D (section.8.4) >>
+endobj
+64 0 obj
+(Software Engineering Processes - Extreme Programming)
+endobj
+65 0 obj
+<< /S /GoTo /D (section.8.5) >>
+endobj
+68 0 obj
+(Software Engineering Processes - Aftermath)
+endobj
+69 0 obj
+<< /S /GoTo /D (chapter.9) >>
+endobj
+72 0 obj
+(System Models)
+endobj
+73 0 obj
+<< /S /GoTo /D (chapter.10) >>
+endobj
+76 0 obj
+(Object-oriented Thinking)
+endobj
+77 0 obj
+<< /S /GoTo /D (chapter.11) >>
+endobj
+80 0 obj
+(Domain Model and Domain Modelling)
+endobj
+81 0 obj
+<< /S /GoTo /D (chapter.12) >>
+endobj
+84 0 obj
+(Software Testing \046 Unit Tests)
+endobj
+85 0 obj
+<< /S /GoTo /D (chapter.13) >>
+endobj
+88 0 obj
+(Requirements Engineering)
+endobj
+89 0 obj
+<< /S /GoTo /D (section.13.1) >>
+endobj
+92 0 obj
+(Use Cases)
+endobj
+93 0 obj
+<< /S /GoTo /D (chapter.14) >>
+endobj
+96 0 obj
+(OO Design)
+endobj
+97 0 obj
+<< /S /GoTo /D (section.14.1) >>
+endobj
+100 0 obj
+(Responsibility \046 Coupling \046 Cohesion)
+endobj
+101 0 obj
+<< /S /GoTo /D (section.14.2) >>
+endobj
+104 0 obj
+(GRASP - General Responsibility Assignment Principles)
+endobj
+105 0 obj
+<< /S /GoTo /D (section.14.3) >>
+endobj
+108 0 obj
+(GRASP - Advanced Principles)
+endobj
+109 0 obj
+<< /S /GoTo /D (section.14.4) >>
+endobj
+112 0 obj
+(OO Design Heuristics)
+endobj
+113 0 obj
+<< /S /GoTo /D (chapter.15) >>
+endobj
+116 0 obj
+(Design Patterns)
+endobj
+117 0 obj
+<< /S /GoTo /D (section.15.1) >>
+endobj
+120 0 obj
+(Introduction to Patterns)
+endobj
+121 0 obj
+<< /S /GoTo /D (subsection.15.1.1) >>
+endobj
+124 0 obj
+(Motivation f\374r den Einsatz/Formulierung von Patterns)
+endobj
+125 0 obj
+<< /S /GoTo /D (subsection.15.1.2) >>
+endobj
+128 0 obj
+(Was ist ein Pattern\(= Entwurfsmuster\)?)
+endobj
+129 0 obj
+<< /S /GoTo /D (subsection.15.1.3) >>
+endobj
+132 0 obj
+(Profit durch den Einsatz von Patterns)
+endobj
+133 0 obj
+<< /S /GoTo /D (subsection.15.1.4) >>
+endobj
+136 0 obj
+(Bestandteile eines Patterns)
+endobj
+137 0 obj
+<< /S /GoTo /D (subsection.15.1.5) >>
+endobj
+140 0 obj
+(Exkursion)
+endobj
+141 0 obj
+<< /S /GoTo /D (subsection.15.1.6) >>
+endobj
+144 0 obj
+(Unterschied: Pattern \046 Idiom)
+endobj
+145 0 obj
+<< /S /GoTo /D (subsection.15.1.7) >>
+endobj
+148 0 obj
+(Was ist ein \214Software Design Pattern'' ?)
+endobj
+149 0 obj
+<< /S /GoTo /D (subsection.15.1.8) >>
+endobj
+152 0 obj
+(Dokumentation der Anwendung eines \214Software Design Patterns'')
+endobj
+153 0 obj
+<< /S /GoTo /D (subsection.15.1.9) >>
+endobj
+156 0 obj
+(Was ist ein \214Architectural Pattern'' ?)
+endobj
+157 0 obj
+<< /S /GoTo /D (subsection.15.1.10) >>
+endobj
+160 0 obj
+(Beispiele f\374r \214Architectural Patterns'':)
+endobj
+161 0 obj
+<< /S /GoTo /D (section.15.2) >>
+endobj
+164 0 obj
+(Template Method Pattern)
+endobj
+165 0 obj
+<< /S /GoTo /D (subsection.15.2.1) >>
+endobj
+168 0 obj
+(Ziel \(Benutze wenn\):)
+endobj
+169 0 obj
+<< /S /GoTo /D (subsection.15.2.2) >>
+endobj
+172 0 obj
+(Struktur:)
+endobj
+173 0 obj
+<< /S /GoTo /D (subsection.15.2.3) >>
+endobj
+176 0 obj
+(Wichtige Begriffe)
+endobj
+177 0 obj
+<< /S /GoTo /D (subsection.15.2.4) >>
+endobj
+180 0 obj
+(Konsequenzen)
+endobj
+181 0 obj
+<< /S /GoTo /D (subsection.15.2.5) >>
+endobj
+184 0 obj
+(Implementierung)
+endobj
+185 0 obj
+<< /S /GoTo /D (subsection.15.2.6) >>
+endobj
+188 0 obj
+(Anwendungsgebiet)
+endobj
+189 0 obj
+<< /S /GoTo /D (subsection.15.2.7) >>
+endobj
+192 0 obj
+(In Zusammenhang stehende Patterns)
+endobj
+193 0 obj
+<< /S /GoTo /D (section.15.3) >>
+endobj
+196 0 obj
+(Composite Pattern)
+endobj
+197 0 obj
+<< /S /GoTo /D (subsection.15.3.1) >>
+endobj
+200 0 obj
+(Ziel \(Benutze wenn\))
+endobj
+201 0 obj
+<< /S /GoTo /D (subsection.15.3.2) >>
+endobj
+204 0 obj
+(Beispiel)
+endobj
+205 0 obj
+<< /S /GoTo /D (subsection.15.3.3) >>
+endobj
+208 0 obj
+(Struktur)
+endobj
+209 0 obj
+<< /S /GoTo /D (subsection.15.3.4) >>
+endobj
+212 0 obj
+(Konsequenzen)
+endobj
+213 0 obj
+<< /S /GoTo /D (subsection.15.3.5) >>
+endobj
+216 0 obj
+(Implementierung)
+endobj
+217 0 obj
+<< /S /GoTo /D (subsection.15.3.6) >>
+endobj
+220 0 obj
+(In Zusammenhang stehende Patterns)
+endobj
+221 0 obj
+<< /S /GoTo /D (section.15.4) >>
+endobj
+224 0 obj
+(Iterator Pattern)
+endobj
+225 0 obj
+<< /S /GoTo /D (subsection.15.4.1) >>
+endobj
+228 0 obj
+(Ziel \(Benutze wenn\))
+endobj
+229 0 obj
+<< /S /GoTo /D (subsection.15.4.2) >>
+endobj
+232 0 obj
+(Beispiel)
+endobj
+233 0 obj
+<< /S /GoTo /D (subsection.15.4.3) >>
+endobj
+236 0 obj
+(Struktur)
+endobj
+237 0 obj
+<< /S /GoTo /D (subsection.15.4.4) >>
+endobj
+240 0 obj
+(Konsequenzen)
+endobj
+241 0 obj
+<< /S /GoTo /D (subsection.15.4.5) >>
+endobj
+244 0 obj
+(Implementierung)
+endobj
+245 0 obj
+<< /S /GoTo /D (subsection.15.4.6) >>
+endobj
+248 0 obj
+(In Zusammenhang stehende Patterns)
+endobj
+249 0 obj
+<< /S /GoTo /D (section.15.5) >>
+endobj
+252 0 obj
+(Observer Pattern)
+endobj
+253 0 obj
+<< /S /GoTo /D (subsection.15.5.1) >>
+endobj
+256 0 obj
+(Ziel \(Benutze wenn\))
+endobj
+257 0 obj
+<< /S /GoTo /D (subsection.15.5.2) >>
+endobj
+260 0 obj
+(Beispiel)
+endobj
+261 0 obj
+<< /S /GoTo /D (subsection.15.5.3) >>
+endobj
+264 0 obj
+(Struktur)
+endobj
+265 0 obj
+<< /S /GoTo /D (subsection.15.5.4) >>
+endobj
+268 0 obj
+(Konsequenzen)
+endobj
+269 0 obj
+<< /S /GoTo /D (subsection.15.5.5) >>
+endobj
+272 0 obj
+(Implementierung)
+endobj
+273 0 obj
+<< /S /GoTo /D (subsection.15.5.6) >>
+endobj
+276 0 obj
+(In Zusammenhang stehende Patterns)
+endobj
+277 0 obj
+<< /S /GoTo /D (subsection.15.5.7) >>
+endobj
+280 0 obj
+(Exkurs: Konsequenzen der objektorientierten Programmierung \046 Ausgleichen der Nachteile durch das \214Observer Pattern'' bzw. ein Nachteil f\374r das \214Observer Pattern'')
+endobj
+281 0 obj
+<< /S /GoTo /D (section.15.6) >>
+endobj
+284 0 obj
+(Command Pattern)
+endobj
+285 0 obj
+<< /S /GoTo /D (section.15.7) >>
+endobj
+288 0 obj
+(Decorator Pattern)
+endobj
+289 0 obj
+<< /S /GoTo /D (section.15.8) >>
+endobj
+292 0 obj
+(Adaptor Pattern)
+endobj
+293 0 obj
+<< /S /GoTo /D (subsection.15.8.1) >>
+endobj
+296 0 obj
+(Ziel \(Benutze wenn\))
+endobj
+297 0 obj
+<< /S /GoTo /D (subsection.15.8.2) >>
+endobj
+300 0 obj
+(Beispiel)
+endobj
+301 0 obj
+<< /S /GoTo /D (subsection.15.8.3) >>
+endobj
+304 0 obj
+(Struktur)
+endobj
+305 0 obj
+<< /S /GoTo /D (subsection.15.8.4) >>
+endobj
+308 0 obj
+(Konsequenzen)
+endobj
+309 0 obj
+<< /S /GoTo /D (subsection.15.8.5) >>
+endobj
+312 0 obj
+(Implementierung)
+endobj
+313 0 obj
+<< /S /GoTo /D (subsection.15.8.6) >>
+endobj
+316 0 obj
+(In Zusammenhang stehende Patterns)
+endobj
+317 0 obj
+<< /S /GoTo /D (section.15.9) >>
+endobj
+320 0 obj
+(Strategy Pattern)
+endobj
+321 0 obj
+<< /S /GoTo /D (section.15.10) >>
+endobj
+324 0 obj
+( Proxy Pattern)
+endobj
+325 0 obj
+<< /S /GoTo /D (subsection.15.10.1) >>
+endobj
+328 0 obj
+(Ziel \(Benutze wenn\))
+endobj
+329 0 obj
+<< /S /GoTo /D (subsection.15.10.2) >>
+endobj
+332 0 obj
+(Beispiel)
+endobj
+333 0 obj
+<< /S /GoTo /D (subsection.15.10.3) >>
+endobj
+336 0 obj
+(Struktur)
+endobj
+337 0 obj
+<< /S /GoTo /D (subsection.15.10.4) >>
+endobj
+340 0 obj
+(Konsequenzen)
+endobj
+341 0 obj
+<< /S /GoTo /D (subsection.15.10.5) >>
+endobj
+344 0 obj
+(Implementierung)
+endobj
+345 0 obj
+<< /S /GoTo /D (subsection.15.10.6) >>
+endobj
+348 0 obj
+(In Zusammenhang stehende Patterns)
+endobj
+349 0 obj
+<< /S /GoTo /D (section.15.11) >>
+endobj
+352 0 obj
+( Fa\347ade Pattern)
+endobj
+353 0 obj
+<< /S /GoTo /D (section.15.12) >>
+endobj
+356 0 obj
+(Design Patterns \205 \334bersicht)
+endobj
+357 0 obj
+<< /S /GoTo /D (chapter.16) >>
+endobj
+360 0 obj
+(Frameworks)
+endobj
+361 0 obj
+<< /S /GoTo /D (section.16.1) >>
+endobj
+364 0 obj
+(Definition \214Framework'')
+endobj
+365 0 obj
+<< /S /GoTo /D (section.16.2) >>
+endobj
+368 0 obj
+(Was ist ein Framework einer objektorientierten Anwendung?)
+endobj
+369 0 obj
+<< /S /GoTo /D (section.16.3) >>
+endobj
+372 0 obj
+(Das Framework verk\366rpert...)
+endobj
+373 0 obj
+<< /S /GoTo /D (section.16.4) >>
+endobj
+376 0 obj
+(Vorteile von Frameworks)
+endobj
+377 0 obj
+<< /S /GoTo /D (section.16.5) >>
+endobj
+380 0 obj
+(Profit durch die Anwendung eines Frameworks/ St\344rken eines Frameworks)
+endobj
+381 0 obj
+<< /S /GoTo /D (section.16.6) >>
+endobj
+384 0 obj
+(Schw\344chen eines Frameworks)
+endobj
+385 0 obj
+<< /S /GoTo /D (section.16.7) >>
+endobj
+388 0 obj
+(Es k\366nnen 3 Framework-Typen unterschieden werden)
+endobj
+389 0 obj
+<< /S /GoTo /D (subsection.16.7.1) >>
+endobj
+392 0 obj
+(Black-Box Framework)
+endobj
+393 0 obj
+<< /S /GoTo /D (subsection.16.7.2) >>
+endobj
+396 0 obj
+(White-Box Framework)
+endobj
+397 0 obj
+<< /S /GoTo /D (subsection.16.7.3) >>
+endobj
+400 0 obj
+(Grey-Box Framework)
+endobj
+401 0 obj
+<< /S /GoTo /D (chapter.17) >>
+endobj
+404 0 obj
+(UML - Unified Modelling Language)
+endobj
+405 0 obj
+<< /S /GoTo /D (section.17.1) >>
+endobj
+408 0 obj
+(Logical Architekture and Package Diagrams)
+endobj
+409 0 obj
+<< /S /GoTo /D (section.17.2) >>
+endobj
+412 0 obj
+(Interaction Diagrams)
+endobj
+413 0 obj
+<< /S /GoTo /D (subsection.17.2.1) >>
+endobj
+416 0 obj
+(Sequence Diagrams)
+endobj
+417 0 obj
+<< /S /GoTo /D (subsection.17.2.2) >>
+endobj
+420 0 obj
+(Beispiel:)
+endobj
+421 0 obj
+<< /S /GoTo /D (subsection.17.2.3) >>
+endobj
+424 0 obj
+(Aufruftypen:)
+endobj
+425 0 obj
+<< /S /GoTo /D (subsection.17.2.4) >>
+endobj
+428 0 obj
+(Nachrichten:)
+endobj
+429 0 obj
+<< /S /GoTo /D (subsection.17.2.5) >>
+endobj
+432 0 obj
+(neue Objekte:)
+endobj
+433 0 obj
+<< /S /GoTo /D (subsection.17.2.6) >>
+endobj
+436 0 obj
+(Fragmente:)
+endobj
+437 0 obj
+<< /S /GoTo /D (subsection.17.2.7) >>
+endobj
+440 0 obj
+(Communication Diagrams)
+endobj
+441 0 obj
+<< /S /GoTo /D (subsection.17.2.8) >>
+endobj
+444 0 obj
+(Vergleich von Sequence und Comminication Diagram)
+endobj
+445 0 obj
+<< /S /GoTo /D (section.17.3) >>
+endobj
+448 0 obj
+(Class Diagrams)
+endobj
+449 0 obj
+<< /S /GoTo /D (subsection.17.3.1) >>
+endobj
+452 0 obj
+(Beispiel)
+endobj
+453 0 obj
+<< /S /GoTo /D (subsection.17.3.2) >>
+endobj
+456 0 obj
+(Kennzeichnung der Sicherheit von Attributen und Operationen:)
+endobj
+457 0 obj
+<< /S /GoTo /D (subsection.17.3.3) >>
+endobj
+460 0 obj
+(Klassenarten:)
+endobj
+461 0 obj
+<< /S /GoTo /D (subsection.17.3.4) >>
+endobj
+464 0 obj
+(Beziehungen)
+endobj
+465 0 obj
+<< /S /GoTo /D (section.17.4) >>
+endobj
+468 0 obj
+(Object Diagrams)
+endobj
+469 0 obj
+<< /S /GoTo /D (subsection.17.4.1) >>
+endobj
+472 0 obj
+(Beispiel)
+endobj
+473 0 obj
+<< /S /GoTo /D (subsection.17.4.2) >>
+endobj
+476 0 obj
+(Erl\344uterungen)
+endobj
+477 0 obj
+<< /S /GoTo /D (section.17.5) >>
+endobj
+480 0 obj
+(Use Case Diagrams)
+endobj
+481 0 obj
+<< /S /GoTo /D (subsection.17.5.1) >>
+endobj
+484 0 obj
+(Elemente:)
+endobj
+485 0 obj
+<< /S /GoTo /D (subsection.17.5.2) >>
+endobj
+488 0 obj
+(Beziehungen:)
+endobj
+489 0 obj
+<< /S /GoTo /D (subsection.17.5.3) >>
+endobj
+492 0 obj
+()
+endobj
+493 0 obj
+<< /S /GoTo /D (chapter.18) >>
+endobj
+496 0 obj
+(Klausur)
+endobj
+497 0 obj
+<< /S /GoTo /D (section.18.1) >>
+endobj
+500 0 obj
+(Allgemeines)
+endobj
+501 0 obj
+<< /S /GoTo /D (section.18.2) >>
+endobj
+504 0 obj
+(Struktur)
+endobj
+505 0 obj
+<< /S /GoTo /D (subsection.18.2.1) >>
+endobj
+508 0 obj
+(Multiplechoicefragen)
+endobj
+509 0 obj
+<< /S /GoTo /D (subsection.18.2.2) >>
+endobj
+512 0 obj
+(Allgemeine Wissensfragen)
+endobj
+513 0 obj
+<< /S /GoTo /D (subsection.18.2.3) >>
+endobj
+516 0 obj
+(Software Design)
+endobj
+517 0 obj
+<< /S /GoTo /D (subsection.18.2.4) >>
+endobj
+520 0 obj
+(Use Cases)
+endobj
+521 0 obj
+<< /S /GoTo /D (subsection.18.2.5) >>
+endobj
+524 0 obj
+(UML Klassendiagramme)
+endobj
+525 0 obj
+<< /S /GoTo /D (subsection.18.2.6) >>
+endobj
+528 0 obj
+(Testen und Testabdeckung)
+endobj
+529 0 obj
+<< /S /GoTo /D (subsection.18.2.7) >>
+endobj
+532 0 obj
+(Design Patterns)
+endobj
+533 0 obj
+<< /S /GoTo /D (appendix.A) >>
+endobj
+536 0 obj
+(Abk\374rzungsverzeichnis)
+endobj
+537 0 obj
+<< /S /GoTo /D (appendix.B) >>
+endobj
+540 0 obj
+(Kleines SE W\366rterbuch)
+endobj
+541 0 obj
+<< /S /GoTo /D (appendix.C) >>
+endobj
+544 0 obj
+(Bonusregelung)
+endobj
+545 0 obj
+<< /S /GoTo /D (section.C.1) >>
+endobj
+548 0 obj
+(Allgemeines)
+endobj
+549 0 obj
+<< /S /GoTo /D (section.C.2) >>
+endobj
+552 0 obj
+(Erlangen des Bonuses)
+endobj
+553 0 obj
+<< /S /GoTo /D (section.C.3) >>
+endobj
+556 0 obj
+(Verrechnung mit der Klausur)
+endobj
+557 0 obj
+<< /S /GoTo /D (section.C.4) >>
+endobj
+560 0 obj
+(G\374ltigkeit des erreichten Bonus)
+endobj
+561 0 obj
+<< /S /GoTo /D (appendix.D) >>
+endobj
+564 0 obj
+(Autoren)
+endobj
+565 0 obj
+<< /S /GoTo /D [566 0 R /FitV] >>
+endobj
+569 0 obj <<
+/Length 392
+/Filter /FlateDecode
+>>
+stream
+xڕRMo0W(kdhoCPJjv6%F]GENbAH?v7"+ॳ{EҖl8Wf W6^*R8̻{'J