-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathIT21358302-J H U I B Jayathilake
104 lines (84 loc) · 1.59 KB
/
IT21358302-J H U I B Jayathilake
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
99
100
101
102
//Card.h
class card
{
private:
char cardtype[6];
int OTP;
char cardholder[10];
char cardnumber[10];
char cvc[3];
public:
card();
card(char ctype[],int otp,char cholder[], char cnum[], char ccvc[]);
void vertify();
void displays();
~card();
};
//Card.cpp
#include"card.h"
#include<cstring>
#include<iostream>
#include "client.h"
#include "client.cpp"
using namespace std;
card::card() {
strcpy(cardtype, "");
OTP = 0;
strcpy(cardholder, "");
strcpy(cardnumber, "");
strcpy(cvc, "");
}
card::card(char ctype[], int otp,char cholder[],char cnum[],char ccvc[]) {
strcpy(cardtype, ctype);
OTP = otp;
strcpy(cardholder,cholder);
strcpy(cardnumber,cnum);
strcpy(cvc,ccvc);
}
void card::vertify() {
cout << "Card details are correct" << endl;
}
void card::displays() {
cout << "Payment success" << endl;
}
card::~card() {
cout << "Destructor in process" << endl;
}
//Paypal.h
class paypal
{
private:
int refno;
char paypalid[10];
char paypalpassword[10];
public:
paypal();
paypal(int rno, char paypid[], char payppass[]);
~paypal();
void vertifying();
void Details();
};
//Paypal.cpp
#include "paypal.h"
#include<cstring>
#include<iostream>
using namespace std;
paypal::paypal() {
refno = 0;
strcpy(paypalid, "");
strcpy(paypalpassword, "");
}
paypal::paypal(int rno, char paypid[], char payppass[]) {
refno = rno;
strcpy(paypalid,paypid);
strcpy(paypalpassword,payppass);
}
paypal::~paypal() {
cout << "Destructor in process" << endl;
}
void paypal::vertifying() {
cout << "Payment vertified" << endl;
}
void paypal::Details() {
cout << "Payment success" << endl;
}