John Paterson wrote:If I am given a class diagram and the necessary source code with no other documentation, how should I go about figuring out what exactly is happening in the code.
Well, first: Are you familiar with the semantics of a class diagram? For example: the symbols for inheritance and implementation?
Second: When you say "necessary source", is that a copy of the complete
.java file for the class, or just some code snippets that someone has deemed "necessary"?
But basically, the class diagram helps you to visualise where your class sits structurally in context with other classes and interfaces of the system. The "source" should help you to see how the methods specific to your class have been implemented, and hopefully - if they're named and documented well - what they're designed to do.
HIH
Winston