Animal set

  • 5
  • Locked
Let's add animals to sets. First, we'll create Cat and Dog classes and then createCats and createDogs methods, which will return sets with dogs and cats. We'll write a join method that returns the union of the dog and cat sets. To handle any unfriendliness, we'll create the removeCats method, which removes cats from pets. And finally — the printPets method, which displays everything in pets.
You can't complete this task, because you're not signed in.