Honeywell interview question

write code for encapsulation, inheritance