Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Person
- {
- private:
- string m_FirstName, m_LastName, m_telephone, m_email;
- public:
- Person(const string& firstName, const string& lastName) :
- m_FirstName(firstName), m_LastName(lastName)
- {}
- string get_name() const
- {
- return m_FirstName;
- }
- string get_surname() const
- {
- return m_LastName;
- }
- bool has_telephone_p()
- {
- if (m_telephone == "")
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- bool has_email_p()
- {
- }
- };
- int main()
- {
- string f, l;
- cout << "Enter fist name: ";
- cin >> f;
- cout << "Enter Last name: ";
- cin >> l;
- Person p(f, l);
- cout << p.get_name() << " " << p.get_surname() << endl;
- cout << p.has_telephone_p() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement