From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Softwaretechnik/swtBank/.cdtbuild | 25 +++++++ Bachelor/Softwaretechnik/swtBank/.cdtproject | 18 +++++ Bachelor/Softwaretechnik/swtBank/.project | 19 +++++ Bachelor/Softwaretechnik/swtBank/Debug/girokonto.d | 10 +++ Bachelor/Softwaretechnik/swtBank/Debug/konto.d | 8 +++ Bachelor/Softwaretechnik/swtBank/Debug/main.d | 10 +++ Bachelor/Softwaretechnik/swtBank/Debug/makefile | 30 ++++++++ Bachelor/Softwaretechnik/swtBank/Debug/objects.mk | 13 ++++ Bachelor/Softwaretechnik/swtBank/Debug/sources.mk | 16 +++++ Bachelor/Softwaretechnik/swtBank/Debug/subdir.mk | 46 ++++++++++++ Bachelor/Softwaretechnik/swtBank/Debug/swtBank | Bin 0 -> 188063 bytes Bachelor/Softwaretechnik/swtBank/girokonto.cpp | 53 ++++++++++++++ Bachelor/Softwaretechnik/swtBank/girokonto.hpp | 70 ++++++++++++++++++ Bachelor/Softwaretechnik/swtBank/konto.cpp | 60 ++++++++++++++++ Bachelor/Softwaretechnik/swtBank/konto.hpp | 79 +++++++++++++++++++++ Bachelor/Softwaretechnik/swtBank/main.cpp | 53 ++++++++++++++ 16 files changed, 510 insertions(+) create mode 100644 Bachelor/Softwaretechnik/swtBank/.cdtbuild create mode 100644 Bachelor/Softwaretechnik/swtBank/.cdtproject create mode 100644 Bachelor/Softwaretechnik/swtBank/.project create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/girokonto.d create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/konto.d create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/main.d create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/makefile create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/objects.mk create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/sources.mk create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/subdir.mk create mode 100644 Bachelor/Softwaretechnik/swtBank/Debug/swtBank create mode 100644 Bachelor/Softwaretechnik/swtBank/girokonto.cpp create mode 100644 Bachelor/Softwaretechnik/swtBank/girokonto.hpp create mode 100644 Bachelor/Softwaretechnik/swtBank/konto.cpp create mode 100644 Bachelor/Softwaretechnik/swtBank/konto.hpp create mode 100644 Bachelor/Softwaretechnik/swtBank/main.cpp (limited to 'Bachelor/Softwaretechnik/swtBank') diff --git a/Bachelor/Softwaretechnik/swtBank/.cdtbuild b/Bachelor/Softwaretechnik/swtBank/.cdtbuild new file mode 100644 index 0000000..35e44a8 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/.cdtbuild @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Bachelor/Softwaretechnik/swtBank/.cdtproject b/Bachelor/Softwaretechnik/swtBank/.cdtproject new file mode 100644 index 0000000..82c36e0 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/.cdtproject @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Bachelor/Softwaretechnik/swtBank/.project b/Bachelor/Softwaretechnik/swtBank/.project new file mode 100644 index 0000000..96a2795 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/.project @@ -0,0 +1,19 @@ + + + swtBank + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + + diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/girokonto.d b/Bachelor/Softwaretechnik/swtBank/Debug/girokonto.d new file mode 100644 index 0000000..319955e --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/girokonto.d @@ -0,0 +1,10 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +girokonto.d ./girokonto.o: ../girokonto.cpp ../girokonto.hpp ../konto.hpp + +../girokonto.hpp: + +../konto.hpp: + diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/konto.d b/Bachelor/Softwaretechnik/swtBank/Debug/konto.d new file mode 100644 index 0000000..75c00a3 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/konto.d @@ -0,0 +1,8 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +konto.d ./konto.o: ../konto.cpp ../konto.hpp + +../konto.hpp: + diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/main.d b/Bachelor/Softwaretechnik/swtBank/Debug/main.d new file mode 100644 index 0000000..4351548 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/main.d @@ -0,0 +1,10 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +main.d ./main.o: ../main.cpp ../girokonto.hpp ../konto.hpp + +../girokonto.hpp: + +../konto.hpp: + diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/makefile b/Bachelor/Softwaretechnik/swtBank/Debug/makefile new file mode 100644 index 0000000..7fd327b --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/makefile @@ -0,0 +1,30 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ROOT := .. + +-include $(ROOT)/makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include $(SUBDIRS:%=%/subdir.mk) +-include objects.mk +-include $(DEPS) +-include $(ROOT)/makefile.defs + +all: swtBank + +swtBank: $(OBJS) + @echo 'Building target: $@' + g++ -o $@ $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building: $@' + +clean: + -$(RM) $(OBJS) $(DEPS) swtBank + +.PHONY: all clean dependents + +-include $(ROOT)/makefile.targets diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/objects.mk b/Bachelor/Softwaretechnik/swtBank/Debug/objects.mk new file mode 100644 index 0000000..59a3b5b --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/objects.mk @@ -0,0 +1,13 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +LIBS := +USER_OBJS := + + +OBJS := \ + $(C_SRCS:$(ROOT)/%.c=%.o) $(C_UPPER_SRCS:$(ROOT)/%.C=%.o) $(CC_SRCS:$(ROOT)/%.cc=%.o) $(CXX_SRCS:$(ROOT)/%.cxx=%.o) $(CPP_SRCS:$(ROOT)/%.cpp=%.o) $(S_SRCS:$(ROOT)/%.s=%.o) $(S_UPPER_SRCS:$(ROOT)/%.S=%.o) + +DEPS := \ + $(C_SRCS:$(ROOT)/%.c=%.d) $(C_UPPER_SRCS:$(ROOT)/%.C=%.d) $(CC_SRCS:$(ROOT)/%.cc=%.d) $(CXX_SRCS:$(ROOT)/%.cxx=%.d) $(CPP_SRCS:$(ROOT)/%.cpp=%.d) $(S_SRCS:$(ROOT)/%.s=%.d) $(S_UPPER_SRCS:$(ROOT)/%.S=%.d) \ No newline at end of file diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/sources.mk b/Bachelor/Softwaretechnik/swtBank/Debug/sources.mk new file mode 100644 index 0000000..357bfc1 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/sources.mk @@ -0,0 +1,16 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +C_SRCS := +C_UPPER_SRCS := +CC_SRCS := +CXX_SRCS := +CPP_SRCS := +S_SRCS := +S_UPPER_SRCS := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +. \ + diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/subdir.mk b/Bachelor/Softwaretechnik/swtBank/Debug/subdir.mk new file mode 100644 index 0000000..f8084c0 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/Debug/subdir.mk @@ -0,0 +1,46 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +S_UPPER_SRCS += \ +${addprefix $(ROOT)/, \ +} + +CPP_SRCS += \ +${addprefix $(ROOT)/, \ +girokonto.cpp \ +konto.cpp \ +main.cpp \ +} + +CC_SRCS += \ +${addprefix $(ROOT)/, \ +} + +C_SRCS += \ +${addprefix $(ROOT)/, \ +} + +C_UPPER_SRCS += \ +${addprefix $(ROOT)/, \ +} + +CXX_SRCS += \ +${addprefix $(ROOT)/, \ +} + +S_SRCS += \ +${addprefix $(ROOT)/, \ +} + +# Each subdirectory must supply rules for building sources it contributes +%.o: $(ROOT)/%.cpp + @echo 'Building file: $<' + @echo g++ -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< + @g++ -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \ + echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \ + g++ -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d) + @echo 'Finished building: $<' + @echo ' ' + + diff --git a/Bachelor/Softwaretechnik/swtBank/Debug/swtBank b/Bachelor/Softwaretechnik/swtBank/Debug/swtBank new file mode 100644 index 0000000..6f66f0c Binary files /dev/null and b/Bachelor/Softwaretechnik/swtBank/Debug/swtBank differ diff --git a/Bachelor/Softwaretechnik/swtBank/girokonto.cpp b/Bachelor/Softwaretechnik/swtBank/girokonto.cpp new file mode 100644 index 0000000..2c77bc8 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/girokonto.cpp @@ -0,0 +1,53 @@ +/**********************************************************************************/ +/* Definitionsmodul */ +/**********************************************************************************/ +/* + * generiert mit Innovator Version 8.1.04 + * + * erstellt am: 01.05.2005 14:31:27 + * Repository : swtd29 + * Modell : swtd29 + * Benutzer : ADMIN + * File : /tmp/src/girokonto.cpp + * + */ + + +// ino.module.girokonto.513.includes +#include "girokonto.hpp" +// ino.end + + +// ino.method.Girokonto.505.definition +Girokonto::Girokonto() +// ino.end +// ino.method.Girokonto.505.body +{ + ueberziehungsKredit=1000; +} +// ino.end + +// ino.method.~Girokonto.502.definition +Girokonto::~Girokonto() +// ino.end +// ino.method.~Girokonto.502.body +{ +} +// ino.end + +// ino.method.pruefeUeberziehungsKredit.478.definition +bool Girokonto::pruefeUeberziehungsKredit(float betrag) +// ino.end +// ino.method.pruefeUeberziehungsKredit.478.body +{ + if ((getKontostand()>betrag) || ((getKontostand()+ueberziehungsKredit)>betrag)) + { + //geldAbheben(betrag); + return true; + } + else + return false; +} +// ino.end + + diff --git a/Bachelor/Softwaretechnik/swtBank/girokonto.hpp b/Bachelor/Softwaretechnik/swtBank/girokonto.hpp new file mode 100644 index 0000000..a0d4388 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/girokonto.hpp @@ -0,0 +1,70 @@ +/**********************************************************************************/ +/* Deklarationsmodul */ +/**********************************************************************************/ +/* + * generiert mit Innovator Version 8.1.04 + * + * erstellt am: 01.05.2005 14:31:27 + * Repository : swtd29 + * Modell : swtd29 + * Benutzer : ADMIN + * File : /tmp/src/girokonto.hpp + * + */ + + +// ino.module.girokonto.511.ifndef +#ifndef _GIROKONTO_HPP_511 +#define _GIROKONTO_HPP_511 +// ino.end + +// ino.module.girokonto.511.decIncludes +#include "konto.hpp" +// ino.end + +namespace analysis_system { + + +// ino.class.Girokonto.474.declaration +class Girokonto: public Konto +// ino.end +// ino.class.Girokonto.474.body +{ + // ino.attribute.ueberziehungsKredit.476.declaration + private: + float ueberziehungsKredit; + // ino.end + + // ino.method.Girokonto.505.declaration + public: + Girokonto(void); + // ino.end + + // ino.method.~Girokonto.502.declaration + public: + virtual ~Girokonto(void); + // ino.end + + // ino.method.pruefeUeberziehungsKredit.478.declaration + public: + virtual bool pruefeUeberziehungsKredit(float betrag); + // ino.end + +}; +// ino.end + + + + + +}; // namespace analysis system + + +#if !defined(NO_IMPLICIT_NAMESPACE_USE) +using namespace analysis_system; +#endif + +// ino.module.girokonto.511.endif +#endif +// ino.end + diff --git a/Bachelor/Softwaretechnik/swtBank/konto.cpp b/Bachelor/Softwaretechnik/swtBank/konto.cpp new file mode 100644 index 0000000..4864c9d --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/konto.cpp @@ -0,0 +1,60 @@ +/**********************************************************************************/ +/* Definitionsmodul */ +/**********************************************************************************/ +/* + * generiert mit Innovator Version 8.1.04 + * + * erstellt am: 01.05.2005 14:31:27 + * Repository : swtd29 + * Modell : swtd29 + * Benutzer : ADMIN + * File : /tmp/src/konto.cpp + * + */ + + +// ino.module.konto.512.includes +#include "konto.hpp" +// ino.end + + +// ino.method.Konto.499.definition +Konto::Konto(void) +// ino.end +// ino.method.Konto.499.body +{ + kontostand=0; + kontonummer=12345678; +} +// ino.end + +// ino.method.~Konto.496.definition +Konto::~Konto(void) +// ino.end +// ino.method.~Konto.496.body +{ +} +// ino.end + +// ino.method.geldEinzahlen.470.definition +void Konto::geldEinzahlen(float betrag) +// ino.end +// ino.method.geldEinzahlen.470.body +{ + kontostand+=betrag; +} +// ino.end + +// ino.method.geldAbheben.472.definition +void Konto::geldAbheben(float betrag) +// ino.end +// ino.method.geldAbheben.472.body +{ + kontostand-=betrag; +} +// ino.end + +float Konto::getKontostand() +{ + return kontostand; +} diff --git a/Bachelor/Softwaretechnik/swtBank/konto.hpp b/Bachelor/Softwaretechnik/swtBank/konto.hpp new file mode 100644 index 0000000..034a797 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/konto.hpp @@ -0,0 +1,79 @@ +/**********************************************************************************/ +/* Deklarationsmodul */ +/**********************************************************************************/ +/* + * generiert mit Innovator Version 8.1.04 + * + * erstellt am: 01.05.2005 14:31:27 + * Repository : swtd29 + * Modell : swtd29 + * Benutzer : ADMIN + * File : /tmp/src/konto.hpp + * + */ + + +// ino.module.konto.510.ifndef +#ifndef _KONTO_HPP_510 +#define _KONTO_HPP_510 +// ino.end + + +namespace analysis_system { + + +// ino.class.Konto.464.declaration +class Konto +// ino.end +// ino.class.Konto.464.body +{ + // ino.attribute.Kontostand.466.declaration + private: + float kontostand; + // ino.end + + // ino.attribute.Kontonummer.468.declaration + private: + float kontonummer; + // ino.end + + // ino.method.Konto.499.declaration + public: + Konto(void); + // ino.end + + // ino.method.~Konto.496.declaration + public: + virtual ~Konto(void); + // ino.end + + // ino.method.geldEinzahlen.470.declaration + public: + virtual void geldEinzahlen(float betrag); + // ino.end + + // ino.method.geldAbheben.472.declaration + public: + virtual void geldAbheben(float betrag); + // ino.end + + public: + virtual float getKontostand(); +}; +// ino.end + + + + + +}; // namespace analysis system + + +#if !defined(NO_IMPLICIT_NAMESPACE_USE) +using namespace analysis_system; +#endif + +// ino.module.konto.510.endif +#endif +// ino.end + diff --git a/Bachelor/Softwaretechnik/swtBank/main.cpp b/Bachelor/Softwaretechnik/swtBank/main.cpp new file mode 100644 index 0000000..ec2dff1 --- /dev/null +++ b/Bachelor/Softwaretechnik/swtBank/main.cpp @@ -0,0 +1,53 @@ +#include +#include "girokonto.hpp" + +using std::cout; +using std::cin; +using std::endl; + +int main() +{ + Girokonto giro; + int select; + float betrag; + + do { + cout << "GIROKONTO" << endl; + cout << "1: Geld einzahlen" << endl; + cout << "2: Geld abheben" << endl; + cout << "3: Kontostand anzeigen" << endl; + cout << endl << "0: Ende" << endl; + cout << endl << "Eingabe: "; + cin >> select; + switch (select) + { + case 1: { + cout << endl << "Betrag: "; + cin >> betrag; + giro.geldEinzahlen(betrag); + break; + } + case 2: { + cout << endl << "Betrag: "; + cin >> betrag; + if (true == giro.pruefeUeberziehungsKredit(betrag)) + { + giro.geldAbheben(betrag); + cout << endl << "Passt scho..." << endl; + } + else + { + cout << endl << "nix gibts, leider pleite" << endl; + } + break; + } + case 3: { + cout << endl << "Kontostand: "<