Skip to content

Instantly share code, notes, and snippets.

@reevik
Created February 14, 2022 16:13
Show Gist options
  • Save reevik/c6125eea9c50ab1d4b731fc61cdc2969 to your computer and use it in GitHub Desktop.
Save reevik/c6125eea9c50ab1d4b731fc61cdc2969 to your computer and use it in GitHub Desktop.
public class Cat {
private AnimalSound sound;
public Cat(AnimalSound animalSound) {
this.sound = animalSound;
}
public void sing() {
soundEffect(sound);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment