Java language Create basic remote class has these functions

Java language.

Create basic remote class has these functions :

On()
Off()
Volup
Voldn

Then create Class tv implements remote interface and Class dvd extends tv implements remote {using Tostring() , equals()}

You can add extra functions as you want. Thank you

Solution

public interface Remote

{

public void On();

public void Off();

public void volUp();

public void volDn();

}

public class TV implements Remote

{

public void On()

{

System. out.println(\"On\");

}

public void Off()

{

System.out.println(\"Off\");

}

public void volUp()

{

System.out.println(\"volume up by 1 percent\");

}

public void volDn()

{

System.out.println(\"volume down by 1 percent\");

}

}

public class Dvd extends TV implements Remote

{

public String toString()

{

return \"Dvd inserted\";

}

public boolean equals(Dvd d)

{

return this.equals(d);

}

}

Java language. Create basic remote class has these functions : On() Off() Volup Voldn Then create Class tv implements remote interface and Class dvd extends tv
Java language. Create basic remote class has these functions : On() Off() Volup Voldn Then create Class tv implements remote interface and Class dvd extends tv

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site