Company: Embitel
Difficulty: medium
Problem Title: Exam Application An organization needs to build an exam application with 4 classes: Exam , Question , Physics , and Maths . The hierarchy structure of classes is shown below: Question Physics Maths Physics and Maths are inherited from the Question class and implement the parameterized constructor. Class Physics should contain the following private member variables: statement - A string answers - An array of strings Class Maths should contain the following private member variables: statement - A string answer - A string Both classes, Physics and Maths , implement the following functions: getStatement() - Returns the value of the variable statement . checkAnswer(answerToCheck) - Checks if the answer equals the answer or not for class Maths . Input Format The input consists of the necessary data to create instances of the classes. Output Format The output should return the results of the implemented functions for the classes. Constraints Each class should adhere to the spec