Kunde erstellen #6

Merged
holger merged 4 commits from CreateCustomer into master 2018-12-23 17:48:28 +01:00
Showing only changes of commit fa1dc0d19a - Show all commits

View File

@ -19,6 +19,17 @@ public:
} }
}; };
class reservation final
{
private:
tm start_ = {};
tm end_ = {};
short motorcycle_ = -1; // => nothing reserved
string customer_name_;
string costumer_first_name_;
public:
};
class customer final class customer final
{ {
private: private:
@ -28,7 +39,6 @@ private:
unsigned short year_of_birth_ = 1900; unsigned short year_of_birth_ = 1900;
string phone_no_; string phone_no_;
bool has_driving_license_ = false; bool has_driving_license_ = false;
short reserved_motorcycle_ = -1; // => nothing reserved
public: public:
customer(string&& name, string&& first_name,address&& address, unsigned short&& year_of_birth, string&& phone_no, bool&& has_driving_license) : name_(name), customer(string&& name, string&& first_name,address&& address, unsigned short&& year_of_birth, string&& phone_no, bool&& has_driving_license) : name_(name),
first_name_(first_name), first_name_(first_name),
@ -41,6 +51,27 @@ public:
} }
}; };
/**
* \brief ask a question and get a answer.
* \tparam T return parameter
* \param question the question.
* \return the value.
*/
template <typename T>
T ask_question(const string& question)
{
cout << question << endl;
cout << "> ";
T value;
cin >> value;
return value;
}
void create_customer();
void create_reservation();
void take_reservation();
void export_reservations();
int main() int main()
{ {
std::cout << "Hello World!\n"; std::cout << "Hello World!\n";