Question 5
Consider the code given below.
class Person { public void work() { System.out.println("works as a person."); }}class Teacher extends Person { public void work() { System.out.println("Works as teacher."); } public void grade() { System.out.println("Grading papers."); }}class MathTeacher extends Teacher { public void solveEquation() { System.out.println("Solving complex equations."); }}public class SchoolTest { public static void main(String[] args) { Teacher t = new MathTeacher(); // LINE 1 t.work(); t.grade(); // LINE 2 t.solveEquation(); // LINE 3 }}Choose the correct option.