Datasets:
ArXiv:
License:
Download data/test/Hugo-Gao/Design-pattern/Observer/src/bookstoreex/Main.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/test/Hugo-Gao/Design-pattern/Observer/src/bookstoreex/Main.java
- Command line
-
hf download hf://datasets/RepoFusion/Stack-Repo/data/test/Hugo-Gao/Design-pattern/Observer/src/bookstoreex/Main.java
-
curl -L -o Main.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/test/Hugo-Gao/Design-pattern/Observer/src/bookstoreex/Main.java
565 Bytes
| package bookstoreex; | |
| /** | |
| * Created by Administrator on 2017/6/16. | |
| */ | |
| public class Main | |
| { | |
| public static void main(String[] args) | |
| { | |
| BookStore bookStore = new BookStore(); | |
| Student xiaoming = new Student("小明", bookStore); | |
| Student xiaohua = new Student("小华", bookStore); | |
| Student xiaozhang = new Student("小张", bookStore); | |
| bookStore.newBookComing("知音漫客"); | |
| bookStore.newBookComing("故事会"); | |
| bookStore.newBookComing("看天下"); | |
| bookStore.registerObserver(xiaohua); | |
| } | |
| } | |