Hi, I recently went through the first of the ePractice exams for
SCJA certification and came across a UML question that I answered incorrectly. I am no UML guru, so I was hoping someone would be able to help clarify my thoughts on the question.
The question was basically "How to implement Interface X, Interface Y, Class Z in Java" where Z implemented interfaces X and Y. The actual code for the answers is unimportant - suffice it to say that there were a number incorrect fragments, a correct
Java fragment, and a statement that the UML diagram was illegal.
I picked the correct Java code out immediately, but then looked a little deeper, and noticed that the interface operations of Interface X and Interface Y were not italicised. My UML reference in preparation ("UML for the Java Associate PDF" from HF) suggests that abstract operations are italicised within UML diagrams.
As interfaces cannot provide implementation of methods (and as I have seen several carefully worded questions to catch out the participant within the Sun certification exams) I then deduced that as interface X and interface Y appeared to provide concrete implementation of their methods, the diagram was illegal.
This was marked as incorrect. However, the explanation I received did not mention the above observations, so I was hoping someone would be able to explain the declaration of abstract methods with interfaces in UML in relation to the question described above, as I am now a little confused!
I can provide a question reference if necessary - although I am quite sure I cannot post the actual question here!
Many thanks in advance ...