Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

Using the fragment below , complete the following cade so its compiles . Note , we may not have a fill all of slots : 
Code : 
class AgedP {
_____ _____ _____ _____ _____

public AgedP(int x) {
_____ _____ _____ _____ _____ 

}
}
public clss Kinder extends AgedP { 
_____ ____ ____ _____ _____ _____
public Kinder( int a){

_____ ____ ____ _____ _____ ___();
}
}
   Fragments: Use the following fragments zero or more Times :
   
           --------------------------------
          |  AgedP  |  Super  | this |     |
           --------------------------------
          |    
Class AgedP{
AgedP() {}
public AgedP(int a){
}
}
oublic class Kinder extends AgedP {
pblic Kinder(nt a) {
super ();
}
}
          As there is no dropable tile for th variabl a and the parenthesis are already in place and empty there is no way to cunstruct a call to the super class cinstructor that takes an argument , therefore the only remaning possibilities is to create a call tot he no-argument superclass constructor. this is done as: super();. The line cnanot be left blank , as the parenthesis are already in place