From ad18ac1d828baa6afce3d6cc5d541c5bc3129fc5 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 8 Feb 2022 17:19:33 +0100 Subject: [PATCH 001/114] Testing Jenkins --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/AppTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/AppTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/AppTest.java index a5ea653..8d0a135 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/AppTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/AppTest.java @@ -35,4 +35,8 @@ public class AppTest { assertTrue( true ); } + + public void testJenkins() { + assertTrue( true ); + } } From 62217138e6710ccf7a5e2962b16a2a737db4a33d Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Fri, 11 Feb 2022 01:04:52 +0100 Subject: [PATCH 002/114] Added Database Connection + Test --- projjpn/GamesDB.accdb | Bin 0 -> 1015808 bytes projjpn/GamesDB.laccdb | 0 .../java/de/hs_fulda/ciip/projjpn/Games.java | 21 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 11 +++++++++ 4 files changed, 32 insertions(+) create mode 100644 projjpn/GamesDB.accdb create mode 100644 projjpn/GamesDB.laccdb create mode 100644 projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java create mode 100644 projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java diff --git a/projjpn/GamesDB.accdb b/projjpn/GamesDB.accdb new file mode 100644 index 0000000000000000000000000000000000000000..ee44ae17237edaa7eb3c2fad90e8305c9441c4c0 GIT binary patch literal 1015808 zcmeF42VfM%8pmfZm!4cg5s`Xy1cFHjp<_BEq(Kt8K$5$JBb5{&peBMSSWxW3L&b)Q z4Fw*cA}WXiioGNDLb0Jz)a3oY+1tCze!nRdyIvD!w-d!tlKm6*Y zyA%Gn=GoNESqBD~_xD~I8X@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ixM^m4Q?WB~Fc+WB~VlCT3Og)TGesO2PEy+isHCv)p6xXTYQis4@ia(-5 zkdN*7ln^A#*hceVFqmgFmq+CCYwoTsIH)zBj&15F?sR2(6NY)H0x)5q{XZ2zZYaau zrE Date: Fri, 11 Feb 2022 03:12:47 +0100 Subject: [PATCH 003/114] Added Console Listing + Test --- projjpn/GamesDB.laccdb | Bin 0 -> 64 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 53 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++ 3 files changed, 60 insertions(+) diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5a03e0388674df9c401c0cef4dc38d6267f63454 100644 GIT binary patch literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M literal 0 HcmV?d00001 diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 09c31e9..fc1b27f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -2,7 +2,9 @@ package de.hs_fulda.ciip.projjpn; import java.sql.Connection; import java.sql.DriverManager; +import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; public class Games { private String databaseURL = "jdbc:ucanaccess://GamesDB.accdb"; @@ -18,4 +20,55 @@ public class Games { return false; } } + + public String checkForConsoles() { + String result = ""; + String query = "SELECT Game_Console FROM Games"; + boolean ninSwitch = false; + boolean xbox = false; + boolean multiplat = false; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameConsole = resultSet.getString("Game_Console"); + + if (ninSwitch && gameConsole.equals("Nintendo Switch")) { + continue; + } else if (xbox && gameConsole.equals("Xbox")) { + continue; + } else if (multiplat && gameConsole.equals("Multiplatform")) { + continue; + } + + switch (gameConsole) { + case "Nintendo Switch": + ninSwitch = true; + break; + case "Xbox": + xbox = true; + break; + case "Multiplatform": + multiplat = true; + break; + } + + + + result += gameConsole + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 3ffaca8..e57ae11 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -8,4 +8,11 @@ public class GamesTest extends TestCase { boolean actual = testObject.checkForConnection(); assertEquals(expected, actual); } + + public void test_checkForConsoles() { + Games testObject = new Games(); + String expected = "PlayStation 4, Multiplatform, Nintendo Switch, Nintendo DS, PlayStation 3, Xbox, PlayStation Portable, Nintendo 3DS, Xbox 360, PlayStation Vita"; + String actual = testObject.checkForConsoles(); + assertEquals(expected, actual); + } } From 443c200c098032ed33e5ef81a649491d7310dfb8 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 01:48:19 +0100 Subject: [PATCH 004/114] Added two Publisher checkers + Tests --- projjpn/GamesDB.accdb | Bin 1015808 -> 1015808 bytes projjpn/GamesDB.laccdb | Bin 64 -> 0 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 70 +++++++++++++++++- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 22 +++++- 4 files changed, 86 insertions(+), 6 deletions(-) diff --git a/projjpn/GamesDB.accdb b/projjpn/GamesDB.accdb index ee44ae17237edaa7eb3c2fad90e8305c9441c4c0..f0c11c07f60b3ee4e594324152aca738ce380672 100644 GIT binary patch delta 134 zcmZo@uxn_r+rY%f^n!V_0N)43$qIZtO#<5l7*FuAX1zLEpECWd9HS(oUHfx6Mj&Pa zVrC#_+5TLPReB+hC$~?SqYncR*fUHQIKY}UUEu($(DteWtP1SytB$h*F&hwr*c?F2 V3B+7L%nigmK+L;+)p5SC9ROODGZz2= delta 132 zcmZo@uxn_r+rY%fbc1=b0N)43$qIZtO#<5l7*FuA&Z{ipO`LvKj!}})to^whBM>tI zF*6XeY=17tD!q^=lG`WD(T4#D%o(N&9AM4a-gSUgfqmizf%a9$S%H`hh}nUd1Bf|+ Um94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index fc1b27f..92078aa 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -9,7 +9,7 @@ import java.sql.Statement; public class Games { private String databaseURL = "jdbc:ucanaccess://GamesDB.accdb"; - public boolean checkForConnection() { + public boolean checkConnection() { try { Connection connection = DriverManager.getConnection(databaseURL); @@ -21,7 +21,7 @@ public class Games { } } - public String checkForConsoles() { + public String checkConsoles() { String result = ""; String query = "SELECT Game_Console FROM Games"; boolean ninSwitch = false; @@ -71,4 +71,70 @@ public class Games { // The substring removes the last New line in the String. return result.substring(0, result.length() - 2); } + + public String checkAllSamePublishers() { + String result = ""; + String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + + + if (gamePublisherEu.equals(gamePublisherJp) && gamePublisherJp.equals(gamePublisherNa) && gamePublisherEu.equals(gamePublisherNa)) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); + } + + public String checkAllDifferentPublishers() { + String result = ""; + String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + + + if (!gamePublisherEu.equals(gamePublisherJp) && !gamePublisherJp.equals(gamePublisherNa) && !gamePublisherEu.equals(gamePublisherNa)) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index e57ae11..c6755a8 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -2,17 +2,31 @@ package de.hs_fulda.ciip.projjpn; import junit.framework.TestCase; public class GamesTest extends TestCase { - public void test_checkForConnection() { + public void test_checkConnection() { Games testObject = new Games(); boolean expected = true; - boolean actual = testObject.checkForConnection(); + boolean actual = testObject.checkConnection(); assertEquals(expected, actual); } - public void test_checkForConsoles() { + public void test_checkConsoles() { Games testObject = new Games(); String expected = "PlayStation 4, Multiplatform, Nintendo Switch, Nintendo DS, PlayStation 3, Xbox, PlayStation Portable, Nintendo 3DS, Xbox 360, PlayStation Vita"; - String actual = testObject.checkForConsoles(); + String actual = testObject.checkConsoles(); + assertEquals(expected, actual); + } + + public void test_checkAllSamePublishers() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Tomodachi Life, Beautiful Katamari, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkAllSamePublishers(); + assertEquals(expected, actual); + } + + public void test_checkAllDifferentPublishers() { + Games testObject = new Games(); + String expected = "Atelier Totori Plus"; + String actual = testObject.checkAllDifferentPublishers(); assertEquals(expected, actual); } } From 9c913e14083e41b72a918b7b97a13d9646e60843 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 02:00:23 +0100 Subject: [PATCH 005/114] Added Publisher + Dev checker + Test --- projjpn/GamesDB.laccdb | Bin 0 -> 64 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 34 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 ++++ 3 files changed, 41 insertions(+) diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5a03e0388674df9c401c0cef4dc38d6267f63454 100644 GIT binary patch literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M literal 0 HcmV?d00001 diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 92078aa..584cc88 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -137,4 +137,38 @@ public class Games { // The substring removes the last New line in the String. return result.substring(0, result.length() - 2); } + + public String checkAllDifferentPublishersDeveloper() { + String result = ""; + String query = "SELECT Game_Name, Game_Developer, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameDeveloper = resultSet.getString("Game_Developer"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + + + if (gamePublisherEu.equals(gamePublisherJp) && gamePublisherJp.equals(gamePublisherNa) && gamePublisherEu.equals(gamePublisherNa) && gameDeveloper.equals(gamePublisherEu) && gameDeveloper.equals(gamePublisherJp) && gameDeveloper.equals(gamePublisherNa) ) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index c6755a8..8f9589c 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -29,4 +29,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentPublishers(); assertEquals(expected, actual); } + + public void test_checkAllSamePublishersDeveloper() { + Games testObject = new Games(); + String expected = "Beautiful Katamari"; + String actual = testObject.checkAllDifferentPublishersDeveloper(); + assertEquals(expected, actual); + } } From 49a3d044fa23a3a4f40b4c523d1b1dce82297da9 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 02:31:33 +0100 Subject: [PATCH 006/114] Added Release Date Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 80 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 ++++ 2 files changed, 94 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 584cc88..0b0de1f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -171,4 +171,84 @@ public class Games { // The substring removes the last New line in the String. return result.substring(0, result.length() - 2); } + + public String checkAllSameReleaseDates() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + + if (gameReleaseAu == null) { + if (gameReleaseEu.equals(gameReleaseJp) && gameReleaseJp.equals(gameReleaseNa) && gameReleaseEu.equals(gameReleaseNa)) { + result += gameName + ", "; + } + } else { + if (gameReleaseEu.equals(gameReleaseJp) && gameReleaseJp.equals(gameReleaseNa) && gameReleaseEu.equals(gameReleaseNa) && gameReleaseAu.equals(gameReleaseEu) && gameReleaseAu.equals(gameReleaseJp) && gameReleaseAu.equals(gameReleaseNa) ) { + result += gameName + ", "; + } + } + + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); + } + + public String checkAllDifferentReleaseDates() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + + if (gameReleaseAu == null) { + if (!gameReleaseEu.equals(gameReleaseJp) && !gameReleaseJp.equals(gameReleaseNa) && !gameReleaseEu.equals(gameReleaseNa)) { + result += gameName + ", "; + } + } else { + if (!gameReleaseEu.equals(gameReleaseJp) && !gameReleaseJp.equals(gameReleaseNa) && !gameReleaseEu.equals(gameReleaseNa) && !gameReleaseAu.equals(gameReleaseEu) && !gameReleaseAu.equals(gameReleaseJp) && !gameReleaseAu.equals(gameReleaseNa) ) { + result += gameName + ", "; + } + } + + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 8f9589c..895ef66 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -36,4 +36,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentPublishersDeveloper(); assertEquals(expected, actual); } + + public void test_checkAllSameReleaseDates() { + Games testObject = new Games(); + String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate"; + String actual = testObject.checkAllSameReleaseDates(); + assertEquals(expected, actual); + } + + public void test_checkAllDifferentReleaseDates() { + Games testObject = new Games(); + String expected = "Rhythm Paradise, Yakuza: Dead Souls, Breakdown, Persona 3 Portable, Beautiful Katamari, Atelier Totori Plus"; + String actual = testObject.checkAllDifferentReleaseDates(); + assertEquals(expected, actual); + } } From 576c24abcdecf3850b27d6fccad49c7ec308c492 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 02:34:14 +0100 Subject: [PATCH 007/114] Refactored Class and Test Class --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 212 +++++++++--------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 13 +- 2 files changed, 112 insertions(+), 113 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 0b0de1f..165d0e7 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -8,7 +8,7 @@ import java.sql.Statement; public class Games { private String databaseURL = "jdbc:ucanaccess://GamesDB.accdb"; - + public boolean checkConnection() { try { Connection connection = DriverManager.getConnection(databaseURL); @@ -20,7 +20,7 @@ public class Games { return false; } } - + public String checkConsoles() { String result = ""; String query = "SELECT Game_Console FROM Games"; @@ -35,32 +35,30 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - String gameConsole = resultSet.getString("Game_Console"); - - if (ninSwitch && gameConsole.equals("Nintendo Switch")) { - continue; - } else if (xbox && gameConsole.equals("Xbox")) { - continue; - } else if (multiplat && gameConsole.equals("Multiplatform")) { - continue; - } - - switch (gameConsole) { - case "Nintendo Switch": - ninSwitch = true; - break; - case "Xbox": - xbox = true; - break; - case "Multiplatform": - multiplat = true; - break; - } - - - - result += gameConsole + ", "; - + String gameConsole = resultSet.getString("Game_Console"); + + if (ninSwitch && gameConsole.equals("Nintendo Switch")) { + continue; + } else if (xbox && gameConsole.equals("Xbox")) { + continue; + } else if (multiplat && gameConsole.equals("Multiplatform")) { + continue; + } + + switch (gameConsole) { + case "Nintendo Switch": + ninSwitch = true; + break; + case "Xbox": + xbox = true; + break; + case "Multiplatform": + multiplat = true; + break; + } + + result += gameConsole + ", "; + } statement.close(); connection.close(); @@ -68,10 +66,10 @@ public class Games { } catch (SQLException e) { e.printStackTrace(); } - // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); } - + public String checkAllSamePublishers() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -83,17 +81,16 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - String gameName = resultSet.getString("Game_Name"); - String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); - String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); - String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); - - - - if (gamePublisherEu.equals(gamePublisherJp) && gamePublisherJp.equals(gamePublisherNa) && gamePublisherEu.equals(gamePublisherNa)) { - result += gameName + ", "; - } - + String gameName = resultSet.getString("Game_Name"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + if (gamePublisherEu.equals(gamePublisherJp) && gamePublisherJp.equals(gamePublisherNa) + && gamePublisherEu.equals(gamePublisherNa)) { + result += gameName + ", "; + } + } statement.close(); connection.close(); @@ -101,10 +98,10 @@ public class Games { } catch (SQLException e) { e.printStackTrace(); } - // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); } - + public String checkAllDifferentPublishers() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -116,17 +113,16 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - String gameName = resultSet.getString("Game_Name"); - String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); - String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); - String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); - - - - if (!gamePublisherEu.equals(gamePublisherJp) && !gamePublisherJp.equals(gamePublisherNa) && !gamePublisherEu.equals(gamePublisherNa)) { - result += gameName + ", "; - } - + String gameName = resultSet.getString("Game_Name"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + if (!gamePublisherEu.equals(gamePublisherJp) && !gamePublisherJp.equals(gamePublisherNa) + && !gamePublisherEu.equals(gamePublisherNa)) { + result += gameName + ", "; + } + } statement.close(); connection.close(); @@ -134,10 +130,10 @@ public class Games { } catch (SQLException e) { e.printStackTrace(); } - // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); } - + public String checkAllDifferentPublishersDeveloper() { String result = ""; String query = "SELECT Game_Name, Game_Developer, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -149,18 +145,18 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - String gameName = resultSet.getString("Game_Name"); - String gameDeveloper = resultSet.getString("Game_Developer"); - String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); - String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); - String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); - - - - if (gamePublisherEu.equals(gamePublisherJp) && gamePublisherJp.equals(gamePublisherNa) && gamePublisherEu.equals(gamePublisherNa) && gameDeveloper.equals(gamePublisherEu) && gameDeveloper.equals(gamePublisherJp) && gameDeveloper.equals(gamePublisherNa) ) { - result += gameName + ", "; - } - + String gameName = resultSet.getString("Game_Name"); + String gameDeveloper = resultSet.getString("Game_Developer"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + if (gamePublisherEu.equals(gamePublisherJp) && gamePublisherJp.equals(gamePublisherNa) + && gamePublisherEu.equals(gamePublisherNa) && gameDeveloper.equals(gamePublisherEu) + && gameDeveloper.equals(gamePublisherJp) && gameDeveloper.equals(gamePublisherNa)) { + result += gameName + ", "; + } + } statement.close(); connection.close(); @@ -168,10 +164,10 @@ public class Games { } catch (SQLException e) { e.printStackTrace(); } - // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); } - + public String checkAllSameReleaseDates() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -183,24 +179,25 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - String gameName = resultSet.getString("Game_Name"); - String gameReleaseEu = resultSet.getString("Game_Release_EU"); - String gameReleaseJp = resultSet.getString("Game_Release_JP"); - String gameReleaseNa = resultSet.getString("Game_Release_NA"); - String gameReleaseAu = resultSet.getString("Game_Release_AU"); - - - if (gameReleaseAu == null) { - if (gameReleaseEu.equals(gameReleaseJp) && gameReleaseJp.equals(gameReleaseNa) && gameReleaseEu.equals(gameReleaseNa)) { - result += gameName + ", "; - } - } else { - if (gameReleaseEu.equals(gameReleaseJp) && gameReleaseJp.equals(gameReleaseNa) && gameReleaseEu.equals(gameReleaseNa) && gameReleaseAu.equals(gameReleaseEu) && gameReleaseAu.equals(gameReleaseJp) && gameReleaseAu.equals(gameReleaseNa) ) { - result += gameName + ", "; - } + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + if (gameReleaseEu.equals(gameReleaseJp) && gameReleaseJp.equals(gameReleaseNa) + && gameReleaseEu.equals(gameReleaseNa)) { + result += gameName + ", "; + } + } else { + if (gameReleaseEu.equals(gameReleaseJp) && gameReleaseJp.equals(gameReleaseNa) + && gameReleaseEu.equals(gameReleaseNa) && gameReleaseAu.equals(gameReleaseEu) + && gameReleaseAu.equals(gameReleaseJp) && gameReleaseAu.equals(gameReleaseNa)) { + result += gameName + ", "; } - - + } + } statement.close(); connection.close(); @@ -208,10 +205,10 @@ public class Games { } catch (SQLException e) { e.printStackTrace(); } - // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); } - + public String checkAllDifferentReleaseDates() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -223,24 +220,25 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - String gameName = resultSet.getString("Game_Name"); - String gameReleaseEu = resultSet.getString("Game_Release_EU"); - String gameReleaseJp = resultSet.getString("Game_Release_JP"); - String gameReleaseNa = resultSet.getString("Game_Release_NA"); - String gameReleaseAu = resultSet.getString("Game_Release_AU"); - - - if (gameReleaseAu == null) { - if (!gameReleaseEu.equals(gameReleaseJp) && !gameReleaseJp.equals(gameReleaseNa) && !gameReleaseEu.equals(gameReleaseNa)) { - result += gameName + ", "; - } - } else { - if (!gameReleaseEu.equals(gameReleaseJp) && !gameReleaseJp.equals(gameReleaseNa) && !gameReleaseEu.equals(gameReleaseNa) && !gameReleaseAu.equals(gameReleaseEu) && !gameReleaseAu.equals(gameReleaseJp) && !gameReleaseAu.equals(gameReleaseNa) ) { - result += gameName + ", "; - } + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + if (!gameReleaseEu.equals(gameReleaseJp) && !gameReleaseJp.equals(gameReleaseNa) + && !gameReleaseEu.equals(gameReleaseNa)) { + result += gameName + ", "; } - - + } else { + if (!gameReleaseEu.equals(gameReleaseJp) && !gameReleaseJp.equals(gameReleaseNa) + && !gameReleaseEu.equals(gameReleaseNa) && !gameReleaseAu.equals(gameReleaseEu) + && !gameReleaseAu.equals(gameReleaseJp) && !gameReleaseAu.equals(gameReleaseNa)) { + result += gameName + ", "; + } + } + } statement.close(); connection.close(); @@ -248,7 +246,7 @@ public class Games { } catch (SQLException e) { e.printStackTrace(); } - // The substring removes the last New line in the String. + return result.substring(0, result.length() - 2); } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 895ef66..5acfde4 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -1,4 +1,5 @@ package de.hs_fulda.ciip.projjpn; + import junit.framework.TestCase; public class GamesTest extends TestCase { @@ -8,42 +9,42 @@ public class GamesTest extends TestCase { boolean actual = testObject.checkConnection(); assertEquals(expected, actual); } - + public void test_checkConsoles() { Games testObject = new Games(); String expected = "PlayStation 4, Multiplatform, Nintendo Switch, Nintendo DS, PlayStation 3, Xbox, PlayStation Portable, Nintendo 3DS, Xbox 360, PlayStation Vita"; String actual = testObject.checkConsoles(); assertEquals(expected, actual); } - + public void test_checkAllSamePublishers() { Games testObject = new Games(); String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Tomodachi Life, Beautiful Katamari, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkAllSamePublishers(); assertEquals(expected, actual); } - + public void test_checkAllDifferentPublishers() { Games testObject = new Games(); String expected = "Atelier Totori Plus"; String actual = testObject.checkAllDifferentPublishers(); assertEquals(expected, actual); } - + public void test_checkAllSamePublishersDeveloper() { Games testObject = new Games(); String expected = "Beautiful Katamari"; String actual = testObject.checkAllDifferentPublishersDeveloper(); assertEquals(expected, actual); } - + public void test_checkAllSameReleaseDates() { Games testObject = new Games(); String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate"; String actual = testObject.checkAllSameReleaseDates(); assertEquals(expected, actual); } - + public void test_checkAllDifferentReleaseDates() { Games testObject = new Games(); String expected = "Rhythm Paradise, Yakuza: Dead Souls, Breakdown, Persona 3 Portable, Beautiful Katamari, Atelier Totori Plus"; From ea4247f42ebeeef68b04ebeb6e6018e94d9cad51 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 02:51:36 +0100 Subject: [PATCH 008/114] Added Game Genre Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 43 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++ 2 files changed, 50 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 165d0e7..04bb05b 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -249,4 +249,47 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkGameGenres() { + String result = ""; + String query = "SELECT Game_Genre FROM Games"; + boolean actAd = false; + boolean rpg = false; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameGenre = resultSet.getString("Game_Genre"); + + if (actAd && gameGenre.equals("Action-Adventure")) { + continue; + } else if (rpg && gameGenre.equals("RPG")) { + continue; + } + + switch (gameGenre) { + case "Action-Adventure": + actAd = true; + break; + case "RPG": + rpg = true; + break; + } + + result += gameGenre + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 5acfde4..2f9fefc 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -51,4 +51,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentReleaseDates(); assertEquals(expected, actual); } + + public void test_checkGameGenres() { + Games testObject = new Games(); + String expected = "JRPG, Action-Adventure, Tactical role-playing, Strategy, Rhythm, Fighting, Survival Horror, Action, Adventure, RPG, Life Simulation, Puzzle, Platformer"; + String actual = testObject.checkGameGenres(); + assertEquals(expected, actual); + } } From fae09f3a25ae8b43402e953a64c96cf2e9e5ed9a Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 03:09:29 +0100 Subject: [PATCH 009/114] Added Specific Game Genre Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 04bb05b..e28f6e0 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -292,4 +292,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkGameGenreActionAdventure() { + String result = ""; + String query = "SELECT Game_Name, Game_Genre FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameGenre = resultSet.getString("Game_Genre"); + + if (gameGenre.equals("Action-Adventure")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkGameGenreRPG() { + String result = ""; + String query = "SELECT Game_Name, Game_Genre FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameGenre = resultSet.getString("Game_Genre"); + + if (gameGenre.equals("RPG")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 2f9fefc..2c9db85 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -58,4 +58,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkGameGenres(); assertEquals(expected, actual); } + + public void test_checkGameGenreActionAdventure() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Astral Chain, Breakdown"; + String actual = testObject.checkGameGenreActionAdventure(); + assertEquals(expected, actual); + } + + public void test_checkGameGenreRPG() { + Games testObject = new Games(); + String expected = "Persona 3 Portable, Atelier Totori Plus"; + String actual = testObject.checkGameGenreRPG(); + assertEquals(expected, actual); + } } From 260d0d0049802752ab59c1e030ea4a511b437367 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 03:35:34 +0100 Subject: [PATCH 010/114] Added Specific Console Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 64 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 ++++ 2 files changed, 78 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index e28f6e0..42e5262 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -350,4 +350,68 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkConsolePlayStation() { + String result = ""; + String query = "SELECT Game_Name, Game_Console FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + + if (gameConsole.length() > 11) { + if (gameConsole.substring(0, 11).equals("PlayStation")) { + result += gameName + ", "; + } + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkConsoleNintendo() { + String result = ""; + String query = "SELECT Game_Name, Game_Console FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + + if (gameConsole.length() > 8) { + if (gameConsole.substring(0, 8).equals("Nintendo")) { + result += gameName + ", "; + } + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 2c9db85..75c1cbf 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -72,4 +72,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkGameGenreRPG(); assertEquals(expected, actual); } + + public void test_checkConsolePlayStation() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Yakuza: Dead Souls, Persona 3 Portable, Atelier Totori Plus"; + String actual = testObject.checkConsolePlayStation(); + assertEquals(expected, actual); + } + + public void test_checkConsoleNintendo() { + Games testObject = new Games(); + String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Tomodachi Life"; + String actual = testObject.checkConsoleNintendo(); + assertEquals(expected, actual); + } } From 2ab773ee1631a51390f44b3ea149438f1715762a Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 03:42:21 +0100 Subject: [PATCH 011/114] Added More Specific Console Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 64 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 ++++ 2 files changed, 78 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 42e5262..f676754 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -414,4 +414,68 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkConsoleXbox() { + String result = ""; + String query = "SELECT Game_Name, Game_Console FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + + if (gameConsole.length() >= 4) { + if (gameConsole.substring(0, 4).equals("Xbox")) { + result += gameName + ", "; + } + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkConsoleMultiplatform() { + String result = ""; + String query = "SELECT Game_Name, Game_Console FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + + if (gameConsole.length() >= 13) { + if (gameConsole.substring(0, 13).equals("Multiplatform")) { + result += gameName + ", "; + } + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 75c1cbf..987b63e 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -86,4 +86,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkConsoleNintendo(); assertEquals(expected, actual); } + + public void test_checkConsoleXbox() { + Games testObject = new Games(); + String expected = "Jet Set Radio Future, Breakdown, Beautiful Katamari"; + String actual = testObject.checkConsoleXbox(); + assertEquals(expected, actual); + } + + public void test_checkConsoleMultiplatform() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, AI: The Somnium Files, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkConsoleMultiplatform(); + assertEquals(expected, actual); + } } From 6ca90011547e5aa764b7d7ab81a6a706cd8262b6 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 03:45:01 +0100 Subject: [PATCH 012/114] Refactored Class and Test Class --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 34 +++++++++---------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index f676754..6b389ec 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -249,7 +249,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkGameGenres() { String result = ""; String query = "SELECT Game_Genre FROM Games"; @@ -292,7 +292,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkGameGenreActionAdventure() { String result = ""; String query = "SELECT Game_Name, Game_Genre FROM Games"; @@ -321,7 +321,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkGameGenreRPG() { String result = ""; String query = "SELECT Game_Name, Game_Genre FROM Games"; @@ -350,7 +350,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkConsolePlayStation() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -364,14 +364,14 @@ public class Games { while (resultSet.next()) { String gameName = resultSet.getString("Game_Name"); String gameConsole = resultSet.getString("Game_Console"); - - if (gameConsole.length() > 11) { + + if (gameConsole.length() >= 11) { if (gameConsole.substring(0, 11).equals("PlayStation")) { result += gameName + ", "; } } - + } statement.close(); connection.close(); @@ -382,7 +382,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkConsoleNintendo() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -396,14 +396,14 @@ public class Games { while (resultSet.next()) { String gameName = resultSet.getString("Game_Name"); String gameConsole = resultSet.getString("Game_Console"); - - if (gameConsole.length() > 8) { + + if (gameConsole.length() >= 8) { if (gameConsole.substring(0, 8).equals("Nintendo")) { result += gameName + ", "; } } - + } statement.close(); connection.close(); @@ -414,7 +414,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkConsoleXbox() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -428,14 +428,14 @@ public class Games { while (resultSet.next()) { String gameName = resultSet.getString("Game_Name"); String gameConsole = resultSet.getString("Game_Console"); - + if (gameConsole.length() >= 4) { if (gameConsole.substring(0, 4).equals("Xbox")) { result += gameName + ", "; } } - + } statement.close(); connection.close(); @@ -446,7 +446,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkConsoleMultiplatform() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -460,14 +460,14 @@ public class Games { while (resultSet.next()) { String gameName = resultSet.getString("Game_Name"); String gameConsole = resultSet.getString("Game_Console"); - + if (gameConsole.length() >= 13) { if (gameConsole.substring(0, 13).equals("Multiplatform")) { result += gameName + ", "; } } - + } statement.close(); connection.close(); diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 987b63e..9168661 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -51,49 +51,49 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentReleaseDates(); assertEquals(expected, actual); } - + public void test_checkGameGenres() { Games testObject = new Games(); String expected = "JRPG, Action-Adventure, Tactical role-playing, Strategy, Rhythm, Fighting, Survival Horror, Action, Adventure, RPG, Life Simulation, Puzzle, Platformer"; String actual = testObject.checkGameGenres(); assertEquals(expected, actual); } - + public void test_checkGameGenreActionAdventure() { Games testObject = new Games(); String expected = "Ratchet & Clank, Astral Chain, Breakdown"; String actual = testObject.checkGameGenreActionAdventure(); assertEquals(expected, actual); } - + public void test_checkGameGenreRPG() { Games testObject = new Games(); String expected = "Persona 3 Portable, Atelier Totori Plus"; String actual = testObject.checkGameGenreRPG(); assertEquals(expected, actual); } - + public void test_checkConsolePlayStation() { Games testObject = new Games(); String expected = "Persona 5 Royal, Yakuza: Dead Souls, Persona 3 Portable, Atelier Totori Plus"; String actual = testObject.checkConsolePlayStation(); assertEquals(expected, actual); } - + public void test_checkConsoleNintendo() { Games testObject = new Games(); String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Tomodachi Life"; String actual = testObject.checkConsoleNintendo(); assertEquals(expected, actual); } - + public void test_checkConsoleXbox() { Games testObject = new Games(); String expected = "Jet Set Radio Future, Breakdown, Beautiful Katamari"; String actual = testObject.checkConsoleXbox(); assertEquals(expected, actual); } - + public void test_checkConsoleMultiplatform() { Games testObject = new Games(); String expected = "Ratchet & Clank, AI: The Somnium Files, Crash Bandicoot N. Sane Trilogy"; From 9236d77c54d3827c082249a481d6fc8f79d81472 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 19:13:41 +0100 Subject: [PATCH 013/114] Added Nintendo Switch Console Checker + Test --- projjpn/GamesDB.accdb | Bin 1015808 -> 1015808 bytes projjpn/GamesDB.laccdb | Bin 64 -> 0 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 30 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 ++++ 4 files changed, 37 insertions(+) diff --git a/projjpn/GamesDB.accdb b/projjpn/GamesDB.accdb index f0c11c07f60b3ee4e594324152aca738ce380672..332543baa35d0f3bad171931a275406072b7362e 100644 GIT binary patch delta 133 zcmZo@uxn_r+rY%f#KE#zfbRq2WCcE+CV_1Nj3@Y59W|$NO`m>Nj!}})ul>0kBM>tI zF*6XeY=17tD!q_LliMfE(T4#D{28VT9AK@Qu5f@=X?fQHR`&K)$60}x4TwQ(4j|?P UVlE)&24Wr{=H0&PIA7Qf07tPf+yDRo delta 131 zcmZo@uxn_r+rY%f^n!V_0N)43$qIZtO#<5l7*FuAX1zLEpECWd9HS(oUHfx6Mj&Pa zVrC#_+5TLPReB+hC$~?SqYncR*fUHQIKW!7eANL~_K6!5+E*QC1!6WJW(Q&pAm#*O TE+FOxVjdvo-M;ELU)T-+0Sz+z diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index 5a03e0388674df9c401c0cef4dc38d6267f63454..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 GIT binary patch literal 0 HcmV?d00001 literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 6b389ec..dab366d 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -478,4 +478,34 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkConsoleNintendoSwitch() { + String result = ""; + String query = "SELECT Game_Name, Game_Console FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + + if (gameConsole.equals("Nintendo Switch")) { + result += gameName + ", "; + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 9168661..83d6fc7 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -100,4 +100,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkConsoleMultiplatform(); assertEquals(expected, actual); } + + public void test_checkConsoleNintendoSwitch() { + Games testObject = new Games(); + String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate"; + String actual = testObject.checkConsoleNintendoSwitch(); + assertEquals(expected, actual); + } } From a2fe16c70306be5adb616183f2334f8bf7c3fbdf Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 19:21:54 +0100 Subject: [PATCH 014/114] Added Atlus Developer Checker + Test --- projjpn/GamesDB.laccdb | Bin 0 -> 64 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 30 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 ++++ 3 files changed, 37 insertions(+) diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5a03e0388674df9c401c0cef4dc38d6267f63454 100644 GIT binary patch literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M literal 0 HcmV?d00001 diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index dab366d..aa5f764 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -508,4 +508,34 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkDeveloperAtlus() { + String result = ""; + String query = "SELECT Game_Name, Game_Developer FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameDeveloper = resultSet.getString("Game_Developer"); + + if (gameDeveloper.equals("Atlus")) { + result += gameName + ", "; + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 83d6fc7..66c06e2 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -107,4 +107,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkConsoleNintendoSwitch(); assertEquals(expected, actual); } + + public void test_checkDeveloperAtlus() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Persona 3 Portable"; + String actual = testObject.checkDeveloperAtlus(); + assertEquals(expected, actual); + } } From 46d24fcdae0ad24ba0c56e216f1b91b45cb81b09 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 19:41:06 +0100 Subject: [PATCH 015/114] Added Developers Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 43 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++ 2 files changed, 50 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index aa5f764..ec367ab 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -538,4 +538,47 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkDevelopers() { + String result = ""; + String query = "SELECT Game_Developer FROM Games"; + boolean atlus = false; + boolean nintendoSpd = false; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameDeveloper = resultSet.getString("Game_Developer"); + + if (atlus && gameDeveloper.equals("Atlus")) { + continue; + } else if (nintendoSpd && gameDeveloper.equals("Nintendo SPD")) { + continue; + } + + switch (gameDeveloper) { + case "Atlus": + atlus = true; + break; + case "Nintendo SPD": + nintendoSpd = true; + break; + } + + result += gameDeveloper + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 66c06e2..bb0b6b8 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -114,4 +114,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkDeveloperAtlus(); assertEquals(expected, actual); } + + public void test_checkDevelopers() { + Games testObject = new Games(); + String expected = "Atlus, Insomniac Games, Platinum Games, Intelligent Systems, Artdink, Nintendo SPD, Sora Ltd., Ryu Ga Gotoku Studio, Sega Sports R&D, Namco, Spike Chunsoft, Bandai Namco Games, Gust Co. Ltd., Vicarious Visions"; + String actual = testObject.checkDevelopers(); + assertEquals(expected, actual); + } } From d9d81f9d693d70acea9568504e7ce9f5684ab482 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 19:51:37 +0100 Subject: [PATCH 016/114] Added Specific Publisher Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 64 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 ++++ 2 files changed, 78 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index ec367ab..1757c0f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -581,4 +581,68 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPublisherNintendo() { + String result = ""; + String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + if (gamePublisherEu.equals("Nintendo") || gamePublisherJp.equals("Nintendo") || gamePublisherNa.equals("Nintendo")) { + result += gameName + ", "; + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkPublisherSega() { + String result = ""; + String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + if (gamePublisherEu.equals("Sega") || gamePublisherJp.equals("Sega") || gamePublisherNa.equals("Sega")) { + result += gameName + ", "; + + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index bb0b6b8..f2fe48a 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -121,4 +121,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkDevelopers(); assertEquals(expected, actual); } + + public void test_checkPublisherNintendo() { + Games testObject = new Games(); + String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Tomodachi Life"; + String actual = testObject.checkPublisherNintendo(); + assertEquals(expected, actual); + } + + public void test_checkPublisherSega() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Yakuza: Dead Souls, Jet Set Radio Future"; + String actual = testObject.checkPublisherSega(); + assertEquals(expected, actual); + } } From f382b61b07122fe3a54673957a3f9931fa291237 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 19:56:26 +0100 Subject: [PATCH 017/114] Refactored Class and Test File --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 28 ++++++++++--------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 10 +++---- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 1757c0f..86cce3d 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -478,7 +478,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkConsoleNintendoSwitch() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -493,8 +493,8 @@ public class Games { String gameName = resultSet.getString("Game_Name"); String gameConsole = resultSet.getString("Game_Console"); - if (gameConsole.equals("Nintendo Switch")) { - result += gameName + ", "; + if (gameConsole.equals("Nintendo Switch")) { + result += gameName + ", "; } @@ -508,7 +508,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkDeveloperAtlus() { String result = ""; String query = "SELECT Game_Name, Game_Developer FROM Games"; @@ -523,8 +523,8 @@ public class Games { String gameName = resultSet.getString("Game_Name"); String gameDeveloper = resultSet.getString("Game_Developer"); - if (gameDeveloper.equals("Atlus")) { - result += gameName + ", "; + if (gameDeveloper.equals("Atlus")) { + result += gameName + ", "; } @@ -538,7 +538,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkDevelopers() { String result = ""; String query = "SELECT Game_Developer FROM Games"; @@ -581,7 +581,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPublisherNintendo() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -598,8 +598,9 @@ public class Games { String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); - if (gamePublisherEu.equals("Nintendo") || gamePublisherJp.equals("Nintendo") || gamePublisherNa.equals("Nintendo")) { - result += gameName + ", "; + if (gamePublisherEu.equals("Nintendo") || gamePublisherJp.equals("Nintendo") + || gamePublisherNa.equals("Nintendo")) { + result += gameName + ", "; } @@ -613,7 +614,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPublisherSega() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -630,8 +631,9 @@ public class Games { String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); - if (gamePublisherEu.equals("Sega") || gamePublisherJp.equals("Sega") || gamePublisherNa.equals("Sega")) { - result += gameName + ", "; + if (gamePublisherEu.equals("Sega") || gamePublisherJp.equals("Sega") + || gamePublisherNa.equals("Sega")) { + result += gameName + ", "; } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index f2fe48a..d155b17 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -100,35 +100,35 @@ public class GamesTest extends TestCase { String actual = testObject.checkConsoleMultiplatform(); assertEquals(expected, actual); } - + public void test_checkConsoleNintendoSwitch() { Games testObject = new Games(); String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate"; String actual = testObject.checkConsoleNintendoSwitch(); assertEquals(expected, actual); } - + public void test_checkDeveloperAtlus() { Games testObject = new Games(); String expected = "Persona 5 Royal, Persona 3 Portable"; String actual = testObject.checkDeveloperAtlus(); assertEquals(expected, actual); } - + public void test_checkDevelopers() { Games testObject = new Games(); String expected = "Atlus, Insomniac Games, Platinum Games, Intelligent Systems, Artdink, Nintendo SPD, Sora Ltd., Ryu Ga Gotoku Studio, Sega Sports R&D, Namco, Spike Chunsoft, Bandai Namco Games, Gust Co. Ltd., Vicarious Visions"; String actual = testObject.checkDevelopers(); assertEquals(expected, actual); } - + public void test_checkPublisherNintendo() { Games testObject = new Games(); String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Tomodachi Life"; String actual = testObject.checkPublisherNintendo(); assertEquals(expected, actual); } - + public void test_checkPublisherSega() { Games testObject = new Games(); String expected = "Persona 5 Royal, Yakuza: Dead Souls, Jet Set Radio Future"; From 2521e7d5da4ada219bbef097cdfb576537472b4f Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 21:06:41 +0100 Subject: [PATCH 018/114] Added Publisher Check + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 183 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 + 2 files changed, 190 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 86cce3d..c6abbfc 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -647,4 +647,187 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPublishers() { + String result = ""; + String query = "SELECT Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; + boolean sega = false; + boolean atlus = false; + boolean sce = false; + boolean nintendo = false; + boolean namco = false; + boolean spikeChun = false; + boolean bandaiNamco = false; + boolean activision = false; + boolean whileSwitchOne = true; + boolean whileSwitchTwo = true; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); + + while (whileSwitchOne) { + while (whileSwitchTwo) { + if (sega && gamePublisherEu.equals("Sega")) { + break; + } else if (atlus && gamePublisherEu.equals("Atlus")) { + break; + } else if (sce && gamePublisherEu.equals("Sony Computer Entertainment")) { + break; + } else if (nintendo && gamePublisherEu.equals("Nintendo")) { + break; + } else if (namco && gamePublisherEu.equals("Namco")) { + break; + } else if (spikeChun && gamePublisherEu.equals("Spike Chunsoft")) { + break; + } else if (bandaiNamco && gamePublisherEu.equals("Bandai Namco Games")) { + break; + } else if (activision && gamePublisherEu.equals("Activision")) { + break; + } + + switch (gamePublisherEu) { + case "Sega": + sega = true; + break; + case "Atlus": + atlus = true; + break; + case "Sony Computer Entertainment": + sce = true; + break; + case "Nintendo": + nintendo = true; + break; + case "Namco": + namco = true; + break; + case "Spike Chunsoft": + spikeChun = true; + break; + case "Bandai Namco Games": + bandaiNamco = true; + break; + case "Activision": + activision = true; + break; + } + + result += gamePublisherEu + ", "; + break; + } + if (sega && gamePublisherJp.equals("Sega")) { + break; + } else if (atlus && gamePublisherJp.equals("Atlus")) { + break; + } else if (sce && gamePublisherJp.equals("Sony Computer Entertainment")) { + break; + } else if (nintendo && gamePublisherJp.equals("Nintendo")) { + break; + } else if (namco && gamePublisherJp.equals("Namco")) { + break; + } else if (spikeChun && gamePublisherJp.equals("Spike Chunsoft")) { + break; + } else if (bandaiNamco && gamePublisherJp.equals("Bandai Namco Games")) { + break; + } else if (activision && gamePublisherJp.equals("Activision")) { + break; + } + + switch (gamePublisherJp) { + case "Sega": + sega = true; + break; + case "Atlus": + atlus = true; + break; + case "Sony Computer Entertainment": + sce = true; + break; + case "Nintendo": + nintendo = true; + break; + case "Namco": + namco = true; + break; + case "Spike Chunsoft": + spikeChun = true; + break; + case "Bandai Namco Games": + bandaiNamco = true; + break; + case "Activision": + activision = true; + break; + } + + result += gamePublisherJp + ", "; + break; + } + if (sega && gamePublisherNa.equals("Sega")) { + continue; + } else if (atlus && gamePublisherNa.equals("Atlus")) { + continue; + } else if (sce && gamePublisherNa.equals("Sony Computer Entertainment")) { + continue; + } else if (nintendo && gamePublisherNa.equals("Nintendo")) { + continue; + } else if (namco && gamePublisherNa.equals("Namco")) { + continue; + } else if (spikeChun && gamePublisherNa.equals("Spike Chunsoft")) { + continue; + } else if (bandaiNamco && gamePublisherNa.equals("Bandai Namco Games")) { + continue; + } else if (activision && gamePublisherNa.equals("Activision")) { + continue; + } + + switch (gamePublisherNa) { + case "Sega": + sega = true; + break; + case "Atlus": + atlus = true; + break; + case "Sony Computer Entertainment": + sce = true; + break; + case "Nintendo": + nintendo = true; + break; + case "Namco": + namco = true; + break; + case "Spike Chunsoft": + spikeChun = true; + break; + case "Bandai Namco Games": + bandaiNamco = true; + break; + case "Activision": + activision = true; + break; + } + + result += gamePublisherNa + ", "; + + + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index d155b17..6b68266 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -135,4 +135,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkPublisherSega(); assertEquals(expected, actual); } + + public void test_checkPublishers() { + Games testObject = new Games(); + String expected = "Sega, Atlus, Sony Computer Entertainment, Nintendo, Square Enix, Electronic Arts, Namco, Numskull Games, Spike Chunsoft, Ghostlight, Bandai Namco Games, Tecmo Koei Europe, Gust Co. Ltd., Tecmo Koei America, Activision"; + String actual = testObject.checkPublishers(); + assertEquals(expected, actual); + } } From 1b6402a527dd202ec4960ca36c3b346f7f85b1ef Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 22:01:33 +0100 Subject: [PATCH 019/114] Added EU Publisher Check + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 43 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++ 2 files changed, 50 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index c6abbfc..c85f6ea 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -830,4 +830,47 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPublishersEu() { + String result = ""; + String query = "SELECT Game_Publisher_EU FROM Games"; + boolean sega = false; + boolean nintendo = false; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + + if (sega && gamePublisherEu.equals("Sega")) { + continue; + } else if (nintendo && gamePublisherEu.equals("Nintendo")) { + continue; + } + + switch (gamePublisherEu) { + case "Sega": + sega = true; + break; + case "Nintendo": + nintendo = true; + break; + } + + result += gamePublisherEu + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 6b68266..ff3edff 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -142,4 +142,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkPublishers(); assertEquals(expected, actual); } + + public void test_checkPublishersEu() { + Games testObject = new Games(); + String expected = "Sega, Sony Computer Entertainment, Nintendo, Electronic Arts, Numskull Games, Ghostlight, Bandai Namco Games, Tecmo Koei Europe, Activision"; + String actual = testObject.checkPublishersEu(); + assertEquals(expected, actual); + } } From b1bb4b2ea181fc4a3cf0c29b04c2e1a3223585aa Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 22:09:20 +0100 Subject: [PATCH 020/114] Added JP and NA Publisher Checks + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 98 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++ 2 files changed, 112 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index c85f6ea..6c4f430 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -873,4 +873,102 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPublishersJp() { + String result = ""; + String query = "SELECT Game_Publisher_JP FROM Games"; + boolean atlus = false; + boolean nintendo = false; + boolean sega = false; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + + if (atlus && gamePublisherJp.equals("Atlus")) { + continue; + } else if (nintendo && gamePublisherJp.equals("Nintendo")) { + continue; + } else if (sega && gamePublisherJp.equals("Sega")) { + continue; + } + + switch (gamePublisherJp) { + case "Atlus": + atlus = true; + break; + case "Nintendo": + nintendo = true; + break; + case "Sega": + sega = true; + break; + } + + result += gamePublisherJp + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkPublishersNa() { + String result = ""; + String query = "SELECT Game_Publisher_NA FROM Games"; + boolean atlus = false; + boolean nintendo = false; + boolean sega = false; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gamePublisherNa = resultSet.getString("Game_Publisher_Na"); + + if (atlus && gamePublisherNa.equals("Atlus")) { + continue; + } else if (nintendo && gamePublisherNa.equals("Nintendo")) { + continue; + } else if (sega && gamePublisherNa.equals("Sega")) { + continue; + } + + switch (gamePublisherNa) { + case "Atlus": + atlus = true; + break; + case "Nintendo": + nintendo = true; + break; + case "Sega": + sega = true; + break; + } + + result += gamePublisherNa + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index ff3edff..667b734 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -149,4 +149,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkPublishersEu(); assertEquals(expected, actual); } + + public void test_checkPublishersJp() { + Games testObject = new Games(); + String expected = "Atlus, Sony Computer Entertainment, Nintendo, Square Enix, Sega, Namco, Spike Chunsoft, Bandai Namco Games, Gust Co. Ltd., Activision"; + String actual = testObject.checkPublishersJp(); + assertEquals(expected, actual); + } + + public void test_checkPublishersNa() { + Games testObject = new Games(); + String expected = "Atlus, Sony Computer Entertainment, Nintendo, Sega, Namco, Spike Chunsoft, Bandai Namco Games, Tecmo Koei America, Activision"; + String actual = testObject.checkPublishersNa(); + assertEquals(expected, actual); + } } From 46b885d0bb7335f63221a45d704deeb944d04f50 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 22:36:09 +0100 Subject: [PATCH 021/114] Added Unknown Release Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 30 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++++ 2 files changed, 37 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 6c4f430..6ccee27 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -971,4 +971,34 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkReleaseDateUnknown() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 667b734..09c7e46 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -163,4 +163,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkPublishersNa(); assertEquals(expected, actual); } + + public void test_checkReleaseDateUnknown() { + Games testObject = new Games(); + String expected = "Breakdown, Atelier Totori Plus"; + String actual = testObject.checkReleaseDateUnknown(); + assertEquals(expected, actual); + } } From 26dfeb3d8ec16c629a88bd3d8e4e1d9a591532a6 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 23:07:36 +0100 Subject: [PATCH 022/114] Added Game Listing + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 28 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++++ 2 files changed, 35 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 6ccee27..3be21e7 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -21,6 +21,34 @@ public class Games { } } + public String checkGames() { + String result = ""; + String query = "SELECT Game_Name FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + + + + result += gameName + ", "; + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + public String checkConsoles() { String result = ""; String query = "SELECT Game_Console FROM Games"; diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 09c7e46..d4b2e69 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -9,6 +9,13 @@ public class GamesTest extends TestCase { boolean actual = testObject.checkConnection(); assertEquals(expected, actual); } + + public void test_checkGames() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkGames(); + assertEquals(expected, actual); + } public void test_checkConsoles() { Games testObject = new Games(); From e8f46e214a70080a6d42e07d9272d4454645e071 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 23:09:48 +0100 Subject: [PATCH 023/114] Refactored Class and Test File --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 28 ++++++++----------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 12 ++++---- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 3be21e7..1e3c441 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -34,8 +34,6 @@ public class Games { while (resultSet.next()) { String gameName = resultSet.getString("Game_Name"); - - result += gameName + ", "; } @@ -48,7 +46,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkConsoles() { String result = ""; String query = "SELECT Game_Console FROM Games"; @@ -675,7 +673,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPublishers() { String result = ""; String query = "SELECT Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -687,8 +685,6 @@ public class Games { boolean spikeChun = false; boolean bandaiNamco = false; boolean activision = false; - boolean whileSwitchOne = true; - boolean whileSwitchTwo = true; try { Connection connection = DriverManager.getConnection(databaseURL); @@ -700,9 +696,9 @@ public class Games { String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); - - while (whileSwitchOne) { - while (whileSwitchTwo) { + + while (true) { + while (true) { if (sega && gamePublisherEu.equals("Sega")) { break; } else if (atlus && gamePublisherEu.equals("Atlus")) { @@ -846,8 +842,6 @@ public class Games { result += gamePublisherNa + ", "; - - } statement.close(); connection.close(); @@ -858,7 +852,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPublishersEu() { String result = ""; String query = "SELECT Game_Publisher_EU FROM Games"; @@ -901,7 +895,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPublishersJp() { String result = ""; String query = "SELECT Game_Publisher_JP FROM Games"; @@ -950,7 +944,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPublishersNa() { String result = ""; String query = "SELECT Game_Publisher_NA FROM Games"; @@ -999,7 +993,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkReleaseDateUnknown() { String result = ""; String query = "SELECT Game_Name, Game_Release_AU FROM Games"; @@ -1015,8 +1009,8 @@ public class Games { String gameReleaseAu = resultSet.getString("Game_Release_AU"); if (gameReleaseAu == null) { - - result += gameName + ", "; + + result += gameName + ", "; } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index d4b2e69..8c52eea 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -9,7 +9,7 @@ public class GamesTest extends TestCase { boolean actual = testObject.checkConnection(); assertEquals(expected, actual); } - + public void test_checkGames() { Games testObject = new Games(); String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; @@ -142,35 +142,35 @@ public class GamesTest extends TestCase { String actual = testObject.checkPublisherSega(); assertEquals(expected, actual); } - + public void test_checkPublishers() { Games testObject = new Games(); String expected = "Sega, Atlus, Sony Computer Entertainment, Nintendo, Square Enix, Electronic Arts, Namco, Numskull Games, Spike Chunsoft, Ghostlight, Bandai Namco Games, Tecmo Koei Europe, Gust Co. Ltd., Tecmo Koei America, Activision"; String actual = testObject.checkPublishers(); assertEquals(expected, actual); } - + public void test_checkPublishersEu() { Games testObject = new Games(); String expected = "Sega, Sony Computer Entertainment, Nintendo, Electronic Arts, Numskull Games, Ghostlight, Bandai Namco Games, Tecmo Koei Europe, Activision"; String actual = testObject.checkPublishersEu(); assertEquals(expected, actual); } - + public void test_checkPublishersJp() { Games testObject = new Games(); String expected = "Atlus, Sony Computer Entertainment, Nintendo, Square Enix, Sega, Namco, Spike Chunsoft, Bandai Namco Games, Gust Co. Ltd., Activision"; String actual = testObject.checkPublishersJp(); assertEquals(expected, actual); } - + public void test_checkPublishersNa() { Games testObject = new Games(); String expected = "Atlus, Sony Computer Entertainment, Nintendo, Sega, Namco, Spike Chunsoft, Bandai Namco Games, Tecmo Koei America, Activision"; String actual = testObject.checkPublishersNa(); assertEquals(expected, actual); } - + public void test_checkReleaseDateUnknown() { Games testObject = new Games(); String expected = "Breakdown, Atelier Totori Plus"; From 3bb3c06fd464750ed2cf181af65e1ad8bdfe717f Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sat, 12 Feb 2022 23:50:56 +0100 Subject: [PATCH 024/114] Added Release Year Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 76 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 ++++ 2 files changed, 90 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 1e3c441..370c05e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1023,4 +1023,80 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkAllSameReleaseYear() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + + } else { + if (gameReleaseEu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) && gameReleaseJp.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) + && gameReleaseEu.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) && gameReleaseAu.substring(0, 4).equals(gameReleaseEu.substring(0, 4)) + && gameReleaseAu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) && gameReleaseAu.substring(0, 4).equals(gameReleaseNa.substring(0, 4))) { + result += gameName + ", "; + } + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkAllDifferentReleaseYear() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + result += gameName + ", "; + } else { + if (!gameReleaseEu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) || !gameReleaseJp.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) + || !gameReleaseEu.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) || !gameReleaseAu.substring(0, 4).equals(gameReleaseEu.substring(0, 4)) + || !gameReleaseAu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) || !gameReleaseAu.substring(0, 4).equals(gameReleaseNa.substring(0, 4))) { + result += gameName + ", "; + } + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 8c52eea..ba270b2 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -177,4 +177,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkReleaseDateUnknown(); assertEquals(expected, actual); } + + public void test_checkAllSameReleaseYear() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, AI: The Somnium Files, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkAllSameReleaseYear(); + assertEquals(expected, actual); + } + + public void test_checkAllDifferentReleaseYear() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Rhythm Paradise, Yakuza: Dead Souls, Breakdown, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus"; + String actual = testObject.checkAllDifferentReleaseYear(); + assertEquals(expected, actual); + } } From 4caeda11ea78b39569f5b81ced79e1659a5a701b Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Sun, 13 Feb 2022 23:59:20 +0100 Subject: [PATCH 025/114] Added Function which prints out the list for users without MS Access --- projjpn/GamesDB.accdb | Bin 1015808 -> 1015808 bytes projjpn/GamesDB.laccdb | Bin 64 -> 0 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 66 ++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/projjpn/GamesDB.accdb b/projjpn/GamesDB.accdb index 332543baa35d0f3bad171931a275406072b7362e..380bfb7e9108dd721ab2a676ca9268ab7e907647 100644 GIT binary patch delta 134 zcmZo@uxn_r+rY%fB*C&-fbRq2WCcE+CV_1Nj3@Y553({|oIm}n9HS&-So?E1Mj&Pa zVrC#_+5TLPReB+hB)3nPqYncRgfmPRIKVnNj!}})ul>0kBM>tI zF*6XeY=17tD!q_LliMfE(T4#D{28VT9AKTZeb)ij4{Q@R2(+&{&I-hAK+F!r96-zo U#9Tnk4a7V^%)5QnalWt}0AG+X-~a#s diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index 5a03e0388674df9c401c0cef4dc38d6267f63454..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 GIT binary patch literal 0 HcmV?d00001 literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 370c05e..efbbe6e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -21,6 +21,72 @@ public class Games { } } + public String printTable() { + String result = ""; + String query = "SELECT * FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + int id = resultSet.getInt("Game_ID"); + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + String gameDeveloper = resultSet.getString("Game_Developer"); + String gamePublisherEu = resultSet.getString("Game_Developer"); + String gamePublisherJp = resultSet.getString("Game_Console"); + String gamePublisherNa = resultSet.getString("Game_Console"); + String gameGenre = resultSet.getString("Game_Genre"); + + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseEuDots = gameReleaseEu.substring(8, 10) + "." + gameReleaseEu.substring(5, 7) + + "." + gameReleaseEu.substring(0, 4); + + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseJpDots = gameReleaseJp.substring(8, 10) + "." + gameReleaseJp.substring(5, 7) + + "." + gameReleaseJp.substring(0, 4); + + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseNaDots = gameReleaseNa.substring(8, 10) + "." + gameReleaseNa.substring(5, 7) + + "." + gameReleaseNa.substring(0, 4); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + String gameReleaseAuDots; + if (gameReleaseAu != null) { + gameReleaseAuDots = gameReleaseAu.substring(8, 10) + "." + gameReleaseAu.substring(5, 7) + + "." + gameReleaseAu.substring(0, 4); + } else { + gameReleaseAuDots = "Unknown"; + } + + int gameUsk = resultSet.getInt("Game_USK_Rating"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + String gameEsrb = resultSet.getString("Game_ESRB_Rating"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePegi != 0) { + result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + gameUsk + ", " + gamePegi + ", " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + gamePlayers + "\n"; + } else { + result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + gameUsk + ", Unknown, " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + gamePlayers + "\n"; + } + + + } + statement.close(); + + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + // The substring removes the last New line in the String. + return result.substring(0, result.length() - 1); + } + public String checkGames() { String result = ""; String query = "SELECT Game_Name FROM Games"; From 89e569711467fd893ab93838178966597aa61cc3 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:14:32 +0100 Subject: [PATCH 026/114] Added Player Checkers + Tests --- projjpn/GamesDB.laccdb | Bin 0 -> 64 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 3 files changed, 72 insertions(+) diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5a03e0388674df9c401c0cef4dc38d6267f63454 100644 GIT binary patch literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M literal 0 HcmV?d00001 diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index efbbe6e..e2aa307 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1165,4 +1165,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkOnePlayer() { + String result = ""; + String query = "SELECT Game_Name, Game_Players FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePlayers.equals("1") || gamePlayers.equals("1-2") || gamePlayers.equals("1-4") || gamePlayers.equals("1-8")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkTwoPlayer() { + String result = ""; + String query = "SELECT Game_Name, Game_Players FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePlayers.equals("1-2") || gamePlayers.equals("1-4") || gamePlayers.equals("1-8")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index ba270b2..2009338 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -191,4 +191,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentReleaseYear(); assertEquals(expected, actual); } + + public void test_checkOnePlayer() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkOnePlayer(); + assertEquals(expected, actual); + } + + public void test_checkTwoPlayer() { + Games testObject = new Games(); + String expected = "Astral Chain, Super Smash Bros. Ultimate, Jet Set Radio Future"; + String actual = testObject.checkTwoPlayer(); + assertEquals(expected, actual); + } } From 7996b7c8c24d278998292a5b9edfef50194d7fa2 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:18:05 +0100 Subject: [PATCH 027/114] Added more Player Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index e2aa307..d0b8433 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1223,4 +1223,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkFourPlayer() { + String result = ""; + String query = "SELECT Game_Name, Game_Players FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePlayers.equals("1-4") || gamePlayers.equals("1-8")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkEightPlayer() { + String result = ""; + String query = "SELECT Game_Name, Game_Players FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePlayers.equals("1-8")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 2009338..5d3cb23 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -205,4 +205,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkTwoPlayer(); assertEquals(expected, actual); } + + public void test_checkFourPlayer() { + Games testObject = new Games(); + String expected = "Super Smash Bros. Ultimate, Jet Set Radio Future"; + String actual = testObject.checkFourPlayer(); + assertEquals(expected, actual); + } + + public void test_checkEightPlayer() { + Games testObject = new Games(); + String expected = "Super Smash Bros. Ultimate"; + String actual = testObject.checkEightPlayer(); + assertEquals(expected, actual); + } } From c145c2b5102c505ee2e0b8f3a981ec85c6ab8eae Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:22:12 +0100 Subject: [PATCH 028/114] Added One Player Only Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 29 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++++ 2 files changed, 36 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index d0b8433..f46e4b4 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1281,4 +1281,33 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkOnePlayerOnly() { + String result = ""; + String query = "SELECT Game_Name, Game_Players FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePlayers.equals("1")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 5d3cb23..ddc27a2 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -219,4 +219,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkEightPlayer(); assertEquals(expected, actual); } + + public void test_checkOnePlayerOnly() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Ratchet & Clank, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkOnePlayerOnly(); + assertEquals(expected, actual); + } } From ae69414f36ba599c72a77f6fbda15fbcf7ee0bce Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:24:09 +0100 Subject: [PATCH 029/114] Refactored Class and Test File --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 134 ++++++++++-------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +- 2 files changed, 81 insertions(+), 67 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index f46e4b4..e9033ee 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -32,48 +32,55 @@ public class Games { ResultSet resultSet = statement.executeQuery(query); while (resultSet.next()) { - int id = resultSet.getInt("Game_ID"); - String gameName = resultSet.getString("Game_Name"); - String gameConsole = resultSet.getString("Game_Console"); - String gameDeveloper = resultSet.getString("Game_Developer"); - String gamePublisherEu = resultSet.getString("Game_Developer"); - String gamePublisherJp = resultSet.getString("Game_Console"); - String gamePublisherNa = resultSet.getString("Game_Console"); - String gameGenre = resultSet.getString("Game_Genre"); - - String gameReleaseEu = resultSet.getString("Game_Release_EU"); - String gameReleaseEuDots = gameReleaseEu.substring(8, 10) + "." + gameReleaseEu.substring(5, 7) - + "." + gameReleaseEu.substring(0, 4); - - String gameReleaseJp = resultSet.getString("Game_Release_JP"); - String gameReleaseJpDots = gameReleaseJp.substring(8, 10) + "." + gameReleaseJp.substring(5, 7) - + "." + gameReleaseJp.substring(0, 4); - - String gameReleaseNa = resultSet.getString("Game_Release_NA"); - String gameReleaseNaDots = gameReleaseNa.substring(8, 10) + "." + gameReleaseNa.substring(5, 7) - + "." + gameReleaseNa.substring(0, 4); - String gameReleaseAu = resultSet.getString("Game_Release_AU"); - String gameReleaseAuDots; - if (gameReleaseAu != null) { - gameReleaseAuDots = gameReleaseAu.substring(8, 10) + "." + gameReleaseAu.substring(5, 7) - + "." + gameReleaseAu.substring(0, 4); - } else { - gameReleaseAuDots = "Unknown"; - } - - int gameUsk = resultSet.getInt("Game_USK_Rating"); - int gamePegi = resultSet.getInt("Game_PEGI_Rating"); - String gameEsrb = resultSet.getString("Game_ESRB_Rating"); - String gameCero = resultSet.getString("Game_CERO_Rating"); - String gameAcb = resultSet.getString("Game_ACB_Rating"); - String gamePlayers = resultSet.getString("Game_Players"); - - if (gamePegi != 0) { - result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + gameUsk + ", " + gamePegi + ", " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + gamePlayers + "\n"; - } else { - result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + gameUsk + ", Unknown, " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + gamePlayers + "\n"; - } - + int id = resultSet.getInt("Game_ID"); + String gameName = resultSet.getString("Game_Name"); + String gameConsole = resultSet.getString("Game_Console"); + String gameDeveloper = resultSet.getString("Game_Developer"); + String gamePublisherEu = resultSet.getString("Game_Developer"); + String gamePublisherJp = resultSet.getString("Game_Console"); + String gamePublisherNa = resultSet.getString("Game_Console"); + String gameGenre = resultSet.getString("Game_Genre"); + + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseEuDots = gameReleaseEu.substring(8, 10) + "." + gameReleaseEu.substring(5, 7) + "." + + gameReleaseEu.substring(0, 4); + + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseJpDots = gameReleaseJp.substring(8, 10) + "." + gameReleaseJp.substring(5, 7) + "." + + gameReleaseJp.substring(0, 4); + + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseNaDots = gameReleaseNa.substring(8, 10) + "." + gameReleaseNa.substring(5, 7) + "." + + gameReleaseNa.substring(0, 4); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + String gameReleaseAuDots; + if (gameReleaseAu != null) { + gameReleaseAuDots = gameReleaseAu.substring(8, 10) + "." + gameReleaseAu.substring(5, 7) + "." + + gameReleaseAu.substring(0, 4); + } else { + gameReleaseAuDots = "Unknown"; + } + + int gameUsk = resultSet.getInt("Game_USK_Rating"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + String gameEsrb = resultSet.getString("Game_ESRB_Rating"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + String gamePlayers = resultSet.getString("Game_Players"); + + if (gamePegi != 0) { + result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + + gameReleaseAuDots + ", " + gameUsk + ", " + gamePegi + ", " + gameEsrb + ", " + gameCero + + ", " + gameAcb + ", " + gamePlayers + "\n"; + } else { + result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + + gameReleaseAuDots + ", " + gameUsk + ", Unknown, " + gameEsrb + ", " + gameCero + ", " + + gameAcb + ", " + gamePlayers + "\n"; + } } statement.close(); @@ -86,7 +93,7 @@ public class Games { // The substring removes the last New line in the String. return result.substring(0, result.length() - 1); } - + public String checkGames() { String result = ""; String query = "SELECT Game_Name FROM Games"; @@ -1089,7 +1096,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAllSameReleaseYear() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -1106,13 +1113,16 @@ public class Games { String gameReleaseJp = resultSet.getString("Game_Release_JP"); String gameReleaseNa = resultSet.getString("Game_Release_NA"); String gameReleaseAu = resultSet.getString("Game_Release_AU"); - + if (gameReleaseAu == null) { - + } else { - if (gameReleaseEu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) && gameReleaseJp.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) - && gameReleaseEu.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) && gameReleaseAu.substring(0, 4).equals(gameReleaseEu.substring(0, 4)) - && gameReleaseAu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) && gameReleaseAu.substring(0, 4).equals(gameReleaseNa.substring(0, 4))) { + if (gameReleaseEu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) + && gameReleaseJp.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) + && gameReleaseEu.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) + && gameReleaseAu.substring(0, 4).equals(gameReleaseEu.substring(0, 4)) + && gameReleaseAu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) + && gameReleaseAu.substring(0, 4).equals(gameReleaseNa.substring(0, 4))) { result += gameName + ", "; } } @@ -1127,7 +1137,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAllDifferentReleaseYear() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -1144,13 +1154,16 @@ public class Games { String gameReleaseJp = resultSet.getString("Game_Release_JP"); String gameReleaseNa = resultSet.getString("Game_Release_NA"); String gameReleaseAu = resultSet.getString("Game_Release_AU"); - + if (gameReleaseAu == null) { result += gameName + ", "; } else { - if (!gameReleaseEu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) || !gameReleaseJp.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) - || !gameReleaseEu.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) || !gameReleaseAu.substring(0, 4).equals(gameReleaseEu.substring(0, 4)) - || !gameReleaseAu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) || !gameReleaseAu.substring(0, 4).equals(gameReleaseNa.substring(0, 4))) { + if (!gameReleaseEu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) + || !gameReleaseJp.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) + || !gameReleaseEu.substring(0, 4).equals(gameReleaseNa.substring(0, 4)) + || !gameReleaseAu.substring(0, 4).equals(gameReleaseEu.substring(0, 4)) + || !gameReleaseAu.substring(0, 4).equals(gameReleaseJp.substring(0, 4)) + || !gameReleaseAu.substring(0, 4).equals(gameReleaseNa.substring(0, 4))) { result += gameName + ", "; } } @@ -1165,7 +1178,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkOnePlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1180,7 +1193,8 @@ public class Games { String gameName = resultSet.getString("Game_Name"); String gamePlayers = resultSet.getString("Game_Players"); - if (gamePlayers.equals("1") || gamePlayers.equals("1-2") || gamePlayers.equals("1-4") || gamePlayers.equals("1-8")) { + if (gamePlayers.equals("1") || gamePlayers.equals("1-2") || gamePlayers.equals("1-4") + || gamePlayers.equals("1-8")) { result += gameName + ", "; } @@ -1194,7 +1208,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkTwoPlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1223,7 +1237,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkFourPlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1252,7 +1266,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkEightPlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1281,7 +1295,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkOnePlayerOnly() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index ddc27a2..6d02385 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -177,49 +177,49 @@ public class GamesTest extends TestCase { String actual = testObject.checkReleaseDateUnknown(); assertEquals(expected, actual); } - + public void test_checkAllSameReleaseYear() { Games testObject = new Games(); String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, AI: The Somnium Files, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkAllSameReleaseYear(); assertEquals(expected, actual); } - + public void test_checkAllDifferentReleaseYear() { Games testObject = new Games(); String expected = "Persona 5 Royal, Rhythm Paradise, Yakuza: Dead Souls, Breakdown, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus"; String actual = testObject.checkAllDifferentReleaseYear(); assertEquals(expected, actual); } - + public void test_checkOnePlayer() { Games testObject = new Games(); String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkOnePlayer(); assertEquals(expected, actual); } - + public void test_checkTwoPlayer() { Games testObject = new Games(); String expected = "Astral Chain, Super Smash Bros. Ultimate, Jet Set Radio Future"; String actual = testObject.checkTwoPlayer(); assertEquals(expected, actual); } - + public void test_checkFourPlayer() { Games testObject = new Games(); String expected = "Super Smash Bros. Ultimate, Jet Set Radio Future"; String actual = testObject.checkFourPlayer(); assertEquals(expected, actual); } - + public void test_checkEightPlayer() { Games testObject = new Games(); String expected = "Super Smash Bros. Ultimate"; String actual = testObject.checkEightPlayer(); assertEquals(expected, actual); } - + public void test_checkOnePlayerOnly() { Games testObject = new Games(); String expected = "Persona 5 Royal, Ratchet & Clank, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; From dce812bdf307949599466e3b35eba293efb014b2 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:36:59 +0100 Subject: [PATCH 030/114] Added USK Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 29 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++++ 2 files changed, 36 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index e9033ee..44217bf 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1324,4 +1324,33 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkUskZero() { + String result = ""; + String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gameUsk = resultSet.getInt("Game_USK_Rating"); + + if (gameUsk == 0) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 6d02385..044b438 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -226,4 +226,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkOnePlayerOnly(); assertEquals(expected, actual); } + + public void test_checkUskZero() { + Games testObject = new Games(); + String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; + String actual = testObject.checkUskZero(); + assertEquals(expected, actual); + } } From adf9fa953b961d3826c9b6123c584096afcfd45a Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:41:53 +0100 Subject: [PATCH 031/114] Added additional USK Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 15 +++++ 2 files changed, 73 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 44217bf..b8b9f2f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1353,4 +1353,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkUskSix() { + String result = ""; + String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gameUsk = resultSet.getInt("Game_USK_Rating"); + + if (gameUsk == 6) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkUskTwelve() { + String result = ""; + String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gameUsk = resultSet.getInt("Game_USK_Rating"); + + if (gameUsk == 12) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 044b438..c15e6af 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -233,4 +233,19 @@ public class GamesTest extends TestCase { String actual = testObject.checkUskZero(); assertEquals(expected, actual); } + + public void test_checkUskSix() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkUskSix(); + assertEquals(expected, actual); + } + + public void test_checkUskTwelve() { + Games testObject = new Games(); + String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, Persona 3 Portable"; + String actual = testObject.checkUskTwelve(); + assertEquals(expected, actual); + } } + From 1b16fb91f1a15ea5ab94b238e1408da727fa8e7a Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:45:10 +0100 Subject: [PATCH 032/114] Added more additional USK Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index b8b9f2f..9b602f9 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1411,4 +1411,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkUskSixteen() { + String result = ""; + String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gameUsk = resultSet.getInt("Game_USK_Rating"); + + if (gameUsk == 16) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkUskEighteen() { + String result = ""; + String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gameUsk = resultSet.getInt("Game_USK_Rating"); + + if (gameUsk == 18) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index c15e6af..c5997fb 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -247,5 +247,19 @@ public class GamesTest extends TestCase { String actual = testObject.checkUskTwelve(); assertEquals(expected, actual); } + + public void test_checkUskSixteen() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Astral Chain, Breakdown, AI: The Somnium Files"; + String actual = testObject.checkUskSixteen(); + assertEquals(expected, actual); + } + + public void test_checkUskEighteen() { + Games testObject = new Games(); + String expected = "Yakuza: Dead Souls"; + String actual = testObject.checkUskEighteen(); + assertEquals(expected, actual); + } } From 41a9f7b5fcf40f459e408d0af483bc3cd9e21d24 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:49:34 +0100 Subject: [PATCH 033/114] Added PEGI Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 9b602f9..3f5ab62 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1469,4 +1469,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPegiThree() { + String result = ""; + String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + + if (gamePegi == 3) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkPegiSeven() { + String result = ""; + String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + + if (gamePegi == 7) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index c5997fb..887c8b1 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -261,5 +261,19 @@ public class GamesTest extends TestCase { String actual = testObject.checkUskEighteen(); assertEquals(expected, actual); } + + public void test_checkPegiThree() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; + String actual = testObject.checkPegiThree(); + assertEquals(expected, actual); + } + + public void test_checkPegiSeven() { + Games testObject = new Games(); + String expected = "Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkPegiSeven(); + assertEquals(expected, actual); + } } From 266f73762592228b5e9c2093637c2e9b87bc0971 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:52:12 +0100 Subject: [PATCH 034/114] Added additional PEGI Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 3f5ab62..9c4683c 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1527,4 +1527,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPegiTwelve() { + String result = ""; + String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + + if (gamePegi == 12) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkPegiSixteen() { + String result = ""; + String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + + if (gamePegi == 16) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 887c8b1..22bbb76 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -275,5 +275,19 @@ public class GamesTest extends TestCase { String actual = testObject.checkPegiSeven(); assertEquals(expected, actual); } + + public void test_checkPegiTwelve() { + Games testObject = new Games(); + String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Persona 3 Portable, Atelier Totori Plus"; + String actual = testObject.checkPegiTwelve(); + assertEquals(expected, actual); + } + + public void test_checkPegiSixteen() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Astral Chain"; + String actual = testObject.checkPegiSixteen(); + assertEquals(expected, actual); + } } From 1e96bf17371966a7d0287980e915b6ad0abd8fac Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:54:15 +0100 Subject: [PATCH 035/114] Added more additional PEGI Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 9c4683c..3ecf98a 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1585,4 +1585,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkPegiEighteen() { + String result = ""; + String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + + if (gamePegi == 18) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkPegiUnknown() { + String result = ""; + String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + int gamePegi = resultSet.getInt("Game_PEGI_Rating"); + + if (gamePegi == 0) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 22bbb76..5b2603c 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -289,5 +289,19 @@ public class GamesTest extends TestCase { String actual = testObject.checkPegiSixteen(); assertEquals(expected, actual); } + + public void test_checkPegiEighteen() { + Games testObject = new Games(); + String expected = "Yakuza: Dead Souls, Breakdown, AI: The Somnium Files"; + String actual = testObject.checkPegiEighteen(); + assertEquals(expected, actual); + } + + public void test_checkPegiUnknown() { + Games testObject = new Games(); + String expected = "Jet Set Radio Future"; + String actual = testObject.checkPegiUnknown(); + assertEquals(expected, actual); + } } From bb01756f6824cd531f8fc01ed5a913ba4db14d38 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Mon, 14 Feb 2022 00:57:32 +0100 Subject: [PATCH 036/114] Refactored Code and Class --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 22 +++++++++--------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 23 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 3ecf98a..ea9678e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1324,7 +1324,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskZero() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1353,7 +1353,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskSix() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1382,7 +1382,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskTwelve() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1411,7 +1411,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskSixteen() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1440,7 +1440,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkUskEighteen() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1469,7 +1469,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiThree() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1498,7 +1498,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiSeven() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1527,7 +1527,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiTwelve() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1556,7 +1556,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiSixteen() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1585,7 +1585,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiEighteen() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1614,7 +1614,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkPegiUnknown() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 5b2603c..cf601c1 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -226,77 +226,77 @@ public class GamesTest extends TestCase { String actual = testObject.checkOnePlayerOnly(); assertEquals(expected, actual); } - + public void test_checkUskZero() { Games testObject = new Games(); String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; String actual = testObject.checkUskZero(); assertEquals(expected, actual); } - + public void test_checkUskSix() { Games testObject = new Games(); String expected = "Ratchet & Clank, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkUskSix(); assertEquals(expected, actual); } - + public void test_checkUskTwelve() { Games testObject = new Games(); String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Jet Set Radio Future, Persona 3 Portable"; String actual = testObject.checkUskTwelve(); assertEquals(expected, actual); } - + public void test_checkUskSixteen() { Games testObject = new Games(); String expected = "Persona 5 Royal, Astral Chain, Breakdown, AI: The Somnium Files"; String actual = testObject.checkUskSixteen(); assertEquals(expected, actual); } - + public void test_checkUskEighteen() { Games testObject = new Games(); String expected = "Yakuza: Dead Souls"; String actual = testObject.checkUskEighteen(); assertEquals(expected, actual); } - + public void test_checkPegiThree() { Games testObject = new Games(); String expected = "Ratchet & Clank, Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; String actual = testObject.checkPegiThree(); assertEquals(expected, actual); } - + public void test_checkPegiSeven() { Games testObject = new Games(); String expected = "Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkPegiSeven(); assertEquals(expected, actual); } - + public void test_checkPegiTwelve() { Games testObject = new Games(); String expected = "Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, Persona 3 Portable, Atelier Totori Plus"; String actual = testObject.checkPegiTwelve(); assertEquals(expected, actual); } - + public void test_checkPegiSixteen() { Games testObject = new Games(); String expected = "Persona 5 Royal, Astral Chain"; String actual = testObject.checkPegiSixteen(); assertEquals(expected, actual); } - + public void test_checkPegiEighteen() { Games testObject = new Games(); String expected = "Yakuza: Dead Souls, Breakdown, AI: The Somnium Files"; String actual = testObject.checkPegiEighteen(); assertEquals(expected, actual); } - + public void test_checkPegiUnknown() { Games testObject = new Games(); String expected = "Jet Set Radio Future"; @@ -304,4 +304,3 @@ public class GamesTest extends TestCase { assertEquals(expected, actual); } } - From 0ec0d840cc4b2d8869ee1e53a4d31e2545b6be2d Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:13:39 +0100 Subject: [PATCH 037/114] Added ESRB Checkers + Tests --- projjpn/GamesDB.accdb | Bin 1015808 -> 1015808 bytes projjpn/GamesDB.laccdb | Bin 64 -> 0 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 4 files changed, 72 insertions(+) diff --git a/projjpn/GamesDB.accdb b/projjpn/GamesDB.accdb index 380bfb7e9108dd721ab2a676ca9268ab7e907647..e67a55652846dc806f2bbac3ea7ba361b11006b5 100644 GIT binary patch delta 134 zcmZo@uxn_r+rY%fq`|UTfbRq2WCcE+CV_1Nj3@Y5dk)C@9h`nvj!}{^uKl?jBM>tI zF*6XeY=17tD!q`0liMfE(T4#D;u)q39AI5FUEu($(Dq#iSRb&puR6{O#2}g-h&h0m V6NtHhm>Y6x057;Jd5NKa@oE3=KfS4VKIe?fG Uh`E568;E&;n0NcC<9uN|0H&ximjD0& diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index 5a03e0388674df9c401c0cef4dc38d6267f63454..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 GIT binary patch literal 0 HcmV?d00001 literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index ea9678e..626ed15 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1643,4 +1643,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkEsrbE() { + String result = ""; + String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameEsrb = resultSet.getString("Game_ESRB_Rating"); + + if (gameEsrb.equals("E")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkEsrbEten() { + String result = ""; + String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameEsrb = resultSet.getString("Game_ESRB_Rating"); + + if (gameEsrb.equals("E10+")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index cf601c1..f6e6b07 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -303,4 +303,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkPegiUnknown(); assertEquals(expected, actual); } + + public void test_checkEsrbE() { + Games testObject = new Games(); + String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; + String actual = testObject.checkEsrbE(); + assertEquals(expected, actual); + } + + public void test_checkEsrbEten() { + Games testObject = new Games(); + String expected = "Super Smash Bros. Ultimate, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkEsrbEten(); + assertEquals(expected, actual); + } } From 6573b241f448b8c2be6b43a4d48dfa10c9668c04 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:18:35 +0100 Subject: [PATCH 038/114] Added More ESRB Checkers + Tests --- projjpn/GamesDB.laccdb | Bin 0 -> 64 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 ++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 3 files changed, 72 insertions(+) diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5a03e0388674df9c401c0cef4dc38d6267f63454 100644 GIT binary patch literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M literal 0 HcmV?d00001 diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 626ed15..aef1bee 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1701,4 +1701,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkEsrbT() { + String result = ""; + String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameEsrb = resultSet.getString("Game_ESRB_Rating"); + + if (gameEsrb.equals("T")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkEsrbM() { + String result = ""; + String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameEsrb = resultSet.getString("Game_ESRB_Rating"); + + if (gameEsrb.equals("M")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index f6e6b07..5d99438 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -317,4 +317,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkEsrbEten(); assertEquals(expected, actual); } + + public void test_checkEsrbT() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Jet Set Radio Future, Atelier Totori Plus"; + String actual = testObject.checkEsrbT(); + assertEquals(expected, actual); + } + + public void test_checkEsrbM() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable"; + String actual = testObject.checkEsrbM(); + assertEquals(expected, actual); + } } From 95c099f58ec0fe2a8e844226aeeeb4f9e0ccbfa4 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:25:15 +0100 Subject: [PATCH 039/114] Added Cero Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 29 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++++ 2 files changed, 36 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index aef1bee..696a04d 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1759,4 +1759,33 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkCeroA() { + String result = ""; + String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + + if (gameCero.equals("A")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 5d99438..0493bf7 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -331,4 +331,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkEsrbM(); assertEquals(expected, actual); } + + public void test_checkCeroA() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Rhythm Paradise, Super Smash Bros. Ultimate, Jet Set Radio Future, Tomodachi Life, Beautiful Katamari, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkCeroA(); + assertEquals(expected, actual); + } } From 2de3157157f1b40ad5a31e1d5251c428b75060d1 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:27:57 +0100 Subject: [PATCH 040/114] Added Additional Cero Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 696a04d..6b0e662 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1788,4 +1788,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkCeroB() { + String result = ""; + String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + + if (gameCero.equals("B")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkCeroC() { + String result = ""; + String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + + if (gameCero.equals("C")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 0493bf7..f3cc364 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -338,4 +338,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkCeroA(); assertEquals(expected, actual); } + + public void test_checkCeroB() { + Games testObject = new Games(); + String expected = "Fire Emblem: Three Houses, Persona 3 Portable, Atelier Totori Plus"; + String actual = testObject.checkCeroB(); + assertEquals(expected, actual); + } + + public void test_checkCeroC() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Astral Chain, Triangle Strategy, Breakdown"; + String actual = testObject.checkCeroC(); + assertEquals(expected, actual); + } } From e0be859b40f9c21f4138ac9312e9a29220bac0c4 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:31:28 +0100 Subject: [PATCH 041/114] Added More Additional Cero Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 6b0e662..7425a0f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1846,4 +1846,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkCeroD() { + String result = ""; + String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + + if (gameCero.equals("D")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkCeroZ() { + String result = ""; + String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameCero = resultSet.getString("Game_CERO_Rating"); + + if (gameCero.equals("Z")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index f3cc364..2e7567b 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -352,4 +352,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkCeroC(); assertEquals(expected, actual); } + + public void test_checkCeroD() { + Games testObject = new Games(); + String expected = "Yakuza: Dead Souls"; + String actual = testObject.checkCeroD(); + assertEquals(expected, actual); + } + + public void test_checkCeroZ() { + Games testObject = new Games(); + String expected = "AI: The Somnium Files"; + String actual = testObject.checkCeroZ(); + assertEquals(expected, actual); + } } From 512e9975dd94fa27ba4c3f903e6f81875d75bfd8 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:35:44 +0100 Subject: [PATCH 042/114] Added ACB Checker + Test --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 29 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++++ 2 files changed, 36 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 7425a0f..0c65a33 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1904,4 +1904,33 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkAcbG() { + String result = ""; + String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + + if (gameAcb.equals("G")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 2e7567b..1afbd9b 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -366,4 +366,11 @@ public class GamesTest extends TestCase { String actual = testObject.checkCeroZ(); assertEquals(expected, actual); } + + public void test_checkAcbG() { + Games testObject = new Games(); + String expected = "Rhythm Paradise, Beautiful Katamari"; + String actual = testObject.checkAcbG(); + assertEquals(expected, actual); + } } From 76e7cc3b9b4176f39f4fdd7bb7ea48d553bdca85 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:38:28 +0100 Subject: [PATCH 043/114] Added Additional ACB Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 0c65a33..931f136 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1933,4 +1933,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkAcbPg() { + String result = ""; + String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + + if (gameAcb.equals("PG")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkAcbM() { + String result = ""; + String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + + if (gameAcb.equals("M")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 1afbd9b..f6f1436 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -373,4 +373,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkAcbG(); assertEquals(expected, actual); } + + public void test_checkAcbPg() { + Games testObject = new Games(); + String expected = "Ratchet & Clank, Super Smash Bros. Ultimate, Tomodachi Life, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkAcbPg(); + assertEquals(expected, actual); + } + + public void test_checkAcbM() { + Games testObject = new Games(); + String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Jet Set Radio Future"; + String actual = testObject.checkAcbM(); + assertEquals(expected, actual); + } } From 793305e873212d9b041b8204577287d3899ccdf4 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 02:40:58 +0100 Subject: [PATCH 044/114] Added More Additional ACB Checkers + Tests --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 58 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 14 +++++ 2 files changed, 72 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 931f136..3bfac1f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1991,4 +1991,62 @@ public class Games { return result.substring(0, result.length() - 2); } + + public String checkAcbMaFifteen() { + String result = ""; + String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + + if (gameAcb.equals("MA 15+")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + + public String checkAcbReighteen() { + String result = ""; + String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameAcb = resultSet.getString("Game_ACB_Rating"); + + if (gameAcb.equals("R 18+")) { + result += gameName + ", "; + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index f6f1436..69b923b 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -387,4 +387,18 @@ public class GamesTest extends TestCase { String actual = testObject.checkAcbM(); assertEquals(expected, actual); } + + public void test_checkAcbMaFifteen() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable"; + String actual = testObject.checkAcbMaFifteen(); + assertEquals(expected, actual); + } + + public void test_checkAcbReighteen() { + Games testObject = new Games(); + String expected = "Atelier Totori Plus"; + String actual = testObject.checkAcbReighteen(); + assertEquals(expected, actual); + } } From 7b305d29e97fe59b7d82d35d0afc8b034aa778e1 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 03:19:07 +0100 Subject: [PATCH 045/114] Added Javadoc to Misc Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 42 +++++++++++-------- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 28 ++++++------- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 3bfac1f..fd677d7 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -8,7 +8,11 @@ import java.sql.Statement; public class Games { private String databaseURL = "jdbc:ucanaccess://GamesDB.accdb"; - + + /** + * Checks if the connection to the database can be established + * @return Returns true if it connects successfully and false if the connection fails. + */ public boolean checkConnection() { try { Connection connection = DriverManager.getConnection(databaseURL); @@ -20,7 +24,11 @@ public class Games { return false; } } - + + /** + * Prints the whole table for those, who cannot access the Database for some reason. + * @return Returns a String of the whole table. + */ public String printTable() { String result = ""; String query = "SELECT * FROM Games"; @@ -93,7 +101,7 @@ public class Games { // The substring removes the last New line in the String. return result.substring(0, result.length() - 1); } - + public String checkGames() { String result = ""; String query = "SELECT Game_Name FROM Games"; @@ -1643,7 +1651,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkEsrbE() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1672,7 +1680,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkEsrbEten() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1701,7 +1709,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkEsrbT() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1730,7 +1738,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkEsrbM() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1759,7 +1767,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkCeroA() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -1788,7 +1796,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkCeroB() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -1817,7 +1825,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkCeroC() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -1846,7 +1854,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkCeroD() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -1875,7 +1883,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkCeroZ() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -1904,7 +1912,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAcbG() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -1933,7 +1941,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAcbPg() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -1962,7 +1970,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAcbM() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -1991,7 +1999,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAcbMaFifteen() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -2020,7 +2028,7 @@ public class Games { return result.substring(0, result.length() - 2); } - + public String checkAcbReighteen() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 69b923b..db015f7 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -303,98 +303,98 @@ public class GamesTest extends TestCase { String actual = testObject.checkPegiUnknown(); assertEquals(expected, actual); } - + public void test_checkEsrbE() { Games testObject = new Games(); String expected = "Rhythm Paradise, Tomodachi Life, Beautiful Katamari"; String actual = testObject.checkEsrbE(); assertEquals(expected, actual); } - + public void test_checkEsrbEten() { Games testObject = new Games(); String expected = "Super Smash Bros. Ultimate, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkEsrbEten(); assertEquals(expected, actual); } - + public void test_checkEsrbT() { Games testObject = new Games(); String expected = "Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Jet Set Radio Future, Atelier Totori Plus"; String actual = testObject.checkEsrbT(); assertEquals(expected, actual); } - + public void test_checkEsrbM() { Games testObject = new Games(); String expected = "Persona 5 Royal, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable"; String actual = testObject.checkEsrbM(); assertEquals(expected, actual); } - + public void test_checkCeroA() { Games testObject = new Games(); String expected = "Ratchet & Clank, Rhythm Paradise, Super Smash Bros. Ultimate, Jet Set Radio Future, Tomodachi Life, Beautiful Katamari, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkCeroA(); assertEquals(expected, actual); } - + public void test_checkCeroB() { Games testObject = new Games(); String expected = "Fire Emblem: Three Houses, Persona 3 Portable, Atelier Totori Plus"; String actual = testObject.checkCeroB(); assertEquals(expected, actual); } - + public void test_checkCeroC() { Games testObject = new Games(); String expected = "Persona 5 Royal, Astral Chain, Triangle Strategy, Breakdown"; String actual = testObject.checkCeroC(); assertEquals(expected, actual); } - + public void test_checkCeroD() { Games testObject = new Games(); String expected = "Yakuza: Dead Souls"; String actual = testObject.checkCeroD(); assertEquals(expected, actual); } - + public void test_checkCeroZ() { Games testObject = new Games(); String expected = "AI: The Somnium Files"; String actual = testObject.checkCeroZ(); assertEquals(expected, actual); } - + public void test_checkAcbG() { Games testObject = new Games(); String expected = "Rhythm Paradise, Beautiful Katamari"; String actual = testObject.checkAcbG(); assertEquals(expected, actual); } - + public void test_checkAcbPg() { Games testObject = new Games(); String expected = "Ratchet & Clank, Super Smash Bros. Ultimate, Tomodachi Life, Crash Bandicoot N. Sane Trilogy"; String actual = testObject.checkAcbPg(); assertEquals(expected, actual); } - + public void test_checkAcbM() { Games testObject = new Games(); String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Jet Set Radio Future"; String actual = testObject.checkAcbM(); assertEquals(expected, actual); } - + public void test_checkAcbMaFifteen() { Games testObject = new Games(); String expected = "Persona 5 Royal, Yakuza: Dead Souls, Breakdown, AI: The Somnium Files, Persona 3 Portable"; String actual = testObject.checkAcbMaFifteen(); assertEquals(expected, actual); } - + public void test_checkAcbReighteen() { Games testObject = new Games(); String expected = "Atelier Totori Plus"; From b3620280273172bb9325e6dc50fa0aed466fd62c Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 03:33:41 +0100 Subject: [PATCH 046/114] Added Javadoc to Console Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 49 +++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index fd677d7..05f3b92 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -8,10 +8,12 @@ import java.sql.Statement; public class Games { private String databaseURL = "jdbc:ucanaccess://GamesDB.accdb"; - + /** * Checks if the connection to the database can be established - * @return Returns true if it connects successfully and false if the connection fails. + * + * @return Returns true if it connects successfully and false if the connection + * fails. */ public boolean checkConnection() { try { @@ -24,9 +26,11 @@ public class Games { return false; } } - + /** - * Prints the whole table for those, who cannot access the Database for some reason. + * Prints the whole table for those, who cannot access the Database for some + * reason. + * * @return Returns a String of the whole table. */ public String printTable() { @@ -101,7 +105,12 @@ public class Games { // The substring removes the last New line in the String. return result.substring(0, result.length() - 1); } - + + /** + * Prints out all game names from the table. + * + * @return Returns a String with the game names + */ public String checkGames() { String result = ""; String query = "SELECT Game_Name FROM Games"; @@ -128,6 +137,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Prints out all of the consoles which are represented in the table. + * + * @return Returns a String with the consoles. + */ public String checkConsoles() { String result = ""; String query = "SELECT Game_Console FROM Games"; @@ -458,6 +472,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Prints out all of the games which are on a PlayStation console. + * + * @return Returns a String with the games from a PlayStation console. + */ public String checkConsolePlayStation() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -490,6 +509,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Prints out all of the games which are on a Nintendo console. + * + * @return Returns a String with the games from a Nintendo console. + */ public String checkConsoleNintendo() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -522,6 +546,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Prints out all of the games which are on a Xbox console. + * + * @return Returns a String with the games from a Xbox console. + */ public String checkConsoleXbox() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -554,6 +583,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Prints out all of the games which are multiplatform. + * + * @return Returns a String with the multiplatform games . + */ public String checkConsoleMultiplatform() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; @@ -586,6 +620,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Prints out all of the games which are on a Nintendo Switch. + * + * @return Returns a String with the games from a Nintendo Switch. + */ public String checkConsoleNintendoSwitch() { String result = ""; String query = "SELECT Game_Name, Game_Console FROM Games"; From f4f76e0c0b30fd110bc95afe8ddcdf3f29fbf2bf Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 03:56:15 +0100 Subject: [PATCH 047/114] Added Javadoc to Publisher Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 05f3b92..96ad914 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -191,6 +191,10 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game has the same publishers across Europe, Japan and North America + * @return Prints the games, that have the same publishers. + */ public String checkAllSamePublishers() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -222,7 +226,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + + /** + * Checks if the game has not the same publishers across Europe, Japan and North America + * @return Prints the games, that do not have the same publishers. + */ public String checkAllDifferentPublishers() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -728,6 +736,10 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game has the publisher Nintendo across Europe, Japan and North America + * @return Prints the games, that have Nintendo as a publisher. + */ public String checkPublisherNintendo() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -761,6 +773,10 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game has the publisher Sega across Europe, Japan and North America + * @return Prints the games, that have Sega as a publisher. + */ public String checkPublisherSega() { String result = ""; String query = "SELECT Game_Name, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -793,7 +809,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + + /** + * Checks the publishers that are available in the table across Europe, Japan and North America + * @return Prints the publishers from Europe, Japan and North America. + */ public String checkPublishers() { String result = ""; String query = "SELECT Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -972,7 +992,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + + /** + * Checks the publishers that are available in the table across Europe + * @return Prints the publishers from Europe. + */ public String checkPublishersEu() { String result = ""; String query = "SELECT Game_Publisher_EU FROM Games"; @@ -1015,7 +1039,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + + /** + * Checks the publishers that are available in the table across Japan + * @return Prints the publishers from Japan. + */ public String checkPublishersJp() { String result = ""; String query = "SELECT Game_Publisher_JP FROM Games"; @@ -1064,7 +1092,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + + /** + * Checks the publishers that are available in the table across North America + * @return Prints the publishers from North America. + */ public String checkPublishersNa() { String result = ""; String query = "SELECT Game_Publisher_NA FROM Games"; From 01a2deab538abb60fc7a792230f668fe8c7b829d Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:00:33 +0100 Subject: [PATCH 048/114] Added Javadoc to Developer Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 50 +++++++++++++++---- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 96ad914..38b747b 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -192,7 +192,9 @@ public class Games { } /** - * Checks if the game has the same publishers across Europe, Japan and North America + * Checks if the game has the same publishers across Europe, Japan and North + * America + * * @return Prints the games, that have the same publishers. */ public String checkAllSamePublishers() { @@ -226,9 +228,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + /** - * Checks if the game has not the same publishers across Europe, Japan and North America + * Checks if the game has not the same publishers across Europe, Japan and North + * America + * * @return Prints the games, that do not have the same publishers. */ public String checkAllDifferentPublishers() { @@ -263,6 +267,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the developers and the publishers are all the same. + * + * @return Prints the games, where publishers and developers are the same. + */ public String checkAllDifferentPublishersDeveloper() { String result = ""; String query = "SELECT Game_Name, Game_Developer, Game_Publisher_EU, Game_Publisher_JP, Game_Publisher_NA FROM Games"; @@ -663,6 +672,12 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the developer of the game is Atlus. + * + * @return Prints the games developed by Atlus. + */ + public String checkDeveloperAtlus() { String result = ""; String query = "SELECT Game_Name, Game_Developer FROM Games"; @@ -693,6 +708,12 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks the developers that are available in the table. + * + * @return Prints the developers from the table. + */ + public String checkDevelopers() { String result = ""; String query = "SELECT Game_Developer FROM Games"; @@ -737,7 +758,9 @@ public class Games { } /** - * Checks if the game has the publisher Nintendo across Europe, Japan and North America + * Checks if the game has the publisher Nintendo across Europe, Japan and North + * America + * * @return Prints the games, that have Nintendo as a publisher. */ public String checkPublisherNintendo() { @@ -774,7 +797,9 @@ public class Games { } /** - * Checks if the game has the publisher Sega across Europe, Japan and North America + * Checks if the game has the publisher Sega across Europe, Japan and North + * America + * * @return Prints the games, that have Sega as a publisher. */ public String checkPublisherSega() { @@ -809,9 +834,11 @@ public class Games { return result.substring(0, result.length() - 2); } - + /** - * Checks the publishers that are available in the table across Europe, Japan and North America + * Checks the publishers that are available in the table across Europe, Japan + * and North America + * * @return Prints the publishers from Europe, Japan and North America. */ public String checkPublishers() { @@ -992,9 +1019,10 @@ public class Games { return result.substring(0, result.length() - 2); } - + /** * Checks the publishers that are available in the table across Europe + * * @return Prints the publishers from Europe. */ public String checkPublishersEu() { @@ -1039,9 +1067,10 @@ public class Games { return result.substring(0, result.length() - 2); } - + /** * Checks the publishers that are available in the table across Japan + * * @return Prints the publishers from Japan. */ public String checkPublishersJp() { @@ -1092,9 +1121,10 @@ public class Games { return result.substring(0, result.length() - 2); } - + /** * Checks the publishers that are available in the table across North America + * * @return Prints the publishers from North America. */ public String checkPublishersNa() { From 54028aec7349ba04db6faafb83f29d685a6c91a4 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:05:58 +0100 Subject: [PATCH 049/114] Added Javadoc to Release Date Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 38b747b..6f9df1f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -306,6 +306,12 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the release dates are all the same across Europe, Japan, North + * America and Australia. + * + * @return Prints the games which have the same release dates. + */ public String checkAllSameReleaseDates() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -347,6 +353,12 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the release dates are not all the same across Europe, Japan, North + * America and Australia. + * + * @return Prints the games which do not have the same release dates. + */ public String checkAllDifferentReleaseDates() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -1176,6 +1188,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks the release dates that are unknown. + * + * @return Prints the games which do not have a release date. + */ public String checkReleaseDateUnknown() { String result = ""; String query = "SELECT Game_Name, Game_Release_AU FROM Games"; @@ -1206,6 +1223,12 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the release years are all the same across Europe, Japan, North + * America and Australia. + * + * @return Prints the games which have the same release year. + */ public String checkAllSameReleaseYear() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; @@ -1247,6 +1270,12 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the release year are not all the same across Europe, Japan, North + * America and Australia. + * + * @return Prints the games which do not have the same release year. + */ public String checkAllDifferentReleaseYear() { String result = ""; String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; From 62a52549c468261ffe7cd694bc38af6386946a04 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:09:07 +0100 Subject: [PATCH 050/114] Added Javadoc to Game Genre Category Methods --- .../main/java/de/hs_fulda/ciip/projjpn/Games.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 6f9df1f..1dc1f93 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -400,6 +400,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks the game genres that are available in the table + * + * @return Prints all the available game genres from the table. + */ public String checkGameGenres() { String result = ""; String query = "SELECT Game_Genre FROM Games"; @@ -443,6 +448,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the games genre is Action-Adventure + * + * @return Prints all the Action-Adventure games. + */ public String checkGameGenreActionAdventure() { String result = ""; String query = "SELECT Game_Name, Game_Genre FROM Games"; @@ -472,6 +482,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the games genre is RPG + * + * @return Prints all the RPG games. + */ public String checkGameGenreRPG() { String result = ""; String query = "SELECT Game_Name, Game_Genre FROM Games"; From 33bdfd87d0375681112cd4f8399423f9487b22c4 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:11:59 +0100 Subject: [PATCH 051/114] Added Javadoc to USK Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 1dc1f93..e80aba5 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1478,6 +1478,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is USK 0 + * + * @return Prints all the USK 0 games. + */ public String checkUskZero() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1507,6 +1512,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is USK 6 + * + * @return Prints all the USK 6 games. + */ public String checkUskSix() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1536,6 +1546,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is USK 12 + * + * @return Prints all the USK 12 games. + */ public String checkUskTwelve() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1565,6 +1580,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is USK 16 + * + * @return Prints all the USK 16 games. + */ public String checkUskSixteen() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; @@ -1594,6 +1614,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is USK 18 + * + * @return Prints all the USK 18 games. + */ public String checkUskEighteen() { String result = ""; String query = "SELECT Game_Name, Game_USK_Rating FROM Games"; From 7b30007fcd4dd62c38d151ec51f5ea9681bf9769 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:13:42 +0100 Subject: [PATCH 052/114] Added Javadoc to PEGI Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index e80aba5..9e8a0dd 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1648,6 +1648,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is PEGI 3. + * + * @return Prints all the PEGI 3 games. + */ public String checkPegiThree() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1677,6 +1682,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is PEGI 7. + * + * @return Prints all the PEGI 7 games. + */ public String checkPegiSeven() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1706,6 +1716,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is PEGI 12. + * + * @return Prints all the PEGI 12 games. + */ public String checkPegiTwelve() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1735,6 +1750,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is PEGI 16. + * + * @return Prints all the PEGI 16 games. + */ public String checkPegiSixteen() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1764,6 +1784,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is PEGI 18. + * + * @return Prints all the PEGI 18 games. + */ public String checkPegiEighteen() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; From caf99c8fea1d915757fe3eaf7e87ff9b5096fc2e Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:15:58 +0100 Subject: [PATCH 053/114] Added Javadoc to ESRB Category Methods + Fixed PEGI Javadoc --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 9e8a0dd..f0b095e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1818,6 +1818,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game has no PEGI rating. + * + * @return Prints all the games without a PEGI rating. + */ public String checkPegiUnknown() { String result = ""; String query = "SELECT Game_Name, Game_PEGI_Rating FROM Games"; @@ -1847,6 +1852,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ESRB E. + * + * @return Prints all the ESRB E games. + */ public String checkEsrbE() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1876,6 +1886,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ESRB E10+. + * + * @return Prints all the ESRB E10+ games. + */ public String checkEsrbEten() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1905,6 +1920,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ESRB T. + * + * @return Prints all the ESRB T games. + */ public String checkEsrbT() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; @@ -1934,6 +1954,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ESRB M. + * + * @return Prints all the ESRB M games. + */ public String checkEsrbM() { String result = ""; String query = "SELECT Game_Name, Game_ESRB_Rating FROM Games"; From b1f560051d24517fe738186adee39351c03114e4 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:18:05 +0100 Subject: [PATCH 054/114] Added Javadoc to CERO Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index f0b095e..635649d 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1988,6 +1988,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is CERO A. + * + * @return Prints all the CERO A games. + */ public String checkCeroA() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -2017,6 +2022,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is CERO B. + * + * @return Prints all the CERO B games. + */ public String checkCeroB() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -2046,6 +2056,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is CERO C. + * + * @return Prints all the CERO C games. + */ public String checkCeroC() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -2075,6 +2090,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is CERO D. + * + * @return Prints all the CERO D games. + */ public String checkCeroD() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; @@ -2104,6 +2124,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is CERO Z. + * + * @return Prints all the CERO Z games. + */ public String checkCeroZ() { String result = ""; String query = "SELECT Game_Name, Game_CERO_Rating FROM Games"; From bb4d54da8283c2ef6af774350b33b47d97f1d877 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:20:18 +0100 Subject: [PATCH 055/114] Added Javadoc to ACB Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 635649d..6198ab1 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -2158,6 +2158,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ACB G. + * + * @return Prints all the ACB G games. + */ public String checkAcbG() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -2187,6 +2192,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ACB PG. + * + * @return Prints all the ACB PG games. + */ public String checkAcbPg() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -2216,6 +2226,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ACB M. + * + * @return Prints all the ACB M games. + */ public String checkAcbM() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -2245,6 +2260,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ACB MA 15+. + * + * @return Prints all the ACB MA 15+ games. + */ public String checkAcbMaFifteen() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; @@ -2274,6 +2294,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is ACB R 18+. + * + * @return Prints all the ACB R 18+ games. + */ public String checkAcbReighteen() { String result = ""; String query = "SELECT Game_Name, Game_ACB_Rating FROM Games"; From 22482c59ff09677ed22c1d9a25697b16c52b48c6 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 04:23:56 +0100 Subject: [PATCH 056/114] Added Javadoc to Players Category Methods --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 6198ab1..e48823a 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1332,6 +1332,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is compatible with one player or more. + * + * @return Prints out the games that can be played with one or more players. + */ public String checkOnePlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1362,6 +1367,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is compatible with two players or more. + * + * @return Prints out the games that can be played with two or more players. + */ public String checkTwoPlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1391,6 +1401,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is compatible with four players or more. + * + * @return Prints out the games that can be played with four or more players. + */ public String checkFourPlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1420,6 +1435,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is compatible with eight players + * + * @return Prints out the games that can be played with eight players. + */ public String checkEightPlayer() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; @@ -1449,6 +1469,11 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the game is compatible with one player only. + * + * @return Prints out the games that can only be played alone. + */ public String checkOnePlayerOnly() { String result = ""; String query = "SELECT Game_Name, Game_Players FROM Games"; From 3511885503e57a6d55ed63b26197cc12c03f9a7f Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Tue, 15 Feb 2022 23:13:39 +0100 Subject: [PATCH 057/114] Fixed Print Method and Added Column Names --- projjpn/GamesDB.accdb | Bin 1015808 -> 1015808 bytes projjpn/GamesDB.laccdb | Bin 64 -> 0 bytes .../java/de/hs_fulda/ciip/projjpn/Games.java | 13 +++++++------ 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 projjpn/GamesDB.laccdb diff --git a/projjpn/GamesDB.accdb b/projjpn/GamesDB.accdb index e67a55652846dc806f2bbac3ea7ba361b11006b5..1e9a2f9bfa7f641ec006b9f3b5d523ef0ace780c 100644 GIT binary patch delta 134 zcmZo@uxn_r+rY%fWX`f#fbRq2WCcE+CV_1Nj3@Y5@75oG_;mVNIYvpw)b{6cj6lo; z#LPgtI zF*6XeY=17tD!q`0liMfE(T4#D;u)q39AMqE{l)>-OKcN2@U^cx&I-hAK+F!r96-zo U#9Tnk4a7V^%)5QnalWt}0L%e0_5c6? diff --git a/projjpn/GamesDB.laccdb b/projjpn/GamesDB.laccdb deleted file mode 100644 index 5a03e0388674df9c401c0cef4dc38d6267f63454..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 64 icmZ>94fYQ45771WG4%0wG-gmh1CA-VnRytZ2t@#)Zwp2M diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index e48823a..994a3c0 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -42,15 +42,16 @@ public class Games { Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(query); + result += "Name, Console, Developer, Publisher EU, Publisher JP, Publisher NA, Genre, Release EU, Release JP, Release NA, Release AU, USK Rating, PEGI Rating, ESRB Rating, CERO Rating, ACB Rating, Players\n\n"; + while (resultSet.next()) { - int id = resultSet.getInt("Game_ID"); String gameName = resultSet.getString("Game_Name"); String gameConsole = resultSet.getString("Game_Console"); String gameDeveloper = resultSet.getString("Game_Developer"); - String gamePublisherEu = resultSet.getString("Game_Developer"); - String gamePublisherJp = resultSet.getString("Game_Console"); - String gamePublisherNa = resultSet.getString("Game_Console"); + String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); + String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); + String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); String gameGenre = resultSet.getString("Game_Genre"); String gameReleaseEu = resultSet.getString("Game_Release_EU"); @@ -81,13 +82,13 @@ public class Games { String gamePlayers = resultSet.getString("Game_Players"); if (gamePegi != 0) { - result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + result += gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + gameUsk + ", " + gamePegi + ", " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + gamePlayers + "\n"; } else { - result += id + ": " + gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + result += gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + gameUsk + ", Unknown, " + gameEsrb + ", " + gameCero + ", " From e0f80b9ae742b4cc2d29e37dcc40e3fd67560092 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 02:33:08 +0100 Subject: [PATCH 058/114] Added: Birthdate class, basic Birthdate Test --- .../de/hs_fulda/ciip/projjpn/Birthdate.java | 45 +++++++++++++++++++ .../hs_fulda/ciip/projjpn/BirthdateTest.java | 21 +++++++++ 2 files changed, 66 insertions(+) create mode 100644 projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java create mode 100644 projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java new file mode 100644 index 0000000..ad05fb7 --- /dev/null +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -0,0 +1,45 @@ +package de.hs_fulda.ciip.projjpn; + +public class Birthdate { + private int day; + private int month; + private int year; + + public Birthdate(int d, int m, int y) { + day = d; + month = m; + year = y; + } + + public int getDay() { + return day; + } + + public void setDay(int day) { + this.day = day; + } + + public int getMonth() { + return month; + } + + public void setMonth(int month) { + this.month = month; + } + + public int getYear() { + return year; + } + + public void setYear(int year) { + this.year = year; + } + + /** + * @return Date Format TT.DD.YYYY + */ + public String toString() { + return day + "." + month + "." + year; + } + +} diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java new file mode 100644 index 0000000..6461784 --- /dev/null +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java @@ -0,0 +1,21 @@ +package de.hs_fulda.ciip.projjpn; + +import junit.framework.TestCase; + +public class BirthdateTest extends TestCase { + + /** + * Test method for {@link de.hs_fulda.ciip.projjpn.Birthdate#toString()}. + */ + public final void testToString() { + + // Given + Birthdate b = new Birthdate(1, 1, 2000); + + // When + String expectedDate = "1.1.2000"; + + // Then + assertEquals(expectedDate, b.toString()); + } +} From 7ae7650c2d4755f5f399b90dfbe09a70cbacc5c1 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 02:39:46 +0100 Subject: [PATCH 059/114] Cleanup: Birthday class --- .../de/hs_fulda/ciip/projjpn/Birthdate.java | 30 ++++--------------- .../hs_fulda/ciip/projjpn/BirthdateTest.java | 4 +-- 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java index ad05fb7..14062d7 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -11,35 +11,17 @@ public class Birthdate { year = y; } - public int getDay() { - return day; - } - - public void setDay(int day) { - this.day = day; - } - - public int getMonth() { - return month; - } - - public void setMonth(int month) { - this.month = month; - } - - public int getYear() { - return year; - } - - public void setYear(int year) { - this.year = year; - } - /** * @return Date Format TT.DD.YYYY */ public String toString() { return day + "." + month + "." + year; } + + public void changeBirthdate(int d, int m, int y) { + day = d; + month = m; + year = y; + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java index 6461784..312a870 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java @@ -7,7 +7,7 @@ public class BirthdateTest extends TestCase { /** * Test method for {@link de.hs_fulda.ciip.projjpn.Birthdate#toString()}. */ - public final void testToString() { + public void testToString() { // Given Birthdate b = new Birthdate(1, 1, 2000); @@ -17,5 +17,5 @@ public class BirthdateTest extends TestCase { // Then assertEquals(expectedDate, b.toString()); - } + } } From b1cda58c660f94a4b27cdec7ab55ce3f5289c905 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 02:49:52 +0100 Subject: [PATCH 060/114] Added: Change Date of Birthday --- .../de/hs_fulda/ciip/projjpn/Birthdate.java | 12 ++++++++++ .../hs_fulda/ciip/projjpn/BirthdateTest.java | 22 ++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java index 14062d7..f000456 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -10,6 +10,18 @@ public class Birthdate { month = m; year = y; } + + public int getDay() { + return day; + } + + public int getMonth() { + return month; + } + + public int getYear() { + return year; + } /** * @return Date Format TT.DD.YYYY diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java index 312a870..23de888 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java @@ -4,9 +4,6 @@ import junit.framework.TestCase; public class BirthdateTest extends TestCase { - /** - * Test method for {@link de.hs_fulda.ciip.projjpn.Birthdate#toString()}. - */ public void testToString() { // Given @@ -18,4 +15,23 @@ public class BirthdateTest extends TestCase { // Then assertEquals(expectedDate, b.toString()); } + + public void test_changeBirthdate() { + // Given + Birthdate b = new Birthdate(1, 1, 2000); + + // Change Birthdate + b.changeBirthdate(2, 3, 2001); + + // When + int expectedDay = 2; + int expectedMonth = 3; + int expectedYear = 2001; + + // Then + assertEquals(2, b.getDay()); + assertEquals(3, b.getMonth()); + assertEquals(2001, b.getYear()); + } + } From 64fbd340311bae982493ee3efd428803829f87b4 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 02:53:32 +0100 Subject: [PATCH 061/114] Refactoring: Fixing Comments in Birthdate --- .../src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java index f000456..f3d5b81 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -24,12 +24,18 @@ public class Birthdate { } /** - * @return Date Format TT.DD.YYYY + * @return Date Format DD.MM.YYYY */ public String toString() { return day + "." + month + "." + year; } + /** + * + * @param d Day + * @param m Month + * @param y Year + */ public void changeBirthdate(int d, int m, int y) { day = d; month = m; From e7fe6b37ff44a0acc959dba023c8de4146e6a10e Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 03:06:27 +0100 Subject: [PATCH 062/114] Added: User class, basic attributes --- projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java new file mode 100644 index 0000000..d8ce08a --- /dev/null +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java @@ -0,0 +1,9 @@ +package de.hs_fulda.ciip.projjpn; + +public class User { + String firstName; + String lastName; + String nickName; + String eMail; + Birthdate birthdate; +} From 9061e3df654657ae41965dbcd4143ff3c5c9121d Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 03:24:08 +0100 Subject: [PATCH 063/114] Added: Customers class for managing Users, Test if a nickname is available --- .../de/hs_fulda/ciip/projjpn/Customers.java | 15 ++++++++++++++ .../hs_fulda/ciip/projjpn/CustomersTest.java | 20 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java create mode 100644 projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java new file mode 100644 index 0000000..f495ca9 --- /dev/null +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -0,0 +1,15 @@ +package de.hs_fulda.ciip.projjpn; + +import java.util.HashMap; + +public class Customers { + HashMap pool = new HashMap(); + + public boolean nickNameAvailable(String nickname) { + User u = pool.get(nickname); + if (null == u) { + return true; + } + return false; + } +} diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java new file mode 100644 index 0000000..5b6a59d --- /dev/null +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -0,0 +1,20 @@ +package de.hs_fulda.ciip.projjpn; + +import junit.framework.TestCase; + +public class CustomersTest extends TestCase { + + public void test_nicknameIsFree() { + // Given + Customers customers = new Customers(); + String availableNickname = "beastMaster64"; + + // When + boolean nicknameIsAvailable = customers.nickNameAvailable(availableNickname); + + // Then + assertTrue(nicknameIsAvailable); + + } + +} From edc3cd2c14280d045a764c169834dafdb94295f9 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 04:14:37 +0100 Subject: [PATCH 064/114] Added: Registering a User + Basic Test --- .../de/hs_fulda/ciip/projjpn/Customers.java | 8 +++++++ .../java/de/hs_fulda/ciip/projjpn/User.java | 20 ++++++++++++++++ .../hs_fulda/ciip/projjpn/CustomersTest.java | 23 ++++++++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index f495ca9..18059b9 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -12,4 +12,12 @@ public class Customers { } return false; } + + public User registerUser(User user) { + return pool.putIfAbsent(user.nickName, user); + } + + public User getByNickname(String nickname) { + return pool.get(nickname); + } } diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java index d8ce08a..dfac66c 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java @@ -6,4 +6,24 @@ public class User { String nickName; String eMail; Birthdate birthdate; + + public User(String nickName) { + this.nickName = nickName; + } + + public String getFirstName() { + return firstName; + } + public String getLastName() { + return lastName; + } + public String getNickName() { + return nickName; + } + public String geteMail() { + return eMail; + } + public Birthdate getBirthdate() { + return birthdate; + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 5b6a59d..d4e24d4 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -14,7 +14,28 @@ public class CustomersTest extends TestCase { // Then assertTrue(nicknameIsAvailable); + } + + public void test_registerUser() { + // Given + Customers customers = new Customers(); + String expectedNickNameInput = "Mougli"; + User expectedNewUser = new User(expectedNickNameInput); + + // Add a user + customers.registerUser(expectedNewUser); + // Get the expected User + User expectedUser = customers.getByNickname(expectedNickNameInput); + assertTrue(null != expectedNewUser); + String expectedNickNameGotBack = expectedUser.nickName; + + System.out.println(expectedNickNameGotBack); + // When + boolean userRegistered = expectedNickNameGotBack.equals(expectedNickNameInput); + + // Then + assertTrue(userRegistered); } - + } From 08664de5b52d87b550414b0b674ec17b76fb590d Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 04:24:36 +0100 Subject: [PATCH 065/114] Refactoring: Rename Test for registering a user --- .../src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index d4e24d4..833dfd0 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -16,7 +16,7 @@ public class CustomersTest extends TestCase { assertTrue(nicknameIsAvailable); } - public void test_registerUser() { + public void test_registerSingleUser() { // Given Customers customers = new Customers(); String expectedNickNameInput = "Mougli"; From 8bc8925dfb1a95470df967275b1d1129e763482a Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 04:26:29 +0100 Subject: [PATCH 066/114] Remove: Deprecated System Out Print --- .../src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 833dfd0..33b6cba 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -30,7 +30,6 @@ public class CustomersTest extends TestCase { assertTrue(null != expectedNewUser); String expectedNickNameGotBack = expectedUser.nickName; - System.out.println(expectedNickNameGotBack); // When boolean userRegistered = expectedNickNameGotBack.equals(expectedNickNameInput); From a5d54b0ea60673b511c23c830bd4f2c84efe60ee Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 04:38:33 +0100 Subject: [PATCH 067/114] Added: Register Multiple Users Test --- .../hs_fulda/ciip/projjpn/CustomersTest.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 33b6cba..e89d5e2 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -37,4 +37,39 @@ public class CustomersTest extends TestCase { assertTrue(userRegistered); } + /** + * Register multiple Users and then search for them in the same order. + */ + public void test_registerMultipleUsers() { + // Given + Customers customers = new Customers(); + String[] expectedNickNamesInput = {"Mougli", "Tarkan", "beastMaster64", "BlaBlaPew", "MuchDoge_321"}; + User[] expectedNewUsers = new User[expectedNickNamesInput.length]; + + for (int i = 0; i < expectedNickNamesInput.length; i++) { + // Create user + expectedNewUsers[i] = new User(expectedNickNamesInput[i]); + + // Add user + customers.registerUser(expectedNewUsers[i]); + } + + // Get the expected Users + User foundUser; + String expectedNickNameGotBack; + boolean userRegistered; + + for (int i = 0; i < expectedNickNamesInput.length; i++) { + // Get user + foundUser = customers.getByNickname(expectedNickNamesInput[i]); + assertTrue(null != foundUser); + + // When + expectedNickNameGotBack = foundUser.nickName; + userRegistered = expectedNickNameGotBack.equals(expectedNickNamesInput[i]); + + // Then + assertTrue(userRegistered); + } + } } From 59ba7db3a512154716b96d05cc98ae704fa16de3 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 04:46:15 +0100 Subject: [PATCH 068/114] Added: Nickname allready taken test --- .../de/hs_fulda/ciip/projjpn/CustomersTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index e89d5e2..2816fc5 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -16,6 +16,22 @@ public class CustomersTest extends TestCase { assertTrue(nicknameIsAvailable); } + public void test_nicknameIsTaken() { + // Given + Customers customers = new Customers(); + String availableNickname = "beastMaster64"; + String takenNickname = "beastMaster64"; + User userToRegister = new User(availableNickname); + + customers.registerUser(userToRegister); + + // When + boolean nicknameIsTaken = !customers.nickNameAvailable(availableNickname); + + // Then + assertTrue(nicknameIsTaken); + } + public void test_registerSingleUser() { // Given Customers customers = new Customers(); From fa83071186ad48b41819bc2a2ed1033e4f803cdd Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 05:04:22 +0100 Subject: [PATCH 069/114] Added: Remove a registered user + Basic Test --- .../de/hs_fulda/ciip/projjpn/Customers.java | 4 ++++ .../hs_fulda/ciip/projjpn/CustomersTest.java | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index 18059b9..c56cde6 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -17,6 +17,10 @@ public class Customers { return pool.putIfAbsent(user.nickName, user); } + public User deleteUser(String userNickname) { + return pool.remove(userNickname); + } + public User getByNickname(String nickname) { return pool.get(nickname); } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 2816fc5..2df7fd8 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -88,4 +88,22 @@ public class CustomersTest extends TestCase { assertTrue(userRegistered); } } + + public void test_removeRegisteredUser() { + // Given + Customers customers = new Customers(); + String userToRemove = "beastMaster64"; + User userToRegister = new User("beastMaster64"); + customers.registerUser(userToRegister); + + // When + boolean userExists = !customers.nickNameAvailable(userToRemove); + assertTrue(userExists); + + // Then + User removedUser = customers.deleteUser(userToRemove); + assertEquals(userToRemove, removedUser.nickName); + + } + } From 012ad38d16eb2724ee39375f77aa98eea1a3e2d3 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 05:20:10 +0100 Subject: [PATCH 070/114] Added: Count Registered Users and Test --- .../de/hs_fulda/ciip/projjpn/Customers.java | 4 ++++ .../de/hs_fulda/ciip/projjpn/CustomersTest.java | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index c56cde6..174016e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -24,4 +24,8 @@ public class Customers { public User getByNickname(String nickname) { return pool.get(nickname); } + + public int getCountOfUsers() { + return pool.size(); + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 2df7fd8..1a2bf5f 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -105,5 +105,22 @@ public class CustomersTest extends TestCase { assertEquals(userToRemove, removedUser.nickName); } + + public void test_registerAndCountUsers() { + // Given + Customers customers = new Customers(); + int expectedRegisteredUsers = 20; + int actualRegisteredUsers = -1; + String nickname; + + // Prepare + for(int i = 0, j = 1; i < expectedRegisteredUsers; i++, j++) { + nickname = "beastMaster_" + j; + customers.registerUser(new User(nickname)); + } + actualRegisteredUsers = customers.getCountOfUsers(); + assertEquals(expectedRegisteredUsers, actualRegisteredUsers); + + } } From 66dc3dea9ce7b67e7e83b283a788cacaa8583aea Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 05:37:26 +0100 Subject: [PATCH 071/114] Added: Create register and check user data - Test --- .../java/de/hs_fulda/ciip/projjpn/User.java | 12 ++++++ .../hs_fulda/ciip/projjpn/CustomersTest.java | 39 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java index dfac66c..3c1fc87 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java @@ -7,6 +7,18 @@ public class User { String eMail; Birthdate birthdate; + public User(String firstName, + String lastName, + String nickName, + String eMail, + Birthdate birthdate) { + this.firstName = firstName; + this.lastName = lastName; + this.nickName = nickName; + this.eMail = eMail; + this.birthdate = birthdate; + } + public User(String nickName) { this.nickName = nickName; } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 1a2bf5f..f9228c1 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -120,7 +120,46 @@ public class CustomersTest extends TestCase { } actualRegisteredUsers = customers.getCountOfUsers(); assertEquals(expectedRegisteredUsers, actualRegisteredUsers); + } + + public void test_createRegisterAndCheckUserData() { + // Given + Customers customers = new Customers(); + + String firstName = "Mia"; + String lastName = "Muster"; + String nickName = "harley"; + String eMail = "mia@muster.de"; + Birthdate birthdate = new Birthdate(30, 12, 1997); + User userToCheck = new User(firstName, lastName, nickName, eMail, birthdate); + + // Register User + customers.registerUser(userToCheck); + + User gotUser = customers.getByNickname(nickName); + + // When + boolean foundUser = null != gotUser; + + // Then + assertTrue(foundUser); + + // When + boolean correctFirstName = "Mia".equals(gotUser.getFirstName()); + boolean correctLastName = "Muster".equals(gotUser.getLastName()); + boolean correctNickName = "harley".equals(gotUser.getNickName()); + boolean correctEMail = "mia@muster.de".equals(gotUser.geteMail()); + boolean correctBirthdate = birthdate.toString().equals(gotUser.birthdate.toString()); + + // Then + assertTrue(correctFirstName); + assertTrue(correctLastName); + assertTrue(correctNickName); + assertTrue(correctEMail); + assertTrue(correctBirthdate); + } + } From 866807f244b3f07e13e4ece43941d62bbb6ede27 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 05:59:07 +0100 Subject: [PATCH 072/114] Refactoring: Optimized Structure of Tests --- .../hs_fulda/ciip/projjpn/CustomersTest.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index f9228c1..92669c7 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -26,10 +26,10 @@ public class CustomersTest extends TestCase { customers.registerUser(userToRegister); // When - boolean nicknameIsTaken = !customers.nickNameAvailable(availableNickname); + boolean nicknameIsTaken = customers.nickNameAvailable(availableNickname); // Then - assertTrue(nicknameIsTaken); + assertFalse(nicknameIsTaken); } public void test_registerSingleUser() { @@ -43,7 +43,8 @@ public class CustomersTest extends TestCase { // Get the expected User User expectedUser = customers.getByNickname(expectedNickNameInput); - assertTrue(null != expectedNewUser); + // + assertNotNull(expectedNewUser); String expectedNickNameGotBack = expectedUser.nickName; // When @@ -78,7 +79,7 @@ public class CustomersTest extends TestCase { for (int i = 0; i < expectedNickNamesInput.length; i++) { // Get user foundUser = customers.getByNickname(expectedNickNamesInput[i]); - assertTrue(null != foundUser); + assertNotNull(foundUser); // When expectedNickNameGotBack = foundUser.nickName; @@ -97,8 +98,8 @@ public class CustomersTest extends TestCase { customers.registerUser(userToRegister); // When - boolean userExists = !customers.nickNameAvailable(userToRemove); - assertTrue(userExists); + boolean userExists = customers.nickNameAvailable(userToRemove); + assertFalse(userExists); // Then User removedUser = customers.deleteUser(userToRemove); @@ -139,11 +140,7 @@ public class CustomersTest extends TestCase { User gotUser = customers.getByNickname(nickName); - // When - boolean foundUser = null != gotUser; - - // Then - assertTrue(foundUser); + assertNotNull(gotUser); // When boolean correctFirstName = "Mia".equals(gotUser.getFirstName()); From 8b877b06216f354bfe296274eb4a0a55601ef11a Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 06:01:29 +0100 Subject: [PATCH 073/114] Refactoring: Minor Renaming in User class --- projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java | 2 +- .../src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java index 3c1fc87..710e097 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/User.java @@ -32,7 +32,7 @@ public class User { public String getNickName() { return nickName; } - public String geteMail() { + public String getEMail() { return eMail; } public Birthdate getBirthdate() { diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 92669c7..110d7ad 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -146,7 +146,7 @@ public class CustomersTest extends TestCase { boolean correctFirstName = "Mia".equals(gotUser.getFirstName()); boolean correctLastName = "Muster".equals(gotUser.getLastName()); boolean correctNickName = "harley".equals(gotUser.getNickName()); - boolean correctEMail = "mia@muster.de".equals(gotUser.geteMail()); + boolean correctEMail = "mia@muster.de".equals(gotUser.getEMail()); boolean correctBirthdate = birthdate.toString().equals(gotUser.birthdate.toString()); // Then From b3833f62b84c698cae8a7cf11b003fc12c9cc985 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 06:22:48 +0100 Subject: [PATCH 074/114] Added: Birthday Validation + Test --- .../de/hs_fulda/ciip/projjpn/Birthdate.java | 14 +++++++++++++ .../hs_fulda/ciip/projjpn/BirthdateTest.java | 7 +++++++ .../de/hs_fulda/ciip/projjpn/UserTest.java | 20 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java index f3d5b81..ab9af4c 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -41,5 +41,19 @@ public class Birthdate { month = m; year = y; } + + public boolean isValid(int DD, int MM, int YYYY) { + if (DD < 1) { + return false; + } + if (MM < 1) { + return false; + } + if (YYYY < 1) { + return false; + } + + return true; + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java index 23de888..8b3ea01 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java @@ -34,4 +34,11 @@ public class BirthdateTest extends TestCase { assertEquals(2001, b.getYear()); } + public void test_rejectInvalidBirthday() { + Birthdate birthdate = new Birthdate(0, 0, 0); + boolean expectedResult = false; + boolean gotResult = birthdate.isValid(0, 0, 0); + assertEquals(expectedResult, gotResult); + } + } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java new file mode 100644 index 0000000..419153e --- /dev/null +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java @@ -0,0 +1,20 @@ +package de.hs_fulda.ciip.projjpn; + +import junit.framework.TestCase; + +public class UserTest extends TestCase { + public void test_initAndGetBirthdayOfUser() { + // Given + Customers customers = new Customers(); + String firstName = "Mia"; + String lastName = "Muster"; + String nickName = "harley"; + String eMail = "mia@muster.de"; + int DD = 30, MM = 12, YYYY = 1997; + String expectedBirthdate = new Birthdate(DD, MM, YYYY).toString(); + + User userToCheck = new User(firstName, lastName, nickName, eMail, new Birthdate(DD, MM, YYYY)); + String gotBirthdate = userToCheck.getBirthdate().toString(); + boolean gotExpectedBirthdayBack = gotBirthdate.equals(expectedBirthdate); + } +} From 66a8e380b06f8dff28e5871ab298598fb916b7f2 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 06:41:45 +0100 Subject: [PATCH 075/114] Added: Better Test Coverage for the Birthday class --- .../de/hs_fulda/ciip/projjpn/Birthdate.java | 6 +++--- .../hs_fulda/ciip/projjpn/BirthdateTest.java | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java index ab9af4c..32ed901 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -43,13 +43,13 @@ public class Birthdate { } public boolean isValid(int DD, int MM, int YYYY) { - if (DD < 1) { + if (DD < 1 || DD > 31) { return false; } - if (MM < 1) { + if (MM < 1 || MM > 12) { return false; } - if (YYYY < 1) { + if (YYYY < 1990 || YYYY > 2022) { return false; } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java index 8b3ea01..b584b58 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/BirthdateTest.java @@ -39,6 +39,25 @@ public class BirthdateTest extends TestCase { boolean expectedResult = false; boolean gotResult = birthdate.isValid(0, 0, 0); assertEquals(expectedResult, gotResult); + + gotResult = birthdate.isValid(32, 13, 1990); + assertEquals(expectedResult, gotResult); + + gotResult = birthdate.isValid(31, 0, 1980); + assertEquals(expectedResult, gotResult); + + gotResult = birthdate.isValid(31, 13, 1980); + assertEquals(expectedResult, gotResult); + + gotResult = birthdate.isValid(1, 1, 3000); + assertEquals(expectedResult, gotResult); + + gotResult = birthdate.isValid(1, 1, 1900); + assertEquals(expectedResult, gotResult); + + expectedResult = true; + gotResult = birthdate.isValid(1, 5, 2020); + assertEquals(expectedResult, gotResult); } } From 866ff0de7dcc3b1c315f9ebc0233b0e674e8ebcd Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 16:23:19 +0100 Subject: [PATCH 076/114] Added: Item class + Basic InStock Test --- .../main/java/de/hs_fulda/ciip/projjpn/Item.java | 15 +++++++++++++++ .../java/de/hs_fulda/ciip/projjpn/ItemTest.java | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java create mode 100644 projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java new file mode 100644 index 0000000..8b6cc9f --- /dev/null +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -0,0 +1,15 @@ +package de.hs_fulda.ciip.projjpn; + +public class Item { + + // price + // customerReview + // productTitle + // description + // tags + int availability = 0; + + public boolean inStock() { + return availability > 0; + } +} diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java new file mode 100644 index 0000000..c6467ba --- /dev/null +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -0,0 +1,16 @@ +package de.hs_fulda.ciip.projjpn; + +import junit.framework.TestCase; + +public class ItemTest extends TestCase { + public void test_ItemNotInStock() { + // Given + Item item = new Item(); + + // When + boolean notInStock = item.inStock(); + + // Then + assertFalse(notInStock); + } +} From 343f408977e991278adb2a957acc63e68a94e42c Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 16:28:54 +0100 Subject: [PATCH 077/114] Added: Update Availability Test --- .../src/main/java/de/hs_fulda/ciip/projjpn/Item.java | 4 ++++ .../test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index 8b6cc9f..44fc02d 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -12,4 +12,8 @@ public class Item { public boolean inStock() { return availability > 0; } + + public void updateAvailability(int newAmount) { + availability = newAmount; + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index c6467ba..1ba1359 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -13,4 +13,15 @@ public class ItemTest extends TestCase { // Then assertFalse(notInStock); } + + public void test_ItemInStock() { + // Given + Item item = new Item(); + item.updateAvailability(1); + // When + boolean inStock = item.inStock(); + + // Then + assertTrue(inStock); + } } From b772bac368e3f347cfc165d5eb901ac1afb158ac Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 16:45:08 +0100 Subject: [PATCH 078/114] Added: Price Of Multiple Identical Items Test --- .../java/de/hs_fulda/ciip/projjpn/Item.java | 12 +++++++++-- .../de/hs_fulda/ciip/projjpn/ItemTest.java | 21 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index 44fc02d..c92998d 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -2,12 +2,12 @@ package de.hs_fulda.ciip.projjpn; public class Item { - // price + private int price; // customerReview // productTitle // description // tags - int availability = 0; + private int availability = 0; public boolean inStock() { return availability > 0; @@ -16,4 +16,12 @@ public class Item { public void updateAvailability(int newAmount) { availability = newAmount; } + + public void updatePrice(int price) { + this.price = price; + } + + public int getCurrentPrice() { + return price; + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 1ba1359..d06afe2 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -24,4 +24,25 @@ public class ItemTest extends TestCase { // Then assertTrue(inStock); } + + public void test_priceOfMultipleIdenticalItems() { + // Given + Item item = new Item(); + int quantity = 3; + int price = 5; + item.updateAvailability(quantity); + item.updatePrice(price); + + // When + int expectedPrice = quantity * price; + + // Then + int actualPrice = 0; + for(int i = 0; i < quantity; i++) { + actualPrice += item.getCurrentPrice(); + } + + + assertEquals(expectedPrice, actualPrice); + } } From f6511309b118cb72abed38214eb52d4865a5ee19 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 16:55:28 +0100 Subject: [PATCH 079/114] Optimizing: Price of Item is float now --- projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java | 6 +++--- .../src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index c92998d..3311467 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -2,7 +2,7 @@ package de.hs_fulda.ciip.projjpn; public class Item { - private int price; + private float price; // customerReview // productTitle // description @@ -17,11 +17,11 @@ public class Item { availability = newAmount; } - public void updatePrice(int price) { + public void updatePrice(float price) { this.price = price; } - public int getCurrentPrice() { + public float getCurrentPrice() { return price; } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index d06afe2..cc367c9 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -29,20 +29,19 @@ public class ItemTest extends TestCase { // Given Item item = new Item(); int quantity = 3; - int price = 5; + float price = 5; item.updateAvailability(quantity); item.updatePrice(price); // When - int expectedPrice = quantity * price; + float expectedPrice = quantity * price; // Then - int actualPrice = 0; + float actualPrice = 0; for(int i = 0; i < quantity; i++) { actualPrice += item.getCurrentPrice(); } - assertEquals(expectedPrice, actualPrice); } } From 53b792fcc559c1cd9357d55d6f076cb9fd9a0fae Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 17:15:10 +0100 Subject: [PATCH 080/114] Added: Build Complete Item Basic Test --- .../java/de/hs_fulda/ciip/projjpn/Item.java | 23 ++++++++++++++----- .../de/hs_fulda/ciip/projjpn/ItemTest.java | 7 ++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index 3311467..d9828ef 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -1,13 +1,24 @@ package de.hs_fulda.ciip.projjpn; public class Item { - - private float price; - // customerReview - // productTitle - // description - // tags + // @ToDo: customerReview + private String productTitle; + private String description; private int availability = 0; + private float price; + + public Item() { + } + + public Item(String titel, + String description, + int quantity, + float price) { + this.productTitle = titel; + this.description = description; + this.availability = quantity; + this.price = price; + } public boolean inStock() { return availability > 0; diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index cc367c9..6abf9c3 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -44,4 +44,11 @@ public class ItemTest extends TestCase { assertEquals(expectedPrice, actualPrice); } + + public void test_buildCompleteItem() { + // Given + Item item = new Item("Logitec Maus", "Gaming Maus fuer Fortgeschrittene.", 10, 69.99f); + + assertNotNull(item); + } } From b9c6c11abf9176fa5a28ade0a3334f594812b71e Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 17:18:31 +0100 Subject: [PATCH 081/114] Minor Refactoring of test_buildCompleteItem() --- .../src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 6abf9c3..2a94571 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -47,7 +47,11 @@ public class ItemTest extends TestCase { public void test_buildCompleteItem() { // Given - Item item = new Item("Logitec Maus", "Gaming Maus fuer Fortgeschrittene.", 10, 69.99f); + String expectedTitel = "Logitec Maus"; + String expectedDescription = "Gaming Maus fuer Fortgeschrittene."; + int expectedQuantity = 10; + float expectedPrice = 69.99f; + Item item = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); assertNotNull(item); } From a3b16658752ed0af17132f5ea8e453e775f9ad28 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 17:28:11 +0100 Subject: [PATCH 082/114] Extended: test_buildCompleteItem() by validDescription Test --- .../src/main/java/de/hs_fulda/ciip/projjpn/Item.java | 12 ++++++++++++ .../test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 11 +++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index d9828ef..6b9c5f1 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -24,6 +24,10 @@ public class Item { return availability > 0; } + public float getCurrentStock() { + return availability; + } + public void updateAvailability(int newAmount) { availability = newAmount; } @@ -35,4 +39,12 @@ public class Item { public float getCurrentPrice() { return price; } + + public String getTitel() { + return this.productTitle; + } + + public String getDescription() { + return this.description; + } } diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 2a94571..6b2f0b2 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -51,8 +51,15 @@ public class ItemTest extends TestCase { String expectedDescription = "Gaming Maus fuer Fortgeschrittene."; int expectedQuantity = 10; float expectedPrice = 69.99f; - Item item = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); - assertNotNull(item); + // When + Item itemNotNull = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); + + // Then + assertNotNull(itemNotNull); + + // When + boolean validDescription = itemNotNull.getDescription().equals(expectedDescription); + assertTrue(validDescription); } } From de0afe0f23debda6379add3dc2e6c27d4e02dc56 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 17:28:51 +0100 Subject: [PATCH 083/114] Extended: test_buildCompleteItem() by validTitle Test --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 6b2f0b2..6583144 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -61,5 +61,8 @@ public class ItemTest extends TestCase { // When boolean validDescription = itemNotNull.getDescription().equals(expectedDescription); assertTrue(validDescription); + + boolean validTitle = itemNotNull.getTitel().equals(expectedTitel); + assertTrue(validTitle); } } From a7fdc436a92cc37c8621c25899dac79ff5478370 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 17:29:30 +0100 Subject: [PATCH 084/114] Extended: test_buildCompleteItem() by validQuantity Test --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 6583144..307b192 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -64,5 +64,8 @@ public class ItemTest extends TestCase { boolean validTitle = itemNotNull.getTitel().equals(expectedTitel); assertTrue(validTitle); + + boolean validQuantity = itemNotNull.getCurrentStock() == expectedQuantity; + assertTrue(validQuantity); } } From 235e72665a1e65f4e7b7b60792ff9329a17e524f Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 17:30:39 +0100 Subject: [PATCH 085/114] Extended: test_buildCompleteItem() by validPrice Test --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 307b192..4a5dcc4 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -67,5 +67,8 @@ public class ItemTest extends TestCase { boolean validQuantity = itemNotNull.getCurrentStock() == expectedQuantity; assertTrue(validQuantity); + + boolean validPrice = itemNotNull.getCurrentPrice() == expectedPrice; + assertTrue(validPrice); } } From 90025123e994319eeede498e5e092a249bf93ce3 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 21:48:07 +0100 Subject: [PATCH 086/114] Added: Insert Item into Warehouse + Basic Test --- .../de/hs_fulda/ciip/projjpn/Warehouse.java | 15 +++++++++ .../hs_fulda/ciip/projjpn/WarehouseTest.java | 31 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java create mode 100644 projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java new file mode 100644 index 0000000..3a13f09 --- /dev/null +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java @@ -0,0 +1,15 @@ +package de.hs_fulda.ciip.projjpn; + +import java.util.HashMap; + +public class Warehouse { + protected HashMap pool = new HashMap(); + + + + + public Item insertItem(Item item) { + return pool.putIfAbsent(item.getTitel(), item); + } + +} \ No newline at end of file diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java new file mode 100644 index 0000000..ef10f59 --- /dev/null +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java @@ -0,0 +1,31 @@ +package de.hs_fulda.ciip.projjpn; + +import junit.framework.TestCase; + +public class WarehouseTest extends TestCase { + /* + * public void test_fillWareHouseWithItems() { for (int i = 0; i < 10; i++) { + * + * } } + */ + + public void test_insertItemInWarehouse() { + // Given + Warehouse warehouse = new Warehouse(); + + String expectedTitel = "Logitec Maus"; + String expectedDescription = "Gaming Maus fuer Fortgeschrittene."; + int expectedQuantity = 10; + float expectedPrice = 69.69f; + + // When + Item expectedItem = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); + assertNotNull(expectedItem); + warehouse.insertItem(expectedItem); + + Item gotItem = warehouse.pool.get(expectedTitel); + + // Then + assertEquals(expectedTitel, gotItem.getTitel()); + } +} From cf04d5dc45d223ffdae24ee4d93fe97184761516 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Thu, 17 Feb 2022 21:56:02 +0100 Subject: [PATCH 087/114] Fixed Missing Test --- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index db015f7..cfc7052 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -401,4 +401,28 @@ public class GamesTest extends TestCase { String actual = testObject.checkAcbReighteen(); assertEquals(expected, actual); } + + public void test_printTable() { + Games testObject = new Games(); + String expected = "Name, Console, Developer, Publisher EU, Publisher JP, Publisher NA, Genre, Release EU, Release JP, Release NA, Release AU, USK Rating, PEGI Rating, ESRB Rating, CERO Rating, ACB Rating, Players\n" + + "\n" + + "Persona 5 Royal, PlayStation 4, Atlus, Sega, Atlus, Atlus, JRPG, 31.03.2020, 31.10.2019, 31.03.2020, 31.03.2020, 16, 16, M, C, MA 15+, 1\n" + + "Ratchet & Clank, Multiplatform, Insomniac Games, Sony Computer Entertainment, Sony Computer Entertainment, Sony Computer Entertainment, Action-Adventure, 08.11.2002, 03.12.2002, 04.11.2002, 08.11.2002, 6, 3, T, A, PG, 1\n" + + "Astral Chain, Nintendo Switch, Platinum Games, Nintendo, Nintendo, Nintendo, Action-Adventure, 30.08.2019, 30.08.2019, 30.08.2019, 30.08.2019, 16, 16, T, C, M, 1-2\n" + + "Fire Emblem: Three Houses, Nintendo Switch, Intelligent Systems, Nintendo, Nintendo, Nintendo, Tactical role-playing, 26.07.2019, 26.07.2019, 26.07.2019, 26.07.2019, 12, 12, T, B, M, 1\n" + + "Triangle Strategy, Nintendo Switch, Artdink, Nintendo, Square Enix, Nintendo, Strategy, 04.03.2022, 04.03.2022, 04.03.2022, 04.03.2022, 12, 12, T, C, M, 1\n" + + "Rhythm Paradise, Nintendo DS, Nintendo SPD, Nintendo, Nintendo, Nintendo, Rhythm, 01.05.2009, 31.07.2008, 05.04.2009, 04.06.2009, 0, 3, E, A, G, 1\n" + + "Super Smash Bros. Ultimate, Nintendo Switch, Sora Ltd., Nintendo, Nintendo, Nintendo, Fighting, 07.12.2018, 07.12.2018, 07.12.2018, 07.12.2018, 12, 12, E10+, A, PG, 1-8\n" + + "Yakuza: Dead Souls, PlayStation 3, Ryu Ga Gotoku Studio, Sega, Sega, Sega, Survival Horror, 16.03.2012, 09.06.2011, 13.03.2012, 15.03.2012, 18, 18, M, D, MA 15+, 1\n" + + "Jet Set Radio Future, Xbox, Sega Sports R&D, Sega, Sega, Sega, Action, 14.03.2002, 22.02.2002, 25.02.2002, 14.03.2002, 12, Unknown, T, A, M, 1-4\n" + + "Breakdown, Xbox, Namco, Electronic Arts, Namco, Namco, Action-Adventure, 18.06.2004, 29.01.2004, 16.03.2004, Unknown, 16, 18, M, C, MA 15+, 1\n" + + "AI: The Somnium Files, Multiplatform, Spike Chunsoft, Numskull Games, Spike Chunsoft, Spike Chunsoft, Adventure, 20.09.2019, 19.09.2019, 17.09.2019, 20.09.2019, 16, 18, M, Z, MA 15+, 1\n" + + "Persona 3 Portable, PlayStation Portable, Atlus, Ghostlight, Atlus, Atlus, RPG, 29.04.2011, 01.11.2009, 06.07.2010, 16.11.2011, 12, 12, M, B, MA 15+, 1\n" + + "Tomodachi Life, Nintendo 3DS, Nintendo SPD, Nintendo, Nintendo, Nintendo, Life Simulation, 06.06.2014, 18.04.2013, 06.06.2014, 07.06.2014, 0, 3, E, A, PG, 1\n" + + "Beautiful Katamari, Xbox 360, Bandai Namco Games, Bandai Namco Games, Bandai Namco Games, Bandai Namco Games, Puzzle, 29.02.2008, 16.10.2007, 18.10.2007, 07.03.2008, 0, 3, E, A, G, 1\n" + + "Atelier Totori Plus, PlayStation Vita, Gust Co. Ltd., Tecmo Koei Europe, Gust Co. Ltd., Tecmo Koei America, RPG, 20.03.2013, 29.11.2012, 19.03.2013, Unknown, 6, 12, T, B, R 18+, 1\n" + + "Crash Bandicoot N. Sane Trilogy, Multiplatform, Vicarious Visions, Activision, Activision, Activision, Platformer, 30.06.2017, 03.08.2017, 30.06.2017, 30.06.2017, 6, 7, E10+, A, PG, 1"; + String actual = testObject.printTable(); + assertEquals(expected, actual); + } } From 681a7a7f59450663178513c016bef93a3a63b373 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:08:36 +0100 Subject: [PATCH 088/114] Added: Get Count Of Stock + Basic Test --- .../de/hs_fulda/ciip/projjpn/Warehouse.java | 10 +++++++--- .../hs_fulda/ciip/projjpn/WarehouseTest.java | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java index 3a13f09..6b6a867 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java @@ -4,12 +4,16 @@ import java.util.HashMap; public class Warehouse { protected HashMap pool = new HashMap(); - - - public Item insertItem(Item item) { return pool.putIfAbsent(item.getTitel(), item); } + public int getCountOfStock() { + int sumItems = 0; + for (HashMap.Entry set : pool.entrySet()) { + sumItems += set.getValue().getCurrentStock(); + } + return sumItems; + } } \ No newline at end of file diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java index ef10f59..f713f83 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java @@ -28,4 +28,22 @@ public class WarehouseTest extends TestCase { // Then assertEquals(expectedTitel, gotItem.getTitel()); } + + + public void test_growingCountOfItemsInWarehouse() { + // Given + Warehouse warehouse = new Warehouse(); + int unitsPerItemType = 3; + int expectedSize = 13; + for(int i = 0; i < expectedSize; i++) { + Item item = new Item("ItemDummy" + i, "DescriptionDummy" + i, unitsPerItemType, 12.0f); + warehouse.insertItem(item); + } + int expectedSum = expectedSize * unitsPerItemType; + int actualSumOfAllItems = warehouse.getCountOfStock(); + + // Then + assertEquals(expectedSum, actualSumOfAllItems); + + } } From b6d9a7d4497e9cb71bda1edcdb444f4b3b1a82dd Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:10:28 +0100 Subject: [PATCH 089/114] Added: Empty Warehouse Test --- .../java/de/hs_fulda/ciip/projjpn/WarehouseTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java index f713f83..74fb8f9 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java @@ -44,6 +44,18 @@ public class WarehouseTest extends TestCase { // Then assertEquals(expectedSum, actualSumOfAllItems); + } + + public void test_emptyWarehouse() { + // Given + Warehouse warehouse = new Warehouse(); + + // When + int expectedSum = 0; + + // Then + int actualSumOfAllItems = warehouse.getCountOfStock(); + assertEquals(expectedSum, actualSumOfAllItems); } } From e1615c8adf914112e6312cd5105f2d665c92ebc0 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:11:50 +0100 Subject: [PATCH 090/114] Added: Javadoc for test_emptyWarehouse() --- .../src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java index 74fb8f9..2c388f8 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java @@ -46,6 +46,9 @@ public class WarehouseTest extends TestCase { assertEquals(expectedSum, actualSumOfAllItems); } + /** + * Empty Warehouse means there are a total of zero Items. + */ public void test_emptyWarehouse() { // Given Warehouse warehouse = new Warehouse(); From 5667effc02607b81e9aa5ed5c4607791711b6e8b Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:13:22 +0100 Subject: [PATCH 091/114] Added: Javadoc for test_growingCountOfItemsInWarehouse --- .../src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java index 2c388f8..e053308 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java @@ -29,7 +29,9 @@ public class WarehouseTest extends TestCase { assertEquals(expectedTitel, gotItem.getTitel()); } - + /** + * Test the total Sum of Items in the whole Warehouse. + */ public void test_growingCountOfItemsInWarehouse() { // Given Warehouse warehouse = new Warehouse(); From a4ce780b4e8604b669f423abe7b39bb67899b09a Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Thu, 17 Feb 2022 22:13:33 +0100 Subject: [PATCH 092/114] Added Same Release Month Checker + Tests + Javadoc --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 47 +++++++++++++++++++ .../de/hs_fulda/ciip/projjpn/GamesTest.java | 7 +++ 2 files changed, 54 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 994a3c0..9e433fa 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -1332,6 +1332,53 @@ public class Games { return result.substring(0, result.length() - 2); } + + /** + * Checks if the release years are all the same across Europe, Japan, North + * America and Australia. + * + * @return Prints the games which have the same release year. + */ + public String checkAllSameReleaseMonth() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + + } else { + if (gameReleaseEu.substring(5, 7).equals(gameReleaseJp.substring(5, 7)) + && gameReleaseJp.substring(5, 7).equals(gameReleaseNa.substring(5, 7)) + && gameReleaseEu.substring(5, 7).equals(gameReleaseNa.substring(5, 7)) + && gameReleaseAu.substring(5, 7).equals(gameReleaseEu.substring(5, 7)) + && gameReleaseAu.substring(5, 7).equals(gameReleaseJp.substring(5, 7)) + && gameReleaseAu.substring(5, 7).equals(gameReleaseNa.substring(5, 7))) { + result += gameName + ", "; + } + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } /** * Checks if the game is compatible with one player or more. diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index cfc7052..7e9107e 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -191,6 +191,13 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentReleaseYear(); assertEquals(expected, actual); } + + public void test_checkAllSameReleaseMonth() { + Games testObject = new Games(); + String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, AI: The Somnium Files"; + String actual = testObject.checkAllSameReleaseMonth(); + assertEquals(expected, actual); + } public void test_checkOnePlayer() { Games testObject = new Games(); From 2b8a628c60c22775022bea1be31bc2fc55b8ac0c Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:15:58 +0100 Subject: [PATCH 093/114] Added: Javadoc for test_insertItemInWarehouse() --- .../hs_fulda/ciip/projjpn/WarehouseTest.java | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java index e053308..5b7234e 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/WarehouseTest.java @@ -3,12 +3,9 @@ package de.hs_fulda.ciip.projjpn; import junit.framework.TestCase; public class WarehouseTest extends TestCase { - /* - * public void test_fillWareHouseWithItems() { for (int i = 0; i < 10; i++) { - * - * } } + /** + * Check if the insertion of an Item works properly. */ - public void test_insertItemInWarehouse() { // Given Warehouse warehouse = new Warehouse(); @@ -22,42 +19,42 @@ public class WarehouseTest extends TestCase { Item expectedItem = new Item(expectedTitel, expectedDescription, expectedQuantity, expectedPrice); assertNotNull(expectedItem); warehouse.insertItem(expectedItem); - + Item gotItem = warehouse.pool.get(expectedTitel); - + // Then assertEquals(expectedTitel, gotItem.getTitel()); } - + /** - * Test the total Sum of Items in the whole Warehouse. + * Test the total Sum of Items in the whole Warehouse. */ public void test_growingCountOfItemsInWarehouse() { // Given Warehouse warehouse = new Warehouse(); int unitsPerItemType = 3; int expectedSize = 13; - for(int i = 0; i < expectedSize; i++) { + for (int i = 0; i < expectedSize; i++) { Item item = new Item("ItemDummy" + i, "DescriptionDummy" + i, unitsPerItemType, 12.0f); warehouse.insertItem(item); } int expectedSum = expectedSize * unitsPerItemType; int actualSumOfAllItems = warehouse.getCountOfStock(); - + // Then assertEquals(expectedSum, actualSumOfAllItems); } - + /** * Empty Warehouse means there are a total of zero Items. */ - public void test_emptyWarehouse() { + public void test_emptyWarehouse() { // Given Warehouse warehouse = new Warehouse(); - + // When int expectedSum = 0; - + // Then int actualSumOfAllItems = warehouse.getCountOfStock(); assertEquals(expectedSum, actualSumOfAllItems); From 22f136449f0d007c8c58d8a8ceb5c6d1dd5fd5d1 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:17:56 +0100 Subject: [PATCH 094/114] Added: Javadoc for Warehouse --- .../main/java/de/hs_fulda/ciip/projjpn/Warehouse.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java index 6b6a867..c0fd4fa 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java @@ -5,10 +5,19 @@ import java.util.HashMap; public class Warehouse { protected HashMap pool = new HashMap(); + /** + * + * @param item Item to insert. + * @return the inserted Item or null. + */ public Item insertItem(Item item) { return pool.putIfAbsent(item.getTitel(), item); } + /** + * + * @return The total amount of all Items. + */ public int getCountOfStock() { int sumItems = 0; for (HashMap.Entry set : pool.entrySet()) { From 28035c530f320d3db5f882e47a0c0c0f840812f5 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:19:39 +0100 Subject: [PATCH 095/114] Added: Javadoc for Item constructors --- .../main/java/de/hs_fulda/ciip/projjpn/Item.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index 6b9c5f1..b1ccc9f 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -1,15 +1,25 @@ package de.hs_fulda.ciip.projjpn; public class Item { - // @ToDo: customerReview + private String productTitle; private String description; private int availability = 0; private float price; + /** + * Creation of blank Item. + */ public Item() { } + /** + * Creation of Item. + * @param titel + * @param description + * @param quantity + * @param price + */ public Item(String titel, String description, int quantity, @@ -32,6 +42,7 @@ public class Item { availability = newAmount; } + public void updatePrice(float price) { this.price = price; } From 432211464b5864f2ba3bcffa7a6e27d691ae2d84 Mon Sep 17 00:00:00 2001 From: Adem Berber Date: Thu, 17 Feb 2022 22:21:02 +0100 Subject: [PATCH 096/114] Added Different Release Month Checker + Tests + Javadoc + Fixed Javadoc + Refactoring --- .../java/de/hs_fulda/ciip/projjpn/Games.java | 76 +++++++++++++++---- .../de/hs_fulda/ciip/projjpn/GamesTest.java | 11 ++- 2 files changed, 70 insertions(+), 17 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java index 9e433fa..38172d4 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java @@ -42,8 +42,7 @@ public class Games { Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(query); - result += "Name, Console, Developer, Publisher EU, Publisher JP, Publisher NA, Genre, Release EU, Release JP, Release NA, Release AU, USK Rating, PEGI Rating, ESRB Rating, CERO Rating, ACB Rating, Players\n\n"; - + result += "Name, Console, Developer, Publisher EU, Publisher JP, Publisher NA, Genre, Release EU, Release JP, Release NA, Release AU, USK Rating, PEGI Rating, ESRB Rating, CERO Rating, ACB Rating, Players\n\n"; while (resultSet.next()) { String gameName = resultSet.getString("Game_Name"); @@ -82,17 +81,17 @@ public class Games { String gamePlayers = resultSet.getString("Game_Players"); if (gamePegi != 0) { - result += gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu - + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " - + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " - + gameReleaseAuDots + ", " + gameUsk + ", " + gamePegi + ", " + gameEsrb + ", " + gameCero - + ", " + gameAcb + ", " + gamePlayers + "\n"; + result += gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + + gameUsk + ", " + gamePegi + ", " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + + gamePlayers + "\n"; } else { - result += gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu - + ", " + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " - + gameReleaseEuDots + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " - + gameReleaseAuDots + ", " + gameUsk + ", Unknown, " + gameEsrb + ", " + gameCero + ", " - + gameAcb + ", " + gamePlayers + "\n"; + result += gameName + ", " + gameConsole + ", " + gameDeveloper + ", " + gamePublisherEu + ", " + + gamePublisherJp + ", " + gamePublisherNa + ", " + gameGenre + ", " + gameReleaseEuDots + + ", " + gameReleaseJpDots + ", " + gameReleaseNaDots + ", " + gameReleaseAuDots + ", " + + gameUsk + ", Unknown, " + gameEsrb + ", " + gameCero + ", " + gameAcb + ", " + gamePlayers + + "\n"; } } @@ -1332,12 +1331,12 @@ public class Games { return result.substring(0, result.length() - 2); } - + /** - * Checks if the release years are all the same across Europe, Japan, North + * Checks if the release months are all the same across Europe, Japan, North * America and Australia. * - * @return Prints the games which have the same release year. + * @return Prints the games which have the same release month. */ public String checkAllSameReleaseMonth() { String result = ""; @@ -1380,6 +1379,53 @@ public class Games { return result.substring(0, result.length() - 2); } + /** + * Checks if the release months are not all the same across Europe, Japan, North + * America and Australia. + * + * @return Prints the games which do not have the same release month. + */ + public String checkAllDifferentReleaseMonth() { + String result = ""; + String query = "SELECT Game_Name, Game_Release_EU, Game_Release_JP, Game_Release_NA, Game_Release_AU FROM Games"; + + try { + Connection connection = DriverManager.getConnection(databaseURL); + + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery(query); + + while (resultSet.next()) { + String gameName = resultSet.getString("Game_Name"); + String gameReleaseEu = resultSet.getString("Game_Release_EU"); + String gameReleaseJp = resultSet.getString("Game_Release_JP"); + String gameReleaseNa = resultSet.getString("Game_Release_NA"); + String gameReleaseAu = resultSet.getString("Game_Release_AU"); + + if (gameReleaseAu == null) { + result += gameName + ", "; + } else { + if (!gameReleaseEu.substring(5, 7).equals(gameReleaseJp.substring(5, 7)) + || !gameReleaseJp.substring(5, 7).equals(gameReleaseNa.substring(5, 7)) + || !gameReleaseEu.substring(5, 7).equals(gameReleaseNa.substring(5, 7)) + || !gameReleaseAu.substring(5, 7).equals(gameReleaseEu.substring(5, 7)) + || !gameReleaseAu.substring(5, 7).equals(gameReleaseJp.substring(5, 7)) + || !gameReleaseAu.substring(5, 7).equals(gameReleaseNa.substring(5, 7))) { + result += gameName + ", "; + } + } + + } + statement.close(); + connection.close(); + + } catch (SQLException e) { + e.printStackTrace(); + } + + return result.substring(0, result.length() - 2); + } + /** * Checks if the game is compatible with one player or more. * diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java index 7e9107e..c6a229d 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/GamesTest.java @@ -191,7 +191,7 @@ public class GamesTest extends TestCase { String actual = testObject.checkAllDifferentReleaseYear(); assertEquals(expected, actual); } - + public void test_checkAllSameReleaseMonth() { Games testObject = new Games(); String expected = "Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Super Smash Bros. Ultimate, AI: The Somnium Files"; @@ -199,6 +199,13 @@ public class GamesTest extends TestCase { assertEquals(expected, actual); } + public void test_checkAllDifferentReleaseMonth() { + Games testObject = new Games(); + String expected = "Persona 5 Royal, Ratchet & Clank, Rhythm Paradise, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; + String actual = testObject.checkAllDifferentReleaseMonth(); + assertEquals(expected, actual); + } + public void test_checkOnePlayer() { Games testObject = new Games(); String expected = "Persona 5 Royal, Ratchet & Clank, Astral Chain, Fire Emblem: Three Houses, Triangle Strategy, Rhythm Paradise, Super Smash Bros. Ultimate, Yakuza: Dead Souls, Jet Set Radio Future, Breakdown, AI: The Somnium Files, Persona 3 Portable, Tomodachi Life, Beautiful Katamari, Atelier Totori Plus, Crash Bandicoot N. Sane Trilogy"; @@ -408,7 +415,7 @@ public class GamesTest extends TestCase { String actual = testObject.checkAcbReighteen(); assertEquals(expected, actual); } - + public void test_printTable() { Games testObject = new Games(); String expected = "Name, Console, Developer, Publisher EU, Publisher JP, Publisher NA, Genre, Release EU, Release JP, Release NA, Release AU, USK Rating, PEGI Rating, ESRB Rating, CERO Rating, ACB Rating, Players\n" From 2b32772c85c3f0745ac29e8f6005036831cf4837 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:21:27 +0100 Subject: [PATCH 097/114] Added: Javadoc for Item Methods --- projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index b1ccc9f..b9ac69e 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -30,10 +30,18 @@ public class Item { this.price = price; } + /** + * + * @return true if at least one item is in stock. + */ public boolean inStock() { return availability > 0; } + /** + * + * @return current number of this items + */ public float getCurrentStock() { return availability; } From 70fa1700f510ab13590f9e301baad25e5f1b7105 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:23:52 +0100 Subject: [PATCH 098/114] Added: Javadoc for Item Methods + minor refactoring --- .../main/java/de/hs_fulda/ciip/projjpn/Item.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index b9ac69e..4f51d78 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -46,13 +46,20 @@ public class Item { return availability; } + /** + * + * @param newAmount of items + */ public void updateAvailability(int newAmount) { availability = newAmount; } - - public void updatePrice(float price) { - this.price = price; + /** + * + * @param newPrice of this item. + */ + public void updatePrice(float newPrice) { + this.price = newPrice; } public float getCurrentPrice() { From b48c04fc39892770f12ff0752d6c9606368d5e92 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:28:00 +0100 Subject: [PATCH 099/114] Added: Javadoc for Item class --- .../src/main/java/de/hs_fulda/ciip/projjpn/Item.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java index 4f51d78..1be3965 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Item.java @@ -62,14 +62,26 @@ public class Item { this.price = newPrice; } + /** + * + * @return Current Price of the Item. + */ public float getCurrentPrice() { return price; } + /** + * + * @return Current public Title of this Item. + */ public String getTitel() { return this.productTitle; } + /** + * + * @return Current public Description of this Item. + */ public String getDescription() { return this.description; } From 906bd9e4c99440b78eae37747576772e92f3fac7 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:28:59 +0100 Subject: [PATCH 100/114] Added: Javadoc for Customers registerUser() --- .../src/main/java/de/hs_fulda/ciip/projjpn/Customers.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index 174016e..4db7278 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -13,6 +13,11 @@ public class Customers { return false; } + /** + * + * @param user New User to register. + * @return + */ public User registerUser(User user) { return pool.putIfAbsent(user.nickName, user); } From a62245ae49c9d8e3796cd7ccfc2fa7360422d9d1 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:29:46 +0100 Subject: [PATCH 101/114] Added: Javadoc for Customers deleteUser() --- .../src/main/java/de/hs_fulda/ciip/projjpn/Customers.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index 4db7278..98fb54a 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -22,6 +22,11 @@ public class Customers { return pool.putIfAbsent(user.nickName, user); } + /** + * + * @param userNickname Delete a particular User with the given nickname + * @return null or the deleted user. + */ public User deleteUser(String userNickname) { return pool.remove(userNickname); } From bfb15c62bed3741196d3ad422bbb201b9b38ed8f Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:30:38 +0100 Subject: [PATCH 102/114] Added: Javadoc for Customers getByNickname() --- .../src/main/java/de/hs_fulda/ciip/projjpn/Customers.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index 98fb54a..a381188 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -31,6 +31,11 @@ public class Customers { return pool.remove(userNickname); } + /** + * + * @param nickname Find User by nickname + * @return + */ public User getByNickname(String nickname) { return pool.get(nickname); } From dce6920ce72fb485b4af7441827be7dd840ccc8b Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:31:18 +0100 Subject: [PATCH 103/114] Added: Javadoc for Customers getCountOfUsers() --- projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index a381188..86a4a94 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -40,6 +40,10 @@ public class Customers { return pool.get(nickname); } + /** + * + * @return Number of Users. + */ public int getCountOfUsers() { return pool.size(); } From cdfcc71399d7f241855f5959a3c4b1b23415aa88 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:33:49 +0100 Subject: [PATCH 104/114] Added: Javadoc for Customers nickNameAvailable() --- .../src/main/java/de/hs_fulda/ciip/projjpn/Customers.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java index 86a4a94..e2fd71a 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Customers.java @@ -5,6 +5,12 @@ import java.util.HashMap; public class Customers { HashMap pool = new HashMap(); + /** + * + * @param nickname Is the particular Nickname free to use? + * @return true if nickname is Available. + * @return false if nickname is Available. + */ public boolean nickNameAvailable(String nickname) { User u = pool.get(nickname); if (null == u) { From 12e0edc42ddd94273c7415d0724963f21154e2b1 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:36:19 +0100 Subject: [PATCH 105/114] Added: Javadoc for Birthday isValid() --- .../src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java index 32ed901..9ab68bf 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Birthdate.java @@ -42,6 +42,14 @@ public class Birthdate { year = y; } + /** + * + * @param DD + * @param MM + * @param YYYY + * @return true if date is valid. + * @return false if date is invalid. + */ public boolean isValid(int DD, int MM, int YYYY) { if (DD < 1 || DD > 31) { return false; From 04dd0a90b219575a3d35031c1eafaca4aed59362 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:38:10 +0100 Subject: [PATCH 106/114] Added: Javadoc for UserTest test_initAndGetBirthdayOfUser() --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java index 419153e..5598b71 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/UserTest.java @@ -3,6 +3,9 @@ package de.hs_fulda.ciip.projjpn; import junit.framework.TestCase; public class UserTest extends TestCase { + /** + * Create User with a valid Birthday and check whether it worked as intended. + */ public void test_initAndGetBirthdayOfUser() { // Given Customers customers = new Customers(); From 8a996f5b24fc9ce36a21e2766d4738c6ad56d356 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:41:22 +0100 Subject: [PATCH 107/114] Added: ItemTest minor refactoring --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 4a5dcc4..652b953 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -3,6 +3,10 @@ package de.hs_fulda.ciip.projjpn; import junit.framework.TestCase; public class ItemTest extends TestCase { + /** + * No Items are in Stock. + * Check the inStock() Method. + */ public void test_ItemNotInStock() { // Given Item item = new Item(); From 41247f580653ef6ba18fb8a86344ddb3b4d00e07 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:42:23 +0100 Subject: [PATCH 108/114] Added: javadoc ItemTest test_ItemInStock() --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 652b953..7de328f 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -18,6 +18,10 @@ public class ItemTest extends TestCase { assertFalse(notInStock); } + /** + * Stock is not Empty. + * Check the inStock() Method. + */ public void test_ItemInStock() { // Given Item item = new Item(); From 36d730a816b145bba1e5166305b45bf27f005b24 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:43:19 +0100 Subject: [PATCH 109/114] Added: javadoc ItemTest test_priceOfMultipleIdenticalItems() --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index 7de328f..c211ab1 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -33,6 +33,10 @@ public class ItemTest extends TestCase { assertTrue(inStock); } + /** + * One and the same type of an item costs the same. + * check getCurrentPrice() + */ public void test_priceOfMultipleIdenticalItems() { // Given Item item = new Item(); From 331a2b84073dcf7978de3fd68042c99838999730 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:44:01 +0100 Subject: [PATCH 110/114] Added: javadoc ItemTest test_buildCompleteItem() --- projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java index c211ab1..aaf8886 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/ItemTest.java @@ -57,6 +57,9 @@ public class ItemTest extends TestCase { assertEquals(expectedPrice, actualPrice); } + /** + * Check if creating a complete item with all attributes works as intended. + */ public void test_buildCompleteItem() { // Given String expectedTitel = "Logitec Maus"; From 29329a7915bdd32eadd8469f12b17b921fdcbc44 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:45:15 +0100 Subject: [PATCH 111/114] Added: javadoc for CustomersTest test_removeRegisteredUser() --- .../src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 110d7ad..a7384a8 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -90,6 +90,9 @@ public class CustomersTest extends TestCase { } } + /** + * Test if deletion of an allready registered customer works. + */ public void test_removeRegisteredUser() { // Given Customers customers = new Customers(); From ec603c35f0f8222cda276eedb2a79eadd9800124 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:45:56 +0100 Subject: [PATCH 112/114] Added: javadoc for CustomersTest test_registerAndCountUsers() --- .../src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index a7384a8..a3a3788 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -110,6 +110,9 @@ public class CustomersTest extends TestCase { } + /** + * Register a given number of users. + */ public void test_registerAndCountUsers() { // Given Customers customers = new Customers(); From a7e50b722ace594968eee0a2dbc098dbc682164b Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:47:03 +0100 Subject: [PATCH 113/114] Added: javadoc for CustomersTest test_createRegisterAndCheckUserData --- .../src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index a3a3788..3700e6a 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -129,6 +129,9 @@ public class CustomersTest extends TestCase { assertEquals(expectedRegisteredUsers, actualRegisteredUsers); } + /** + * Check if the Registration of a User works as intended. + */ public void test_createRegisterAndCheckUserData() { // Given Customers customers = new Customers(); From bfe9534bdd0932cf6c15919ffd2a5ed1ab75b638 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:48:30 +0100 Subject: [PATCH 114/114] Added: javadoc for CustomersTest --- .../test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java index 3700e6a..6dc92c3 100644 --- a/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java +++ b/projjpn/src/test/java/de/hs_fulda/ciip/projjpn/CustomersTest.java @@ -16,6 +16,9 @@ public class CustomersTest extends TestCase { assertTrue(nicknameIsAvailable); } + /** + * Register a user only when the given nickname is available. + */ public void test_nicknameIsTaken() { // Given Customers customers = new Customers(); @@ -32,6 +35,9 @@ public class CustomersTest extends TestCase { assertFalse(nicknameIsTaken); } + /** + * Register a single user and check whether it worked. + */ public void test_registerSingleUser() { // Given Customers customers = new Customers();