blob: d2dd4b9ceeb841165927283a49458f53c2b4ff91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include <iostream>
#include "konto.hpp"
#include "girokonto.hpp"
using std::cin;
using std::cout;
using std::endl;
using systemModel::AnalyseModell::Konto;
using systemModel::AnalyseModell::Girokonto;
int main()
{
Girokonto geldspeicher;
float betrag;
int input;
do {
cout << "1: Geld einzahlen"<<endl;
cout << "2: Geld abheben"<<endl;
cout << "3: Kontostand anzeigen"<<endl;
cout << "0: Ende"<<endl;
cin >> input;
switch (input) {
case 1:{
cout << "Betrag einzahlen: ";
cin >> betrag;
geldspeicher.geldEinzahlen(betrag);
break;
}
case 2: {
cout << "Betrag abheben: ";
cin >> betrag;
if(true == geldspeicher.pruefeUeberziehungsKredit(betrag))
geldspeicher.geldAbheben(betrag);
break;
}
case 3: cout << "Kontostand: " << geldspeicher.getKontostand() << endl;
break;
default: break;
}
}while(input!=0);
return 0;
}
|