-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package item20; | ||
|
||
import java.applet.AudioClip; | ||
|
||
public interface Singer { | ||
AudioClip sing(Song s); | ||
default void singSomeThing(){ | ||
System.out.println("SING!!"); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package item20; | ||
|
||
import java.applet.AudioClip; | ||
|
||
public interface SingerSongWriter extends Singer, SongWriter { | ||
AudioClip strum(); | ||
void actSensitive(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package item20; | ||
|
||
import java.applet.AudioClip; | ||
|
||
public class SingerSongWriterImpl implements SingerSongWriter{ | ||
@Override | ||
public AudioClip strum() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void actSensitive() { | ||
|
||
} | ||
|
||
@Override | ||
public AudioClip sing(Song s) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Song compose(int chartPosition) { | ||
return null; | ||
} | ||
|
||
public static void main(String[] args) { | ||
Singer singer = new SingerSongWriterImpl(); | ||
singer.singSomeThing(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package item20; | ||
|
||
public class Song { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package item20; | ||
|
||
public interface SongWriter { | ||
Song compose(int chartPosition); | ||
} |