Skip to content

Commit

Permalink
Deutsch ist Deutsch!
Browse files Browse the repository at this point in the history
  • Loading branch information
netaviator committed Nov 26, 2016
1 parent 878baeb commit fc3e2a4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
Binary file modified GillaAufg4/bin/mypack/ContainerList.class
Binary file not shown.
Binary file modified GillaAufg4/bin/mypack/LoadList.class
Binary file not shown.
12 changes: 6 additions & 6 deletions GillaAufg4/src/mypack/ContainerList.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class ContainerList {

/** Liste der Container **/
private Container[] list;
private Container[] liste;
/** Maximaler Platz in der Liste **/
private int max;
/** Aktuell verwendete Container **/
Expand All @@ -23,9 +23,9 @@ public class ContainerList {
public ContainerList() {
this.max = 3;
this.anzahl = 0;
this.list = new Container[this.max];
this.liste = new Container[this.max];
for (int i = 0; i < this.max; i++) {
this.list[i] = new Container();
this.liste[i] = new Container();
this.anzahl++;
}
}
Expand All @@ -40,9 +40,9 @@ public ContainerList() {
public ContainerList(int max) {
this.max = max;
this.anzahl = 0;
this.list = new Container[this.max];
this.liste = new Container[this.max];
for (int i = 0; i < this.max; i++) {
this.list[i] = new Container();
this.liste[i] = new Container();
this.anzahl++;
}
}
Expand All @@ -56,7 +56,7 @@ public ContainerList(int max) {
*/
public Container getContainer(int i) {
if (i < this.getAnzahl() && i > -1)
return this.list[i];
return this.liste[i];
else
return new Container();
}
Expand Down
26 changes: 13 additions & 13 deletions GillaAufg4/src/mypack/LoadList.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public class LoadList {
/** Aktuelle Anzahl der Elemente in der Ladeliste **/
private int anzahl;
/** Liste mit Elementen **/
private int[] list;
private int[] liste;

/**
* Standard-Konstruktor
*/
public LoadList() {
this.max = 10;
this.anzahl = 0;
this.list = new int[10];
this.liste = new int[10];
}

/**
Expand All @@ -37,10 +37,10 @@ public LoadList() {
public LoadList(int[] l) {
this.max = l.length;
this.anzahl = l.length;
this.list = new int[l.length];
this.liste = new int[l.length];

for (int i = 0; i < l.length; i++)
this.list[i] = l[i];
this.liste[i] = l[i];
}

/**
Expand All @@ -52,9 +52,9 @@ public LoadList(int[] l) {
public LoadList(int max) {
this.max = max;
this.anzahl = 0;
this.list = new int[max];
this.liste = new int[max];
for (int i = 0; i < this.anzahl; i++)
this.list[i] = -1;
this.liste[i] = -1;
}

/**
Expand All @@ -65,14 +65,14 @@ public LoadList(int max) {
*/
public void addElement(int i) {
if (this.anzahl < this.max)
this.list[this.anzahl++] = i;
this.liste[this.anzahl++] = i;
}

/**
* Letztes Element aus der Liste entfernen
*/
public void delElement() {
this.list[--this.anzahl] = -1;
this.liste[--this.anzahl] = -1;
}

/**
Expand All @@ -84,7 +84,7 @@ public void delElement() {
*/
public int getElement(int i) {
if (i < this.getAnzahl())
return this.list[i];
return this.liste[i];
else
return -1;
}
Expand All @@ -104,7 +104,7 @@ public int getAnzahl() {
public void elementeAusgeben() {
System.out.print("[");
for (int i = 0; i < this.getAnzahl(); i++) {
System.out.print(this.list[i]);
System.out.print(this.liste[i]);
if ((this.getAnzahl() - 1) != i)
System.out.print(", ");
}
Expand All @@ -115,7 +115,7 @@ public void elementeAusgeben() {
* Elemente der Liste aufsteigend Sortieren
*/
public void sortAufsteigend() {
Arrays.sort(this.list);
Arrays.sort(this.liste);
}

/**
Expand All @@ -132,8 +132,8 @@ public void sortAbsteigen() {
public void umkehren() {
int[] neueListe = new int[this.max];
for (int i = (this.max - 1); i >= 0; i--)
neueListe[i] = this.list[(this.anzahl - i - 1)];
neueListe[i] = this.liste[(this.anzahl - i - 1)];

this.list = neueListe;
this.liste = neueListe;
}
}

0 comments on commit fc3e2a4

Please sign in to comment.