Working on

#1
This commit is contained in:
Holger Boerchers 2018-12-23 12:52:43 +01:00
parent fa1dc0d19a
commit 0c15d4fbf3

View File

@ -1,5 +1,6 @@
#include <iostream>
#include <string>
#include <list>
using namespace std;
@ -69,10 +70,45 @@ T ask_question(const string& question)
void create_customer();
void create_reservation();
void take_reservation();
void rent_a_motorcycle();
void export_reservations();
list<reservation> reservations;
int main()
{
std::cout << "Hello World!\n";
while (true)
{
system("cls");
cout << "Motorradvermietung (" << reservations.size() << " Reservierungen)" << endl << endl;
cout << "Bitte w\x84hlen Sie eine Option:" << endl;
cout << "1: Erstellen eines Kunden" << endl;
cout << "2: Erstellen einer Reservierung" << endl;
cout << "3: Motorrad herausgeben" << endl;
cout << "4: Reservierungen exportieren" << endl;
cout << endl;
cout << "0: Programm beenden" << endl;
const auto input = ask_question<int>("Ihre Eingabe:");
switch (input)
{
case 1:
create_customer();
break;
case 2:
create_reservation();
break;
case 3:
rent_a_motorcycle();
break;
case 4:
export_reservations();
break;
case 0:
return 0;
default:
cout << "Unerlaubte Eingabe" << endl;
system("pause");
}
}
}