Complete the following code using inheritance class SmartPho
Complete the following code using inheritance class SmartPhone MobileDevice String deviceType; public (){//TODO Auto-generated constructor stub super(); deviceType= \"Smart Phone\", } public String getDeviceType(){return getDeviceType()+\" rightarrow \"+ deviceType;} public setDeviceType(String smartPhoneType){this deviceType =}
Solution
Answers: options in blanks are bold underlined
public class SmartPhone extends MobileDevice {
private String deviceType;
public SmartPhone () {
//TODO Auto generated constructor stub
super();
deviceType=\"Smart Phone\";
}
public String getDeviceType() {
return super.getdeviceType() + \"-> \" + this.deviceType;
}
public void setDeviceType(String smartPhoneType) {
this.deviceType=smartPhoneType;
}
}
