Giventhefollowinginterfacedefinition,whichdefinitionsarevalid?()interfaceI{voidsetValue(intval);intgetValue();}DEFINITIONa:(a)classaextendsI{intvalue;voidsetValue(intval){value=val;}intgetValue(){returnvalue;}}DEFINITIONb:(b)interfacebextendsI{voidincrement();}DEFINITIONc:(c)abstractclasscimplementsI{intgetValue(){return0;}abstractvoidincrement();}DEFINITIONd:(d)interfacedimplementsI{voidincrement();}DEFINITIONe:(e)classeimplementsI{intvalue;publicvoidsetValue(intval){value=val;}}
Giventhefollowinginterfacedefinition,whichdefinitionsarevalid?()
interfaceI{
voidsetValue(intval);
intgetValue();
}
DEFINITIONa:
(a)classaextendsI{intvalue;
voidsetValue(intval){value=val;
}
intgetValue(){
returnvalue;
}
}
DEFINITIONb:
(b)interfacebextendsI{
voidincrement();
}
DEFINITIONc:
(c)abstractclasscimplementsI{
intgetValue(){
return0;
}abstractvoidincrement();
}
DEFINITIONd:
(d)interfacedimplementsI{voidincrement();}
DEFINITIONe:
(e)classeimplementsI{intvalue;
publicvoidsetValue(intval){value=val;}}