Table

  • 10
  • Locked
Change the TableInterfaceWrapper class so that it wraps TableInterface. The setModel method should display the number of elements in the new list before updating the model. The getHeaderText method should return the text in upper case. Use the toUpperCase() method.
You can't complete this task, because you're not signed in.
Comments (13)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
DarthGizka
Level 24 , Wittenberg, Germany
6 June 2021, 16:21
task1815 (Table) PITFALL: your fingers (or IntelliJ) might tempt you to make the wrapper class static. You should resist that temptation, because otherwise you will get failed on the 2nd requirement (i.e. the validator won't recognise the field or its initialisation).
Chris J.
Level 18 , Arlington, United States
3 April 2021, 13:15
I'm struggling to imagine why I would implement interface methods by calling the un-implemented version of the methods. Which is what the solution is?
Justin Smith
Level 38 , Greenfield, USA, United States
29 September 2021, 23:22
I reached the same conclusion, this seems like creating code that is incapable of doing anything.
Gellert Varga
Level 23 , Szekesfehervar, Hungary
30 September 2021, 20:12
These are interfaces, and describe general behaviour rather than specific actions. The sense of TableInterfaceWrapper is: - In the future, there will be a class that implements this interface. - There will be an object created from this class (let's call it TIW) - The TableInterface will also have a descendant class at some point, - There will also be an object created from this class (let's call it TI) When you create a TIW object, you must pass its constructor the TI object. After all these, you will be able to run the TI methods on the TIW object! Except that now these method runs will result in slightly different results than if you had run them directly on the TI object. Because just that was the goal: to pass TIW method calls to TI, but to change the meaning of the methods, to add something extra to their original function.
Daniel Walbolt
Level 22 , Waterville, United States
21 July 2020, 10:51
So I tried this with my own code that I knew would work.. but it didn't. Then I copy and pasted code of someone's code that did work (with their solution to their problem) and it still didn't work. And the copy and pasted code had 2 requirements met (prior to fix) and it still had one requirement for me. Really does not make sense.
Artur Verdyan
Level 24 , Hoboken, United States
6 June 2020, 17:33
Very often I think that requirements are so confusing, but here is just a next level
Felix
Level 19
20 April 2020, 01:35
Seriously you have to change the requirments. This is not accaptable.
IO.Error
Level 24 , Bremen, Germany
25 March 2020, 21:07
I somehow made it but didn't understand it.
Przemysław Dr
Level 20 , Tricity, Poland
19 March 2020, 16:00
Requirements are not clear...
Ewerton Backend Developer
4 July 2019, 02:19
This really doesn't make any sense. But maybe it is just me.
Justin Smith
Level 38 , Greenfield, USA, United States
29 September 2021, 23:24
It's not just you, lol. This seems to have been an exercise in elaborately creating code that doesn't do anything.
Radek
Level 22 , Warsaw, Poland
15 November 2018, 12:52
There is a little but inconvenient miss in this task. The name of interface in conditions is not consistent with the name used in solution code. Renaming the interface to match the conditions causes problem with validation. Exact name "ATableInterface" must be in solution to pass validation while "TableInterface" is used in conditions.
Roman
Level 41
16 November 2018, 07:45
Thank you, we will fix it soon.