-
Notifications
You must be signed in to change notification settings - Fork 0
/
Member.h
55 lines (46 loc) · 1.3 KB
/
Member.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef MEMBER_H
#define MEMBER_H
#include <string>
/**
* @class Member
* @brief Represents a member of the library with a name, ID, and optional contact info.
*/
class Member {
private:
std::string name;
std::string memberID;
std::string contactInfo; // Optional: phone number or email
public:
/**
* @brief Constructor to initialize a Member object.
* @param name Name of the member.
* @param memberID Unique ID for the member.
* @param contactInfo Contact information of the member (optional).
*/
Member(const std::string& name, const std::string& memberID, const std::string& contactInfo = "");
/**
* @brief Gets the name of the member.
* @return Name of the member.
*/
std::string getName() const;
/**
* @brief Gets the member ID.
* @return Member ID.
*/
std::string getID() const;
/**
* @brief Gets the contact information of the member.
* @return Contact information.
*/
std::string getContactInfo() const;
/**
* @brief Sets the contact information of the member.
* @param contactInfo New contact information.
*/
void setContactInfo(const std::string& contactInfo);
/**
* @brief Displays the member's information.
*/
void display() const;
};
#endif // MEMBER_H