-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathIT21353284 - Priyawansha N G D
99 lines (69 loc) · 1.41 KB
/
IT21353284 - Priyawansha N G D
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//Report.h
class Report
{
private:
int report_id;
char report_type[10];
public:
Report();
Report(int repid,char reptype[]);
~Report();
void Display();
void update();
};
//Report.cpp
#include "Report.h"
#include <cstring>
#include <iostream>
using namespace std;
Report::Report() {
report_id = 0;
strcpy(report_type,"");
}
Report::Report(int repid, char reptype[]) {
report_id = repid;
strcpy(report_type,reptype);
}
Report::~Report() {
cout << "Destructor in process" << endl;
}
void Report::Display() {
cout << report_id << endl;
cout << report_type << endl;
}
void Report::update() {
cin >> report_id;
cin >> report_type;
}
//Report ownership.h
class Report_ownership
{
private:
int report_id;
char report_ownershiptype[20];
public:
Report_ownership();
Report_ownership(int ro_id,char ro_type[]);
~Report_ownership();
void display();
};
//Report_ownership.cpp
#include "Report_ownership.h"
#include<cstring>
#include<iostream>
using namespace std;
Report_ownership::Report_ownership() {
report_id = 0;
strcpy(report_ownershiptype,"");
}
Report_ownership::Report_ownership(int ro_id, char ro_type[]) {
report_id = ro_id;
strcpy(report_ownershiptype,ro_type);
}
Report_ownership::~Report_ownership() {
cout << "Destructon in process" << endl;
}
void Report_ownership:: display() {
cout <<"Report id:"<< report_id << endl;
cout << "Report owner type:" << report_ownershiptype << endl;
}