CPP00 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Contact.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Contact.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/03/19 23:59:45 by kamitsui #+# #+# */
9/* Updated: 2025/04/12 14:28:14 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
25#ifndef CONTACT_HPP
26#define CONTACT_HPP
27
28#include <string>
29
37class Contact {
38 private:
39 std::string firstName;
40 std::string lastName;
41 std::string nickName;
42 std::string phoneNumber;
43 std::string darkestSecret;
44
45 public:
46 Contact();
47 void setFirstName(const std::string &firstName);
48 void setLastName(const std::string &lastName);
49 void setNickName(const std::string &nickName);
50 void setPhoneNumber(const std::string &phoneNumber);
51 void setDarkestSecret(const std::string &darkestSecret);
52
58
59 bool isEmpty() const;
60};
61
62#endif // CONTACT_HPP
Defines the Contact class.
Definition Contact.hpp:37
bool isEmpty() const
Check if an object (contact) has empty member variable.
Definition Contact.cpp:105
std::string getLastName() const
Gets the last name
Definition Contact.cpp:77
void setFirstName(const std::string &firstName)
Sets first name of contact.
Definition Contact.cpp:35
std::string getDarkestSecret() const
Gets the darkest secret of contact.
Definition Contact.cpp:98
void setNickName(const std::string &nickName)
Sets the nick name of contact.
Definition Contact.cpp:49
std::string getPhoneNumber() const
Gets the phone number of contact.
Definition Contact.cpp:91
void setDarkestSecret(const std::string &darkestSecret)
Sets the darkest secret of contact.
Definition Contact.cpp:63
void setPhoneNumber(const std::string &phoneNumber)
Sets the phone number of contact.
Definition Contact.cpp:56
std::string getFirstName() const
Gets the first name of contact.
Definition Contact.cpp:70
Contact()
Default constractor for the Contact class.
Definition Contact.cpp:28
void setLastName(const std::string &lastName)
Sets last name of contact.
Definition Contact.cpp:42
std::string getNickName() const
Gets the nick name of contact.
Definition Contact.cpp:84