13 lines
296 B
Java
Raw Normal View History

2015-09-07 11:44:36 -06:00
// polymorphism/music/Wind.java
2015-06-15 17:47:35 -07:00
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);
}
2015-09-07 11:44:36 -06:00
}