Created
November 18, 2019 14:37
-
-
Save Naomi-Dennis/86bcb121205b7ff7ad43214350f5d1ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Laptop{} | |
class DisplayPortCord{ | |
public void connect(Laptop device){ | |
connectedDevice = device; | |
} | |
private Laptop connectedDevice; | |
} | |
class Monitor{ | |
public Monitor(DisplayPortCord videoConnector){ | |
this.videoConnector = videoConnector; | |
} | |
public void connectToDevice(Laptop device){ | |
videoConnector.connect(device); | |
} | |
private DisplayPortCord videoConnector; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment