Originally posted by Barry Gaunt:
I think this question is really about is-a and has-a. When I answered it, I mentally reworded it to ask "Does B have-a C?". The answer is yes, by inheritance from class A.
Yep --the way Barry is thinking about it is *exactly* what the question is looking for.
In fact, on the real
SCJP, we deliberately made the exam objectives for is-a and has-a no more precise than we did, because we are
testing ONLY for whether you understand the fundamentals of is-a and has-a, period.
It is the high-level nature of those two relationships that matter. More fine-grained distinctions of composition and aggregation, and/or UMLspecifics are tested only by the Architect exam (and I think one of the IBM exams).
I'm going to open another topic in just a moment, though, because I *have* been seeing some confusion about just how deep and detailed the exam gets, especially in obscure areas of the spec (the exam does NOT), and I just want to make sure that newcomers here aren't becoming worried about the nature (and scope) of the exam. What *is* on the exam, and the way the questions are worded, is challenging enough as it is
cheers,
Kathy