Infosys Interview Question

Code for encapsulation and abstraction.