資源簡介
Create an interface called Playing. The interface has an abstract method called play(). Create classes called Child, Musician and Actor that implement Playing. Create a program that demonstrates the use of the classes.
Playing.java
Child.java
Musician.java
Actor.java
UsePlaying.java
Sample Output:
I am a child and I am playing a game
I am a musician and I am playing a song
I am an actor and I am playing a part
代碼片段和文件信息
- 上一篇:無線溫濕度傳感器上位機JAVA代碼
- 下一篇:java電子相冊
評論
共有 條評論