heute
commit
58492d18a5
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="module" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1 @@
|
||||||
|
/bin/
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Güterverkehr</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,14 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=17
|
||||||
|
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.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||||
|
org.eclipse.jdt.core.compiler.release=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=17
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
public class BinaryTree<X> {
|
||||||
|
|
||||||
|
private BinaryTree left;
|
||||||
|
private BinaryTree right;
|
||||||
|
private X content;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
public class LinkedList<X> { //https://docs.oracle.com/javase/8/docs/api/java/util/Set.html
|
||||||
|
|
||||||
|
private X content;
|
||||||
|
private X next;
|
||||||
|
|
||||||
|
public LinkedList(X _content, X _next) {
|
||||||
|
content = _content;
|
||||||
|
next = _next;
|
||||||
|
}
|
||||||
|
public X getNext() {
|
||||||
|
return this.next;
|
||||||
|
}
|
||||||
|
public void setNext(X next) {
|
||||||
|
this.next = next;
|
||||||
|
}
|
||||||
|
public X getContent() {
|
||||||
|
return this.content;
|
||||||
|
}
|
||||||
|
public void setContent(X content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
public class Rangierbahnhof {
|
||||||
|
|
||||||
|
public BinaryTree gleise;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
public class Waggon<X> {
|
||||||
|
|
||||||
|
private String Ziel;
|
||||||
|
private int nummer;
|
||||||
|
|
||||||
|
public Waggon(int _nummer, String _Ziel) {
|
||||||
|
nummer = _nummer;
|
||||||
|
Ziel = _Ziel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZiel() {
|
||||||
|
return this.Ziel;
|
||||||
|
}
|
||||||
|
public void setZiel(String Ziel) {
|
||||||
|
this.Ziel = Ziel;
|
||||||
|
}
|
||||||
|
public int getNummer() {
|
||||||
|
return this.nummer;
|
||||||
|
}
|
||||||
|
public void setNummer(int nummer) {
|
||||||
|
this.nummer = nummer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
public class Zug<X> {
|
||||||
|
|
||||||
|
private int nummer;
|
||||||
|
private String Ziel;
|
||||||
|
private X first;
|
||||||
|
|
||||||
|
public Zug(int _nummer, String _Ziel) {
|
||||||
|
nummer = _nummer;
|
||||||
|
Ziel = _Ziel;
|
||||||
|
}
|
||||||
|
public void push(Waggon w) {
|
||||||
|
|
||||||
|
}
|
||||||
|
public Waggon pop() {
|
||||||
|
Waggon a = null;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public int getNummer() {
|
||||||
|
return nummer;
|
||||||
|
}
|
||||||
|
public void setNummer(int nummer) {
|
||||||
|
this.nummer = nummer;
|
||||||
|
}
|
||||||
|
public String getZiel() {
|
||||||
|
return Ziel;
|
||||||
|
}
|
||||||
|
public void setZiel(String Ziel) {
|
||||||
|
this.Ziel = Ziel;
|
||||||
|
}
|
||||||
|
public int getLaenge() {
|
||||||
|
int laenge = 1;
|
||||||
|
return laenge;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*public int getLaenge() {
|
||||||
|
if(first = null) return 0;
|
||||||
|
LinkedList current = first;
|
||||||
|
int z = 1;
|
||||||
|
while(content.getNext() != null) {
|
||||||
|
z++;
|
||||||
|
current = current.getNext();
|
||||||
|
}
|
||||||
|
return z;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue