1
2
public class Main {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
public interface Device {
void turnOn();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
public class Projector implements Device{
@Override
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
public class SurroundSoundSystem implements Device {
@Override
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
public class TV implements Device{
public void turnOn() {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
public class RemoteControl {
private Device device = null;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

There was a problem connecting to the server.

Please check your connection and try running the trinket again.

Run your code first!

It looks like you haven't tried running your new code.

Try clicking  Run and if you like the result, try sharing again.

×