// Trace2 Example. // Draw the reference diagram, trace the instance // variable changes and predict the output. public class Main2 { public static void main(String[ ] args) { C c = new C( ); System.out.println(c.f( )); System.out.println(c.g( )); System.out.println(c); D d = new D(4, 5); System.out.println(d.f( )); System.out.println(d.g( )); System.out.println(d); } } // Output: 15 28 35 33 24 2913