-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextPersonType.h
55 lines (40 loc) · 1.94 KB
/
extPersonType.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 EXTPERSONTYPE_H
#define EXTPERSONTYPE_H
#include <string>
#include "addressType.h"
#include "dateType.h"
#include "personType.h"
using namespace std;
class extPersonType : public personType {
private:
addressType address; // Object variable to store the address
dateType birthDate; // Object variable to store the birthdate
string phoneNumber; // Member variable to store the phoneNumber
string relationShip;// Memeber variable to store the relationship.
public:
void setPhoneNumber(string);
// Function to set phoneNumber.
// Member variable phoneNumber is set according to the parameter.
// Postcondition: phoneNumber = pNumber
void setRelationship(string);
// Function to set relationShip.
// Member variable relationShip is set according to the parameter.
// Postcondition: relationShip = relation
string getPhoneNumber() const;
// Function to return phoneNumber.
// Postcondition: The value of the phoneNumber is returned.
string getRelationship() const;
// Function to return relationShip.
// Postcondition: The value of relationShip is returned.
int getBirthMonth() const;
// Function to return birthMonth.
// Postcondition: The value of birthMonth is returned.
void print() const;
// Function to output the name, address, birthday, phonenumber and relationship of a person.
extPersonType (string = " ", string = " " , int = 1, int = 1, int = 1900, string = " ", string = " ", string = "XX", int = 10000, string = "None", string = "No relation");
// Constructor to set the name, address, birthday, //phonenumber and relationship of a person.
// The member variables address, birthDate, phoneNumber, //relationShip are set according to the parameters.
// Postcondition: phoneNumber = pNumber; relationShip = //relation;
// If no values are specified, the default values are used //to initialize the member variables.
};
#endif