Walmart interview question

Basic oops concepts, few programs.