Last active
November 26, 2019 14:58
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
interface Video{ | |
public void play(); | |
} | |
class Netflix{ | |
public Video search(String searchQuery){ | |
//.. implement search function | |
} | |
} | |
class Hulu{ | |
public Video search(String searchQuery){ | |
//.. implement search function | |
} | |
} | |
class AmazonVideo{ | |
public Video search(String searchQuery){ | |
//.. implement search function | |
} | |
} | |
class Hbo{ | |
public Video search(String searchQuery){ | |
//.. implement search function | |
} | |
} | |
class CentralVideoStreamingPlatform{ | |
public void add(Netflix netflix){} | |
public void add(Hulu hulu){} | |
public void add(AmazonVideo amazonVideo){} | |
public void add(Hbo hbo){} | |
public Video searchVideo(String searchQuery){ | |
//.. implement search fucntion | |
} | |
public void play(Video selectedVideo){} | |
private ArrayList<VideoStreamingPlatform> platforms = new ArrayList<VideoStreamingPlatform>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment