CodeGym /Courses /Java Collections /Tasks | Level 7 | Lesson 6

Tasks | Level 7 | Lesson 6

Java Collections
Level 7 , Lesson 6
Available
9
Task
Java Collections, level 7, lesson 6
Locked
Find the class by its description
The getExpectedClass method must return a class that matches the following description: 1. It implements the Map interface. 2. It is used when working with threads. 3. It a non-blocking version of a skip list that has been adapted for hash tables.
9
Task
Java Collections, level 7, lesson 6
Locked
Bug fix
The getExpectedMap method is used everywhere in your huge project. At some point, the testers discovered that the getExpectedMap method throws a NullPointerException. The expected behavior is described in the main method's comments.
9
Task
Java Collections, level 7, lesson 6
Locked
Ambiguous behavior for NULL
Change the implementation of the getExpectedMap method. It must return an object of a class that has the opposite behavior when adding a null reference. See the example output in the main method. Don't change the rest of the code..
18
Task
Java Collections, level 7, lesson 6
Locked
Caching proxy
The Proxy pattern provides an object that controls access to another object. You need to create a CachingProxyRetriever class in the retrievers package. It will provide the same functionality as the OriginalRetriever class, but with one important addition.
Comments (1)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Justin Smith Level 41, Greenfield, USA, United States
7 February 2023
The correct solution for the second one, Bug Fix, does not produce the desired output indicated in the commented section. The order of several outputs are different. Because of the fact that the task begins with TreeMap, I assumed that the order of outputs mattered. I ended up wasting a lot of time trying find a solution that would output in the order it said it wanted, finally gave up and looked at the solution, only to find that it was something I had already tried, and the task passed even though the output is wrong.