问答题
publicclassCar{privateintwheelCount;privateStringvin;publicCar(Stringvin){this.vin=vin;this.wheelCount=4;}publicStringdrive(){returnzoom-zoom”;}publicStringgetInfo(){returnVIN:+vin+wheels:+wheelCount;}}And:publicclassMeGoextendsCar{publicMeGo(Stringvin){this.wheelCount=3;}}Whattwomusttheprogrammerdotocorrectthecompilationerrors?()
A.insertacalltothis()intheCarconstructor
B.insertacalltothis()intheMeGoconstructor
C.insertacalltosuper()intheMeGoconstructor
D.insertacalltosuper(vin)intheMeGoconstructor
E.changethewheelCountvariableinCartoprotected
F.changeline3intheMeGoclasstosuper.wheelCount=3;
A.vin=vin;this.wheelCount=4;}publicStringdrive(){returnzoom-zoom”;}publicStringgetInfo(){returnVIN:+vin+wheels:+wheelCount;}}And:publicclassMeGoextendsCar{publicMeGo(Stringvin){this.wheelCount=3;}}Whattwomusttheprogrammerdotocorrectthecompilationerrors?()
A.insertacalltothis()intheCarconstructor
B.insertacalltothis()intheMeGoconstructor
C.insertacalltosuper()intheMeGoconstructor
D.insertacalltosuper(vin)intheMeGoconstructor
E.changethewheelCountvariableinCartoprotected
F.changeline3intheMeGoclasstosuper.wheelCount=3;