package java_problems.object_oriented_programming;

class BiCycle
{
   String define_me()
   {
      return "a vehicle with pedals.";
   }
}

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());
      String temp=super.define_me();
      System.out.println("My ancestor is a cycle who is "+ temp );
   }
   
}
class MethodOverriding2 {
   public static void main(String []argh)
   {
      MotorCycle M=new MotorCycle();
   }
}
@@ -51,61 +51,593 @@
 %0D%0A%0D%0A
-class BiCycle%0D%0A%7B%0D%0A   String define_me()%0D%0A   %7B%0D%0A      
+/*%0D%0A * Problem Statement%0D%0A * %0D%0A * When a method in a subclass overrides a method in superclass, it is still%0D%0A * possible to call the overridden method using super keyword. If you write%0D%0A * super.func() to call the function func(), it will call the method that was%0D%0A * defined in the superclass.%0D%0A * %0D%0A * You are given a code in the editor. Modify exactly 1 line so that the code%0D%0A * prints the following text:%0D%0A * %0D%0A * Hello I am a motorcycle, I am a cycle with an engine.%0D%0A * My ancestor is a cycle who is a vehicle with pedals.%0D%0A */%0D%0Aclass BiCycle %7B%0D%0A%09%0D%0A%09String define_me() %7B%0D%0A%09%09%0D%0A%09%09
 retu
@@ -666,19 +666,17 @@
 als.%22;%0D%0A
-   
+%09
 %7D%0D%0A%7D%0D%0A%0D%0A
@@ -711,16 +711,16 @@
 ycle
+ %7B
 %0D%0A
-%7B%0D%0A   
+%09%0D%0A%09
 Stri
@@ -733,30 +733,26 @@
 ine_me()
-%0D%0A   %7B%0D%0A      
+ %7B%0D%0A%09%09%0D%0A%09%09
 return %22
@@ -782,48 +782,37 @@
 %22;%0D%0A
-   %7D%0D%0A   %0D%0A   MotorCycle()%0D%0A   %7B%0D%0A      
+%09%7D%0D%0A%0D%0A%09MotorCycle() %7B%0D%0A%09%09%0D%0A%09%09
 Syst
@@ -858,16 +858,17 @@
 , I am %22
+ 
 + define
@@ -876,22 +876,18 @@
 me());%0D%0A
-      
+%09%09
 String t
@@ -889,17 +889,19 @@
 ing temp
-=
+ = 
 super.de
@@ -912,22 +912,18 @@
 _me();%0D%0A
-      
+%09%09
 System.o
@@ -969,33 +969,30 @@
 is %22
+ 
 + temp
- 
 );%0D%0A
-   %7D%0D%0A   
+%09%7D%0D%0A
 %0D%0A%7D%0D%0A
+%0D%0A
 clas
@@ -1014,19 +1014,20 @@
 ing2 %7B%0D%0A
-   
+%09%0D%0A%09
 public s
@@ -1052,30 +1052,57 @@
 ring
- 
 %5B%5D
+ 
 argh)
-%0D%0A   %7B%0D%0A      
+ %7B%0D%0A%09%09%0D%0A%09%09@SuppressWarnings(%22unused%22)%0D%0A%09%09
 Moto
@@ -1109,17 +1109,19 @@
 rCycle M
-=
+ = 
 new Moto
@@ -1135,11 +1135,9 @@
 );%0D%0A
-   
+%09
 %7D%0D%0A%7D

Update MethodOverriding2