本文整理汇总了Java中polymorphism.music.Note类的典型用法代码示例。如果您正苦于以下问题:Java Note类的具体用法?Java Note怎么用?Java Note使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Note类属于polymorphism.music包,在下文中一共展示了Note类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import polymorphism.music.Note; //导入依赖的package包/类
public static void main(String[] args) {
RandomOrchestraGenerator gen = new RandomOrchestraGenerator();
Instrument8[] orchestra = new Instrument8[12];
for (int i = 0; i < orchestra.length; i++) {
orchestra[i] = gen.next();
if (i < 10) {
System.out.print(i + 1 + ". ");
} else {
System.out.print(i + 1 + ". ");
}
System.out.println(orchestra[i].toString());
orchestra[i].adjust();
orchestra[i].play(Note.MIDDLE_C);
}
}
示例2: main
import polymorphism.music.Note; //导入依赖的package包/类
public static void main(String[] args) {
Instrument7[] orchestra = { new Wind7(), new Percussion7(),
new Stringed7(), new Brass7(), new Woodwind7(),
new Electronic7() };
for (Instrument7 i7 : orchestra) {
i7.play(Note.MIDDLE_C);
i7.adjust();
System.out.println(i7);
}
}
示例3: play
import polymorphism.music.Note; //导入依赖的package包/类
public void play(Note n) {
print(this + ".play() " + n);
}
示例4: tune
import polymorphism.music.Note; //导入依赖的package包/类
static void tune(Instrument i) {
// ...
i.play(Note.MIDDLE_C);
}
示例5: play
import polymorphism.music.Note; //导入依赖的package包/类
public void play(Note n) {
print("Wind.play() " + n);
}
示例6: tune
import polymorphism.music.Note; //导入依赖的package包/类
public static void tune(Instrument i) {
// ...
i.play(Note.MIDDLE_C);
}
示例7: tune
import polymorphism.music.Note; //导入依赖的package包/类
public static void tune(Instrument i) {
// ...
i.play(Note.MIDDLE_C);
}
示例8: play
import polymorphism.music.Note; //导入依赖的package包/类
public void play(Note n) {
print("Wind.play() " + n);
}
示例9: tune
import polymorphism.music.Note; //导入依赖的package包/类
static void tune(Instrument i) {
// ...
i.play(Note.MIDDLE_C);
}
示例10: play
import polymorphism.music.Note; //导入依赖的package包/类
public void play(Note n) {
print(this + ".play() " + n);
}
示例11: tune
import polymorphism.music.Note; //导入依赖的package包/类
static void tune(Instrument5 i) {
// ...
i.play(Note.MIDDLE_C);
}
示例12: play
import polymorphism.music.Note; //导入依赖的package包/类
void play(Note n) {
print(this + ".play() " + n);
}
示例13: tune
import polymorphism.music.Note; //导入依赖的package包/类
public static void tune(Instrument i) {
i.play(Note.MIDDLE_C);
}
示例14: play
import polymorphism.music.Note; //导入依赖的package包/类
public void play(Note n) {
System.out.println(this + ".play() " + n);
}
示例15: tune
import polymorphism.music.Note; //导入依赖的package包/类
public static void tune(Playable i) {
i.play(Note.MIDDLE_C);
}