created customer, reservation and address
This commit is contained in:
parent
7ea992c2e3
commit
fa1dc0d19a
@ -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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user