undefined

Practice inheriting nested classes

Java Multithreading
Level 4 , Lesson 4
Available

"Hi, Amigo!"

"Here's a spiffy set of tasks for you. I hope you like them:"

undefined
13
Task
Java Multithreading, level 4, lesson 4
Locked
Refactoring Rectangle
In the Rectangle class: 1. Change the getHeight and getWidth methods so that they return HasHeight and HasWidth objects, respectively. 2. To do this, inside the getHeight and getWidth methods, create local classes that implement the interfaces.
undefined
26
Task
Java Multithreading, level 4, lesson 4
Locked
Black box
1. Repair the logic of the someAction method for the solutionAction field. 2. See the comment on the main method for example output. 3. Hint: if param > 0, then the someAction method of an anonymous class in the solutionAction field should call a method of the FirstClass subclass.
undefined
7
Task
Java Multithreading, level 4, lesson 4
Locked
Inheriting an inner class
Inside the Solution class, create 2 public inner classes: ThreeBedroomApt and BigHall. Make them inherit Apartment and Hall.
Comments (4)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
null Level  26, Orlando, United States
11 August 2020
BlackBox task is confusing. Need better explanation
Henrique Level  41, São Paulo, Brazil
29 July 2020
My impression is that a lot of these tasks are deliberately confusing. On the first one, e.g., if we follow exactly the steps that Kim gave us on the last lesson, the code won't work (it won't even compile). So we'll have to search for the solution somewhere else, which makes the task not "easy" at all. There's a lack of explanation and exemples. Fortunately we have some people on the help session that already passed such tasks, so we can copy and paste their codes, hoping that one day we will find explanations and will understand the solutions.