14 lines
344 B
Java
Raw Normal View History

2015-04-20 15:36:01 -07:00
//: polymorphism/music/Wind.java
2015-05-29 14:18:51 -07:00
// <20>2015 MindView LLC: see Copyright.txt
2015-04-20 15:36:01 -07:00
package polymorphism.music;
// Wind objects are instruments
// because they have the same interface:
public class Wind extends Instrument {
// Redefine interface method:
2015-05-05 11:20:13 -07:00
@Override
2015-04-20 15:36:01 -07:00
public void play(Note n) {
System.out.println("Wind.play() " + n);
}
} ///:~