-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAgent.h
45 lines (33 loc) · 839 Bytes
/
Agent.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
/*
* Agent.h
*
* Created on: Jun 25, 2018
* Author: Eddie L
*
* Represents an insurance agent.
* Each agent is given a unique id when added to an agency.
* An agent is assigned a commission rate.
*/
#ifndef AGENT_H_
#define AGENT_H_
#include <cstdint>
#include <iostream>
class Agent {
public:
using AgentId = std::uint32_t;
// Class variable to generate a unique id for each agent instance.
static AgentId agentId;
Agent(const std::string&, const float);
~Agent();
Agent(Agent&& rhs);
Agent& operator=(Agent&& rhs);
void setCommissionRate(const float);
float getCommissionRate() const;
AgentId getUniqueId() const;
std::string getName() const;
private:
float m_commissionRate;
std::string m_agentName;
AgentId m_uniqueAgentId;
};
#endif /* AGENT_H_ */