Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-generics-challenge

For all following exercises, it is not required to implement the method, only to fix the compilation problems reported by the tests. It is of course forbidden to alter the tests.

The code should be as flexible as possible.

Exercise 1 (easy)

The Exercise1.isVaccinated() should tell us if all animals in the list are vaccinated. It should accept a list of animals and return a boolean.

Exercise 2 (medium)

The Exercise2.addAnimalOfTheMonth() should add a random animal to the list. Its type may be different each month. It should accept a list of animals and return nothing.

Exercise 3 (hard)

The Exercise3.sort() method should sort a collection with the given comparator. It should accept a collection and a comparator and return a list.

Credits

Romeu Moura taught me this exercise at SoCraTes FR 2018. I improved on it by adding automated tests that check the requirements.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages