-
Notifications
You must be signed in to change notification settings - Fork 1
/
Person_Task1.h
82 lines (68 loc) · 1.35 KB
/
Person_Task1.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/** Person class to define persons in a C++ code.
*
* #include "Person_Task1.h" <BR>
* -llib
*
*/
#ifndef PERSON_TASK1_H
#define PERSON_TASK1_H
// SYSTEM INCLUDES
#include<iostream>
// Person class definition
class Person {
public:
// LIFECYCLE
/** Default + Overloaded constructor.
*/
Person(char* = NULL, int = 0, char = '/0', char* = NULL);
/** Copy constructor.
*/
Person(const Person&);
/** Destructor.
*/
~Person();
/** assignment operator.
*/
Person& operator =(const Person&);
// OPERATIONS
/** function that depicts eating of Person.
*
* @param void
*
* @return void
*/
void Eat();
/** function that depicts walking of Person.
*
* @param void
*
* @return void
*/
void Walk();
// ACCESS
// setters
void SetName(char* = NULL);
void SetAge(int = 0);
void SetGender(char = '/0');
virtual void SetDesignation(char* = NULL) = 0;
void SetPerson(char* = NULL, int = 0, char = '/0');
/**
# @overload void SetPerson(const Person& aPerson);
*/
void SetPerson(const Person& aPerson);
// getters
char* GetName() const;
int GetAge() const;
char GetGender() const;
const Person& GetPerson()const;
// DATA MEMBERS
protected:
char* mDesignation;
private:
char* mName;
int mAge;
char mGender;
};
// end class Person
#endif
// _PERSON_TASK1_H_