but it doesn't in the task code, so we need to implement both.
in theory, I think extending Person interface should also work, but it would lower the flexibility of the interface. what about cats and robots with management potential? ;) they'd need a separate interface then, as non-persons.
also, hello to Slovakia, from a fellow Slovak living in Germany!
task1306 (Buggy initializeIdAndName) caveat: simply returning a User (i.e. this) from initializeIdAndName() as stated in the requirements is not sufficient; in order for the code to pass the declared type of the result must also be User, not DBObject (covariant return).
Bulldozed through these exercises without help, but still don't have the feeling that I get it. Hope it is part of the process and will get clearer in the future ...
I feel as if I almost know what I'm doing. And then something really silly seems to stump me. But then I figure it out in a few minutes, and I feel stupid, but... I figured it out in a few minutes, so maybe that's ok?
I'm a math teacher who, back in May, had ZERO programming experience, and I'm really hoping that next May I can quit teaching math for good because I'm finally good enough to support myself doing this.
GO TO FULL VERSION