Esempio n. 1
0
 public void tuneInstrument(MusicInstrument inst) throws MyMusicInstrumentException {
   if (inst.getName().equals("")) {
     throw new MyMusicInstrumentException("Exception");
   }
   inst.tune();
 }
Esempio n. 2
0
 public ArrayList<String> getNamesOfInstrument() {
   for (MusicInstrument inst : instruments) {
     allInstrumentNames.add(inst.getName());
   }
   return allInstrumentNames;
 }