/* Author: James Tam Version: March 4, 2021 Learning objective: how overriden methods can be accessed via super and non-overriden methods are accessed by default in a multi-level hieararchy. */ public class Driver { public static void main(String [] args) { C c1 = new C(); P p1 = new P(); GP gp1 = new GP(); System.out.println("<<< Child object >>>"); c1.m1(); c1.m2(); c1.m3(); System.out.println("---------"); System.out.println("<<< Parent object >>>"); p1.m1(); p1.m2(); p1.m3(); System.out.println("---------"); System.out.println("<<< Parent of the parent (\"Grand Parent\") object >>>"); gp1.m1(); gp1.m2(); gp1.m3(); System.out.println("---------"); } }