summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2014-11-20 18:39:54 +0100
committerStefan Suhren <suhren.stefan@fh-swf.de>2014-11-20 18:39:54 +0100
commit0229c16365e5d849857b30ef6bd6634f89913a4b (patch)
treebb5ed390167373a7aa34d4b45eccbc7de146cac1 /src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
parent242dc8ea6486a9d0b664f0a0dfe39596846a0456 (diff)
downloadJava1-0229c16365e5d849857b30ef6bd6634f89913a4b.tar.gz
Java1-0229c16365e5d849857b30ef6bd6634f89913a4b.zip
Assignment No.8 implemented non recursive FaB
Diffstat (limited to 'src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java')
-rw-r--r--src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java b/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
new file mode 100644
index 0000000..6524a29
--- /dev/null
+++ b/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
@@ -0,0 +1,51 @@
+/**
+ *
+ */
+package de.fhswf.in.inf.java1.aufgabe8;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Main class for the LottoZiehung.
+ *
+ * @author $Author: $
+ * @version $Revision: $, $Date: $ UTC
+ */
+public final class LottoZiehungMain
+{
+
+ /**
+ * Private constructor for utility class.
+ *
+ */
+ private LottoZiehungMain()
+ {
+ }
+
+ /**
+ * Main function of the package.
+ *
+ * @param args
+ * Command line arguments.
+ */
+ public static void main(String[] args)
+ {
+ List<Integer> lottoZahlen = new ArrayList<>(49);
+
+ for (int i = 1; i <= 49; i++)
+ {
+ lottoZahlen.add(i);
+ }
+
+ List<Integer> ziehung = FloydAndBentley.sample(lottoZahlen, 7);
+
+ Integer Sonderzahl = ziehung.get(6);
+
+ ziehung.remove(6);
+
+ ziehung.sort(null);
+
+ System.out.println(ziehung + " SonderZahl: " + Sonderzahl);
+ }
+}