Created
May 23, 2019 04:40
-
-
Save hackjutsu/a8a68e7821f59b0cdd2d1314b4c19361 to your computer and use it in GitHub Desktop.
[medium snippets] #medium #designPattern #StatePattern
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
public class ClientDemo { | |
public static void main(String[] args) { | |
MP3PlayerContext mp3Player = new MP3PlayerContext(); | |
mp3Player.press(); | |
mp3Player.getState(); | |
mp3Player.press(); | |
mp3Player.getState(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment