2015-09-07 11:44:36 -06:00

14 lines
337 B
Java

// polymorphism/music/Wind.java
// ©2015 MindView LLC: see Copyright.txt
package polymorphism.music;
// Wind objects are instruments
// because they have the same interface:
public class Wind extends Instrument {
// Redefine interface method:
@Override
public void play(Note n) {
System.out.println("Wind.play() " + n);
}
}