Allscripts interview question

Basic OOP Question Final Year Project Puzzel