Created
February 14, 2022 16:15
-
-
Save reevik/25bcdfd2d4d1c2eeb7b810d170ad114f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CatBar { | |
private List<Cat> catFriends = new ArrayList<>(); | |
public void enter(Cat cat) { | |
catFriends.add(cat); | |
} | |
public void singTogether() { | |
for (Cat cat: catFriends) { | |
cat.sing(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment