diff --git a/PROGRAM.txt b/PROGRAM.txt index 41ebb8f..eddf72d 100644 --- a/PROGRAM.txt +++ b/PROGRAM.txt @@ -9,22 +9,22 @@ class BiCycle{ } class MotorCycle extends BiCycle{ + String define_me(){ return "a cycle with an engine."; } MotorCycle(){ System.out.println("Hello I am a motorcycle, I am "+ define_me()); - // super.define_me(){ - // return "a vehicle with pedals."; - //} - super.define_me(); + // super.define_me(){ + // return "a vehicle with pedals."; + + super.define_me(); String temp="a vehicle with pedals."; //Fix this line - System.out.println("My ancestor is a cycle who is "+ temp ); } - } + class Solution{ public static void main(String []args){ MotorCycle M=new MotorCycle();