From dc5a7aea2b0e7d57ebc70e41a24374f02fcb5081 Mon Sep 17 00:00:00 2001 From: cedri Date: Sat, 31 Dec 2022 14:06:15 +0100 Subject: [PATCH] =?UTF-8?q?Grundstruktur=20=C3=BCberabreitet=20+=20RobotFa?= =?UTF-8?q?ctory=20und=20Enum=20angelegt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Robbie-Management-System/src/domain/C3PO.java | 13 +++++++++++++ Robbie-Management-System/src/domain/R2D2.java | 12 ++++++++++++ .../src/domain/RobotFactory.java | 16 ++++++++++++++++ .../src/domain/RobotType.java | 5 +++++ .../src/roboterSystem/C3PO.java | 7 ------- .../src/roboterSystem/R2D2.java | 6 ------ 6 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 Robbie-Management-System/src/domain/C3PO.java create mode 100644 Robbie-Management-System/src/domain/R2D2.java create mode 100644 Robbie-Management-System/src/domain/RobotFactory.java create mode 100644 Robbie-Management-System/src/domain/RobotType.java delete mode 100644 Robbie-Management-System/src/roboterSystem/C3PO.java delete mode 100644 Robbie-Management-System/src/roboterSystem/R2D2.java diff --git a/Robbie-Management-System/src/domain/C3PO.java b/Robbie-Management-System/src/domain/C3PO.java new file mode 100644 index 0000000..fd30d67 --- /dev/null +++ b/Robbie-Management-System/src/domain/C3PO.java @@ -0,0 +1,13 @@ +package domain; + +import roboterSystem.Robot; + +public class C3PO implements Robot { + + public C3PO(String name) { + // TODO Auto-generated constructor stub + } + + + +} diff --git a/Robbie-Management-System/src/domain/R2D2.java b/Robbie-Management-System/src/domain/R2D2.java new file mode 100644 index 0000000..653239b --- /dev/null +++ b/Robbie-Management-System/src/domain/R2D2.java @@ -0,0 +1,12 @@ +package domain; + +import roboterSystem.Robot; + +public class R2D2 implements Robot { + + public R2D2(String name) { + // TODO Auto-generated constructor stub + } + + +} diff --git a/Robbie-Management-System/src/domain/RobotFactory.java b/Robbie-Management-System/src/domain/RobotFactory.java new file mode 100644 index 0000000..c85474f --- /dev/null +++ b/Robbie-Management-System/src/domain/RobotFactory.java @@ -0,0 +1,16 @@ +package domain; + +import roboterSystem.Robot; + +public class RobotFactory { + + public static Robot RobotFactory (String modell, String name) { + switch(modell) { + case "C3PO": + return new C3PO(name); + + case "R2D2": + return new R2D2(name); + } + } +} diff --git a/Robbie-Management-System/src/domain/RobotType.java b/Robbie-Management-System/src/domain/RobotType.java new file mode 100644 index 0000000..a7df994 --- /dev/null +++ b/Robbie-Management-System/src/domain/RobotType.java @@ -0,0 +1,5 @@ +package domain; + +public enum RobotType { + C3PO, R2D2; +} diff --git a/Robbie-Management-System/src/roboterSystem/C3PO.java b/Robbie-Management-System/src/roboterSystem/C3PO.java deleted file mode 100644 index 30bb495..0000000 --- a/Robbie-Management-System/src/roboterSystem/C3PO.java +++ /dev/null @@ -1,7 +0,0 @@ -package roboterSystem; - -public class C3PO implements Robot { - - - -} diff --git a/Robbie-Management-System/src/roboterSystem/R2D2.java b/Robbie-Management-System/src/roboterSystem/R2D2.java deleted file mode 100644 index 8bf6d4c..0000000 --- a/Robbie-Management-System/src/roboterSystem/R2D2.java +++ /dev/null @@ -1,6 +0,0 @@ -package roboterSystem; - -public class R2D2 implements Robot { - - -}