1. In the vo package, create public User, Location, Server, Subject, and Subscription classes, which inherit NamedItem. 2. In the Solution class, for each class, create a method that returns a list of instances of the class.
Sometimes anonymity is so nice!
You must be signed in to leave a comment
16 November 2022, 12:09
The task instructions tell you to implement the query correctly for all classes, however there is no validation for this part, so in the validator even a solution where the methods responsible for the queries return null still passes.
2 January 2022, 15:26
The biggest trick with this one is recognizing how to properly apply the necessary method. Remember that, when it comes to using an object method, the format is object.method. And remember that this type of return statement is valid (well, assuming that the Cat constructor assigns a name):In this sense, the method body begins with "return new Cat" but returns a String object. In the same sense, for the longest time this task confused me because the getUser() method must return a List object, but the method body must begin with "return new AbstractDbSelectExecutor" which is not a list. So think about the above example and how it applies to this. Remember that when you create an object via an anonymous inner class, the object ends with the closing bracket. That should tell you how to apply a method to the object.
14 October 2021, 15:08
make sure your getUsers etc methods are public, otherwise it wont validate.