CodeGen International interview question

Make following code according to Encapsulation technique.

Interview Answer

Anonymous

13 Mar 2022

I change the access specifier of data members as private. Then implement the public getters and setters.

3