Thomson Reuters interview question

write abstraction encapsulation program