diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Bachelor/Softwaretechnik1/swtBank/main.cpp | |
| download | Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2 | |
Diffstat (limited to 'Bachelor/Softwaretechnik1/swtBank/main.cpp')
| -rw-r--r-- | Bachelor/Softwaretechnik1/swtBank/main.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Bachelor/Softwaretechnik1/swtBank/main.cpp b/Bachelor/Softwaretechnik1/swtBank/main.cpp new file mode 100644 index 0000000..ec2dff1 --- /dev/null +++ b/Bachelor/Softwaretechnik1/swtBank/main.cpp @@ -0,0 +1,53 @@ +#include <iostream>
+#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: "<<giro.getKontostand() << endl;
+ break;
+ }
+ default: break;
+ }
+ } while (select!=0);
+
+ return 0;
+}
|
