-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMember.cpp
46 lines (35 loc) · 887 Bytes
/
Member.cpp
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
#include "Member.h"
// default constructor -- does nothing
Member::Member() {
}
// main constructor
// take a pre-made ID number from Library class and
// create a Member object with that
Member::Member(int id) {
m_id = id;
std::cin.ignore();
// temp variables to take in the info
std::string name;
std::string address;
std::string city;
std::string state;
int zipcode;
std::cout << "Enter the name of the member: ";
std::getline(std::cin, name);
m_name = name;
std::cout << "Enter the address of the member: ";
std::getline(std::cin, address);
m_address = address;
std::cout << "Enter the city: ";
std::getline(std::cin, city);
m_city = city;
std::cout << "Enter the state (2 letters): ";
std::cin >> state;
m_state = state;
std::cout << "Enter the zipcode: ";
std::cin >> zipcode;
m_zipcode = zipcode;
}
// default deconstructor
Member::~Member() {
}