Compare commits
27 Commits
a84a407c31
...
main
Author | SHA1 | Date | |
---|---|---|---|
5f15f03d92 | |||
9908656813 | |||
b439030fee | |||
7fea13b9b3 | |||
639da57def | |||
0c95c28bc4 | |||
ac1cc19a88 | |||
62da4a9ea5 | |||
dad5a33695 | |||
93fb940a8c | |||
55e6561e02 | |||
7972c9088c | |||
e59cbb88f1 | |||
440eed0e9d | |||
49262c4954 | |||
fa85372c13 | |||
8c224faa0e | |||
85e8396ce9 | |||
81ea768dca | |||
dcf2a95b4f | |||
e518460e81 | |||
753d5e2780 | |||
41743095bd | |||
38287f8c0b | |||
d9eaae7b7a | |||
b90d94bf41 | |||
096a49e0a8 |
BIN
bin/test/uebung/uebung05/logistics/ManagerTest.class
Normal file
BIN
bin/test/uebung/uebung05/logistics/ManagerTest.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung05/logistics/storage/IntStorageTest.class
Normal file
BIN
bin/test/uebung/uebung05/logistics/storage/IntStorageTest.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/collection/SetTest.class
Normal file
BIN
bin/test/uebung/uebung09/collection/SetTest.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/Array2dIteratorTest.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/Array2dIteratorTest.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/uebung05/logistics/Manager.class
Normal file
BIN
bin/uebung05/logistics/Manager.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/uebung05/logistics/quantities/NeedCollector.class
Normal file
BIN
bin/uebung05/logistics/quantities/NeedCollector.class
Normal file
Binary file not shown.
BIN
bin/uebung05/logistics/quantities/Unit.class
Normal file
BIN
bin/uebung05/logistics/quantities/Unit.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/uebung06/Field.class
Normal file
BIN
bin/uebung06/Field.class
Normal file
Binary file not shown.
BIN
bin/uebung06/Sudoku.class
Normal file
BIN
bin/uebung06/Sudoku.class
Normal file
Binary file not shown.
BIN
bin/uebung06/SudokuApp.class
Normal file
BIN
bin/uebung06/SudokuApp.class
Normal file
Binary file not shown.
BIN
bin/uebung06/VALUE.class
Normal file
BIN
bin/uebung06/VALUE.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/Book.class
Normal file
BIN
bin/uebung08/doc/Book.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/BookDemo.class
Normal file
BIN
bin/uebung08/doc/BookDemo.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/CountWordsVisitor.class
Normal file
BIN
bin/uebung08/doc/CountWordsVisitor.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/Image.class
Normal file
BIN
bin/uebung08/doc/Image.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/Paragraph.class
Normal file
BIN
bin/uebung08/doc/Paragraph.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/Section.class
Normal file
BIN
bin/uebung08/doc/Section.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/TableOfContentsVisitor.class
Normal file
BIN
bin/uebung08/doc/TableOfContentsVisitor.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/TextComponent.class
Normal file
BIN
bin/uebung08/doc/TextComponent.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/ToTextVisitor.class
Normal file
BIN
bin/uebung08/doc/ToTextVisitor.class
Normal file
Binary file not shown.
BIN
bin/uebung08/doc/Visitor.class
Normal file
BIN
bin/uebung08/doc/Visitor.class
Normal file
Binary file not shown.
BIN
bin/uebung09/chess/Board.class
Normal file
BIN
bin/uebung09/chess/Board.class
Normal file
Binary file not shown.
BIN
bin/uebung09/chess/ChessApp.class
Normal file
BIN
bin/uebung09/chess/ChessApp.class
Normal file
Binary file not shown.
BIN
bin/uebung09/chess/Color.class
Normal file
BIN
bin/uebung09/chess/Color.class
Normal file
Binary file not shown.
BIN
bin/uebung09/chess/Knight.class
Normal file
BIN
bin/uebung09/chess/Knight.class
Normal file
Binary file not shown.
BIN
bin/uebung09/chess/Piece.class
Normal file
BIN
bin/uebung09/chess/Piece.class
Normal file
Binary file not shown.
BIN
bin/uebung09/chess/Queen.class
Normal file
BIN
bin/uebung09/chess/Queen.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/BigSet$1.class
Normal file
BIN
bin/uebung09/collection/BigSet$1.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/BigSet.class
Normal file
BIN
bin/uebung09/collection/BigSet.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/EmptySet$1.class
Normal file
BIN
bin/uebung09/collection/EmptySet$1.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/EmptySet.class
Normal file
BIN
bin/uebung09/collection/EmptySet.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/Set.class
Normal file
BIN
bin/uebung09/collection/Set.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/SetFactory.class
Normal file
BIN
bin/uebung09/collection/SetFactory.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/SingeltonSet$1.class
Normal file
BIN
bin/uebung09/collection/SingeltonSet$1.class
Normal file
Binary file not shown.
BIN
bin/uebung09/collection/SingeltonSet.class
Normal file
BIN
bin/uebung09/collection/SingeltonSet.class
Normal file
Binary file not shown.
BIN
bin/uebung09/iterator/Array2dIterator.class
Normal file
BIN
bin/uebung09/iterator/Array2dIterator.class
Normal file
Binary file not shown.
BIN
bin/uebung09/iterator/SkipNullIterator.class
Normal file
BIN
bin/uebung09/iterator/SkipNullIterator.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/BlackForest.class
Normal file
BIN
bin/uebung10/logo/BlackForest.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/DarkForest.class
Normal file
BIN
bin/uebung10/logo/DarkForest.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Demo.class
Normal file
BIN
bin/uebung10/logo/Demo.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Go.class
Normal file
BIN
bin/uebung10/logo/Go.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelFrame$1.class
Normal file
BIN
bin/uebung10/logo/HanselGretelFrame$1.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelFrame.class
Normal file
BIN
bin/uebung10/logo/HanselGretelFrame.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelTest.class
Normal file
BIN
bin/uebung10/logo/HanselGretelTest.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelVisitor$1.class
Normal file
BIN
bin/uebung10/logo/HanselGretelVisitor$1.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelVisitor$2.class
Normal file
BIN
bin/uebung10/logo/HanselGretelVisitor$2.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelVisitor$3.class
Normal file
BIN
bin/uebung10/logo/HanselGretelVisitor$3.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelVisitor$State.class
Normal file
BIN
bin/uebung10/logo/HanselGretelVisitor$State.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/HanselGretelVisitor.class
Normal file
BIN
bin/uebung10/logo/HanselGretelVisitor.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/PenDown.class
Normal file
BIN
bin/uebung10/logo/PenDown.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/PenUp.class
Normal file
BIN
bin/uebung10/logo/PenUp.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Sequence.class
Normal file
BIN
bin/uebung10/logo/Sequence.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Stmt.class
Normal file
BIN
bin/uebung10/logo/Stmt.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Turn.class
Normal file
BIN
bin/uebung10/logo/Turn.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Turtle.class
Normal file
BIN
bin/uebung10/logo/Turtle.class
Normal file
Binary file not shown.
BIN
bin/uebung10/logo/Visitor.class
Normal file
BIN
bin/uebung10/logo/Visitor.class
Normal file
Binary file not shown.
BIN
lib/junit-platform-console-standalone-1.11.0-M2.jar
Normal file
BIN
lib/junit-platform-console-standalone-1.11.0-M2.jar
Normal file
Binary file not shown.
@@ -1,13 +1,18 @@
|
||||
package logistics;
|
||||
package test.uebung.uebung05.logistics;
|
||||
|
||||
import uebung05.logistics.Helicopter;
|
||||
import uebung05.logistics.Manager;
|
||||
import uebung05.logistics.Tank;
|
||||
import uebung05.logistics.material.BulletBelts;
|
||||
import uebung05.logistics.material.Grease;
|
||||
import uebung05.logistics.material.LiterDiesel;
|
||||
import uebung05.logistics.material.MetGallonsKerosene;
|
||||
import uebung05.logistics.material.Oil;
|
||||
import uebung05.logistics.material.RocketPods;
|
||||
import uebung05.logistics.material.ShellBatches;
|
||||
import uebung05.logistics.quantities.NeedCollector;
|
||||
|
||||
|
||||
import logistics.material.BulletBelts;
|
||||
import logistics.material.Grease;
|
||||
import logistics.material.LiterDiesel;
|
||||
import logistics.material.MetGallonsKerosene;
|
||||
import logistics.material.Oil;
|
||||
import logistics.material.RocketPods;
|
||||
import logistics.material.ShellBatches;
|
||||
import logistics.quantities.NeedCollector;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package logistics.storage;
|
||||
package test.uebung.uebung05.logistics.storage;
|
||||
|
||||
import uebung05.logistics.material.Oil;
|
||||
import uebung05.logistics.storage.IntStorage;
|
||||
|
||||
import logistics.material.Oil;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
76
src/test/uebung/uebung09/collection/SetTest.java
Normal file
76
src/test/uebung/uebung09/collection/SetTest.java
Normal file
@@ -0,0 +1,76 @@
|
||||
package test.uebung.uebung09.collection;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import uebung09.collection.Set;
|
||||
import uebung09.collection.SetFactory;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class SetTest {
|
||||
|
||||
static String a = "test";
|
||||
static String b = "test2";
|
||||
static String c = "test3";
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void EmptySetTest(){
|
||||
|
||||
Set<String> test = SetFactory.create();
|
||||
|
||||
Iterator<String> i = test.iterator();
|
||||
|
||||
assertFalse(i.hasNext());
|
||||
assertThrows(NoSuchElementException.class, i::next);
|
||||
assertFalse(test.contains(a));
|
||||
assertEquals(0,test.size());
|
||||
assertTrue(test.isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void SingeltonSetTest(){
|
||||
|
||||
Set<String> test = SetFactory.create(a);
|
||||
|
||||
Iterator<String> i = test.iterator();
|
||||
|
||||
assertTrue(i.hasNext());
|
||||
assertTrue(a == i.next());
|
||||
assertFalse(i.hasNext());
|
||||
assertThrows(NoSuchElementException.class, i::next);
|
||||
assertTrue(test.contains(a));
|
||||
assertEquals(1,test.size());
|
||||
assertFalse(test.isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void BigSetTest() {
|
||||
|
||||
Set<String> test = SetFactory.create(a,b,c);
|
||||
|
||||
Iterator<String> i = test.iterator();
|
||||
|
||||
assertTrue(i.hasNext());
|
||||
assertTrue(a == i.next());
|
||||
assertTrue(i.hasNext());
|
||||
assertTrue(a == i.next());
|
||||
assertTrue(i.hasNext());
|
||||
assertTrue(a == i.next());
|
||||
assertFalse(i.hasNext());
|
||||
assertThrows(NoSuchElementException.class, i::next);
|
||||
assertTrue(test.contains(a));
|
||||
assertEquals(1,test.size());
|
||||
assertFalse(test.isEmpty());
|
||||
}
|
||||
}
|
44
src/test/uebung/uebung09/iterator/Array2dIteratorTest.java
Normal file
44
src/test/uebung/uebung09/iterator/Array2dIteratorTest.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package test.uebung.uebung09.iterator;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import uebung09.iterator.Array2dIterator;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class Array2dIteratorTest {
|
||||
@Test
|
||||
public void testArray2dIterator() {
|
||||
final String[][] array = {{}, {"foo", "bar"}, {"baz"}, {}};
|
||||
final Iterator<String> it = new Array2dIterator<>(array);
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("foo", it.next());
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("bar", it.next());
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("baz", it.next());
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArray2dIteratorOnlyEmpty() {
|
||||
final String[][] array = {{}, {}, {}};
|
||||
final Iterator<String> it = new Array2dIterator<>(array);
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArray2dIteratorEmpty() {
|
||||
final String[][] array = {};
|
||||
final Iterator<String> it = new Array2dIterator<>(array);
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
}
|
124
src/test/uebung/uebung09/iterator/SkipNullIteratorTest.java
Normal file
124
src/test/uebung/uebung09/iterator/SkipNullIteratorTest.java
Normal file
@@ -0,0 +1,124 @@
|
||||
package test.uebung.uebung09.iterator;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import uebung09.iterator.*;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class SkipNullIteratorTest {
|
||||
@Test
|
||||
public void testEmpty() {
|
||||
final Iterator<Object> it = new SkipNullIterator<>(emptyList().iterator());
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNull() {
|
||||
final Iterator<Object> it = new SkipNullIterator<>(asList(null, null).iterator());
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNonNull() {
|
||||
final Iterator<String> it = new SkipNullIterator<>(asList("foo").iterator());
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("foo", it.next());
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMixed() {
|
||||
final Iterator<String> it = new SkipNullIterator<>(asList(null, "foo", null).iterator());
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("foo", it.next());
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMixed2() {
|
||||
final Iterator<String> oriIt = asList("a", "b", null, "c").iterator();
|
||||
Iterator<String> it = new SkipNullIterator<>(oriIt);
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("a", it.next());
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("b", it.next());
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("c", it.next());
|
||||
assertFalse(it.hasNext());
|
||||
assertThrows(NoSuchElementException.class, it::next);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDontCallInCtor() {
|
||||
final Iterator<String> dontCallNext = new Iterator<>() {
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String next() {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
};
|
||||
|
||||
new SkipNullIterator<>(dontCallNext);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSkipNullIteratorInfinity() {
|
||||
final Iterator<String> oriIt = new Iterator<>() {
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String next() {
|
||||
return "infinity";
|
||||
}
|
||||
};
|
||||
|
||||
final Iterator<String> it = new SkipNullIterator<>(oriIt);
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("infinity", it.next());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPathological() {
|
||||
final Iterator<String> oriIt = new Iterator<>() {
|
||||
private int ctr;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String next() {
|
||||
return ctr++ > 100000 ? "infinity" : null;
|
||||
}
|
||||
};
|
||||
|
||||
final Iterator<String> it = new SkipNullIterator<>(oriIt);
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
assertTrue(it.hasNext());
|
||||
assertEquals("infinity", it.next());
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,20 +1,26 @@
|
||||
package uebung04;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ByeGame extends Game{
|
||||
|
||||
private String player1;
|
||||
private String player2;
|
||||
|
||||
|
||||
public ByeGame(String player1, Game player2){
|
||||
public ByeGame(String player1, String player2){
|
||||
this.player1 = player1;
|
||||
this.player2 = player2;
|
||||
|
||||
}
|
||||
|
||||
public String getPlayer1(){return player1;}
|
||||
public String getPlayer2(){return player2;}
|
||||
|
||||
public ??? getPlayer2(){
|
||||
return player2.getAllPlayers();
|
||||
@Override
|
||||
public ArrayList<String> getAllPlayers() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getAllPlayers'");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -7,7 +7,7 @@ public class OrdinaryGame extends Game{
|
||||
private final int id;
|
||||
|
||||
|
||||
public OrdinaryGame(Game player1, Game player2){
|
||||
public OrdinaryGame(String player1, String player2){
|
||||
this.player1 = player1;
|
||||
this.player2 = player2;
|
||||
|
||||
@@ -15,18 +15,16 @@ public class OrdinaryGame extends Game{
|
||||
counter++;
|
||||
}
|
||||
|
||||
public ArrayList<String> getPlayer1(){
|
||||
return player1.getAllPlayers();
|
||||
public String getPlayer1(){
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayList<String> getPlayer2(){
|
||||
return player2.getAllPlayers();
|
||||
public String getPlayer2(){
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayList<String> getAllPlayers(){
|
||||
ArrayList<String> rtn = player1.getAllPlayers();
|
||||
rtn.addAll(player2.getAllPlayers());
|
||||
return rtn;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.material.BulletBelts;
|
||||
import logistics.material.LiterDiesel;
|
||||
import logistics.material.RocketPods;
|
||||
import uebung05.logistics.material.BulletBelts;
|
||||
import uebung05.logistics.material.LiterDiesel;
|
||||
import uebung05.logistics.material.RocketPods;
|
||||
|
||||
class demo {
|
||||
class Demo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Manager ceo = new Manager();
|
||||
|
@@ -1,13 +1,13 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.material.BulletBelts;
|
||||
import logistics.material.MetGallonsKerosene;
|
||||
import logistics.material.RocketPods;
|
||||
import logistics.quantities.FloatUnit;
|
||||
import logistics.quantities.IntUnit;
|
||||
import logistics.quantities.NeedCollector;
|
||||
import logistics.storage.FloatStorage;
|
||||
import logistics.storage.IntStorage;
|
||||
import uebung05.logistics.material.BulletBelts;
|
||||
import uebung05.logistics.material.MetGallonsKerosene;
|
||||
import uebung05.logistics.material.RocketPods;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.NeedCollector;
|
||||
import uebung05.logistics.storage.FloatStorage;
|
||||
import uebung05.logistics.storage.IntStorage;
|
||||
|
||||
/**
|
||||
* The Helicopter class represents a helicopter in the logistics system.
|
||||
|
@@ -1,9 +1,9 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.quantities.FloatUnit;
|
||||
import logistics.quantities.IntUnit;
|
||||
import logistics.quantities.NeedCollector;
|
||||
import logistics.quantities.Unit;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.NeedCollector;
|
||||
import uebung05.logistics.quantities.Unit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -63,7 +63,7 @@ public class Manager {
|
||||
*
|
||||
* @return The NeedCollector object containing the needs of all the vehicles
|
||||
*/
|
||||
NeedCollector collectNeeds() {
|
||||
public NeedCollector collectNeeds() {
|
||||
NeedCollector collector = new NeedCollector();
|
||||
for (Vehicle vehicle : vehicles) {
|
||||
vehicle.reportNeeds(collector);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.quantities.FloatUnit;
|
||||
import logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@@ -1,13 +1,13 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.material.BulletBelts;
|
||||
import logistics.material.LiterDiesel;
|
||||
import logistics.material.ShellBatches;
|
||||
import logistics.quantities.FloatUnit;
|
||||
import logistics.quantities.IntUnit;
|
||||
import logistics.quantities.NeedCollector;
|
||||
import logistics.storage.FloatStorage;
|
||||
import logistics.storage.IntStorage;
|
||||
import uebung05.logistics.material.BulletBelts;
|
||||
import uebung05.logistics.material.LiterDiesel;
|
||||
import uebung05.logistics.material.ShellBatches;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.NeedCollector;
|
||||
import uebung05.logistics.storage.FloatStorage;
|
||||
import uebung05.logistics.storage.IntStorage;
|
||||
|
||||
/**
|
||||
* The Tank class represents a tank in the logistics system.
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.material.BulletBelts;
|
||||
import logistics.material.LiterDiesel;
|
||||
import logistics.quantities.FloatUnit;
|
||||
import logistics.quantities.IntUnit;
|
||||
import logistics.quantities.NeedCollector;
|
||||
import logistics.storage.FloatStorage;
|
||||
import logistics.storage.IntStorage;
|
||||
import uebung05.logistics.material.BulletBelts;
|
||||
import uebung05.logistics.material.LiterDiesel;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.NeedCollector;
|
||||
import uebung05.logistics.storage.FloatStorage;
|
||||
import uebung05.logistics.storage.IntStorage;
|
||||
|
||||
/**
|
||||
* The Truck class represents a truck in the logistics system.
|
||||
|
@@ -1,11 +1,11 @@
|
||||
package logistics;
|
||||
package uebung05.logistics;
|
||||
|
||||
import logistics.material.Grease;
|
||||
import logistics.material.Oil;
|
||||
import logistics.quantities.FloatUnit;
|
||||
import logistics.quantities.IntUnit;
|
||||
import logistics.quantities.NeedCollector;
|
||||
import logistics.storage.IntStorage;
|
||||
import uebung05.logistics.material.Grease;
|
||||
import uebung05.logistics.material.Oil;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.NeedCollector;
|
||||
import uebung05.logistics.storage.IntStorage;
|
||||
|
||||
/**
|
||||
* The Vehicle abstract class represents a vehicle in the logistics system.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
|
||||
/**
|
||||
* The BulletBelts class represents a unit of measurement for 7.62 bullets.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.IntUnit;
|
||||
*/
|
||||
public class BulletBelts implements IntUnit {
|
||||
|
||||
private static BulletBelts INSTANCE;
|
||||
public static BulletBelts INSTANCE;
|
||||
|
||||
private BulletBelts() {}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
|
||||
/**
|
||||
* The Grease class represents a unit of measurement for grease.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.IntUnit;
|
||||
*/
|
||||
public class Grease implements IntUnit {
|
||||
|
||||
private static Grease INSTANCE;
|
||||
public static Grease INSTANCE;
|
||||
|
||||
private Grease() {}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
|
||||
/**
|
||||
* The LiterDiesel class represents a unit of measurement for diesel fuel.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.FloatUnit;
|
||||
*/
|
||||
public class LiterDiesel implements FloatUnit {
|
||||
|
||||
private static LiterDiesel INSTANCE;
|
||||
public static LiterDiesel INSTANCE;
|
||||
|
||||
private LiterDiesel() {}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.FloatUnit;
|
||||
import uebung05.logistics.quantities.FloatUnit;
|
||||
|
||||
/**
|
||||
* The MetGallonsKerosene class represents a unit of measurement for kerosene.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.FloatUnit;
|
||||
*/
|
||||
public class MetGallonsKerosene implements FloatUnit {
|
||||
|
||||
private static MetGallonsKerosene INSTANCE;
|
||||
public static MetGallonsKerosene INSTANCE;
|
||||
|
||||
private MetGallonsKerosene() {}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
|
||||
/**
|
||||
* The Oil class represents a unit of measurement for oil.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.IntUnit;
|
||||
*/
|
||||
public class Oil implements IntUnit {
|
||||
|
||||
private static Oil INSTANCE;
|
||||
public static Oil INSTANCE;
|
||||
|
||||
private Oil() {}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
|
||||
/**
|
||||
* The RocketPods class represents a unit of measurement for 70mm rocket pods.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.IntUnit;
|
||||
*/
|
||||
public class RocketPods implements IntUnit {
|
||||
|
||||
private static RocketPods INSTANCE;
|
||||
public static RocketPods INSTANCE;
|
||||
|
||||
private RocketPods() {}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package logistics.material;
|
||||
package uebung05.logistics.material;
|
||||
|
||||
import logistics.quantities.IntUnit;
|
||||
import uebung05.logistics.quantities.IntUnit;
|
||||
|
||||
/**
|
||||
* The ShellBatches class represents a unit of measurement for 120mm shell batches.
|
||||
@@ -11,7 +11,7 @@ import logistics.quantities.IntUnit;
|
||||
*/
|
||||
public class ShellBatches implements IntUnit {
|
||||
|
||||
private static ShellBatches INSTANCE;
|
||||
public static ShellBatches INSTANCE;
|
||||
|
||||
private ShellBatches() {}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user