added address field
This commit is contained in:
parent
c23bc3da31
commit
7ea992c2e3
@ -3,21 +3,42 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
class customer
|
class address final
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
string name;
|
string street_;
|
||||||
string first_name;
|
string street_no_;
|
||||||
string street;
|
string postal_code_;
|
||||||
string street_no;
|
string city_;
|
||||||
string postal_code;
|
|
||||||
string city;
|
|
||||||
int year_of_birth = 1900;
|
|
||||||
string phone_no;
|
|
||||||
bool has_driving_license = false;
|
|
||||||
public:
|
public:
|
||||||
|
address(const string&& street, const string&& street_no, const string&& postal_code, const string&& city) : street_(street),
|
||||||
|
street_no_(street_no),
|
||||||
|
postal_code_(postal_code),
|
||||||
|
city_(city)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class customer final
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
string name_;
|
||||||
|
string first_name_;
|
||||||
|
address address_;
|
||||||
|
unsigned short year_of_birth_ = 1900;
|
||||||
|
string phone_no_;
|
||||||
|
bool has_driving_license_ = false;
|
||||||
|
short reserved_motorcycle_ = -1; // => nothing reserved
|
||||||
|
public:
|
||||||
|
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),
|
||||||
|
address_(address),
|
||||||
|
year_of_birth_(year_of_birth),
|
||||||
|
phone_no_(phone_no),
|
||||||
|
has_driving_license_(has_driving_license)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user