-
Notifications
You must be signed in to change notification settings - Fork 2
/
actor.cpp
54 lines (47 loc) · 798 Bytes
/
actor.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
47
48
49
50
51
52
53
54
#include "actor.h"
#include<sstream>
#include<iostream>
using namespace std;
Actor::Actor(int num, string name, string id)
{
this->num=num;
this->name=name;
this->id=id;
}
int Actor::getNum()
{
return this->num;
}
string Actor::getName()
{
return this->name;
}
string Actor::getID()
{
return this->id;
}
void Actor::setNum(int num)
{
this->num=num;
}
void Actor::setName(string name)
{
this->name=name;
}
void Actor::setID(string id)
{
this->id=id;
}
string Actor::toString()
{
string sb="Actor Details - ";
sb.append("Number: ");
ostringstream temp;
temp<<this->getNum();
sb.append(temp.str());
sb.append(", ");
sb.append("Name:" + this->getName());
sb.append(", ");
sb.append("Id:" + this->getID());
return sb;
}