forked from Jahanvi8210/C--programs
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataabs.cpp
More file actions
Latest commit
32 lines (27 loc) · 541 Bytes
/
Copy pathdataabs.cpp
File metadata and controls
32 lines (27 loc) · 541 Bytes
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
#include<iostream>
usingnamespacestd;
classimplementAbstraction
{
private:
int a, b;
public:
// method to set values of
// private members
voidset(int x, int y)
{
a = x;
b = y;
}
voiddisplay()
{
cout<<"a = " <<a << endl;
cout<<"b = " << b << endl;
}
};
intmain()
{
implementAbstraction obj;
obj.set(10, 20);
obj.display();
return0;
}