P.24 (Make the Code of Key Class More Generic)


// Add two more variables
private String key;
private String sound;

// Update the Key() method
public Key(String keyName,
           String soundFile) {
  key = keyName;
  sound = soundFile;
}
Last modified on
Engineering DIY Workshop 2018