Home ► Lab Exercise ► Object Oriented Programming Lab Exercise Programs ► CPP Program To Implement Encapsulation▼
Alogarithm steps:
CPP Program To Implement Encapsulation #include class myclass { int a, b; public: void init(int i, int j); { a = i; b = j; } void show(); { cout<<”a=”< SAMPLE INPUT AND OUTPUT: a=10 b=20
SAMPLE INPUT AND OUTPUT: a=10 b=20