Created
September 14, 2018 07:08
-
-
Save dibakarsutradhar/444bb0d51eb65eaae6806a4d94c7db9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class abstraction { | |
private: | |
int a, b; | |
public: | |
void set(int x, int y) { | |
a = x; | |
b = y; | |
} | |
void display() { | |
cout << "a = " << a <<endl; | |
cout << "b = " << b <<endl; | |
} | |
}; | |
int main() { | |
abstraction obj; | |
obj.set(1, 2); | |
obj.display(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment