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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| #include <iostream>
#include <array>
#include<string>
#include <iterator>
#include<algorithm>
#include "Klasse CBank.h"
#include "CKonto.h"
#include "Klasse CInhaber.h"
using namespace std;
void main (void)
{
CBank A;
A.StartProjekt();
}
==================================================================================================
==================================================================================================
Headerdatei
class CBank
{
protected:
// KontoInhaber
char Namen[50];
std::array<unsigned int, 8> IdentNr = {11, 13, 17, 19, 23, 29, 31, 37}; // "Error=Data member initializer ist not allowed"
std::array<unsigned int, 8> KtoNr = {111, 113, 117, 119, 123, 129, 131, 137}; // "Error=Data member initializer ist not allowed"
public:
void StartProjekt (void);
void Auswahlverfahren(int Auswahl);
// Konstruktor
};
======================================================================================
======================================================================================
Methode
// -------------------------------------> Methode fuer das Menue <----------------------------------------------
#include <iostream>
#include <array>
#include<string>
#include "Klasse CBank.h"
using namespace std;
void CBank::StartProjekt (void)
{
int Wahl;
cout <<"----------------->> KONTOVERWALTUNG <<----------------\n\n"<<endl;
while(1)
{
cout <<"Eingabe-Menue:\n"
<<" [1] Einzahlung auf ein Konto;\n"
<<" [2] Auszahlung von einem Konto;\n"
<<" [3] Zuordnung eines Kontos zu einem Inhaber;\n"
<<" [4] Zuordung loeschens;\n"
<<" [5] Aktuelle Zuordnungsliste;\n"
<<" [6] Liste aller Kontoinhaber und aller Konten;\n"
<<" [0] Programmende.\n"
<<"\nGeben Sie einen der Menuepunkte ein: "; cin>>Wahl;
Auswahlverfahren(Wahl);
}
}
void CBank::Auswahlverfahren(int Auswahl)
{
switch(Auswahl)
{
case 0:
cout<<"\nFin du Programme!!!"<<"\n"<<endl; break;
case 1:
cout<<"\nVersement!"<<"\t"<<"Einzahlung auf ein Konto"<<"\n"<<endl; break;
case 2:
cout<<"Retrait!"<<"\n"<<endl; break;
case 3:
cout<<"Attribution de compte a une personne!"<<"\n"<<endl; break;
case 4:
cout<<"Supprimmer le compte!"<<"\n"<<endl; break;
case 5:
cout<<"Liste d attribution des comptes!"<<"\n"<<endl; break;
case 6:
cout<<"Liste des personnes et comptes!"<<"\n"<<endl; break;
default:
break;
}
} |
Partager