In doing some of the practice problems for this exam, I'm trying to find a systematic way to read code.
I guess my question is this: How do you read code? Do you just haphazardly do it or is there a specific way that you approach it?
I thought about UML but I don't think it's very practical for the exam. Not to mention, that has it's own learning curve too.
Hope this makes sense.
Joined: Apr 15, 2008
My experience says see the structure of class first. like what constructors what methods a class has. just look at them . then follow the path through from the main method, because from here the execution starts . So follow it up from here
Getting the inheritance hierarchy right - that is who inherits from whom is important... also to check whether it is legal. What I find the most tricky is to select between the answer - compile time error or runtime error! you need to study the code and the flow of the program closely, one thing should be taken care that the program may be incorrect at more than one place but what is encountered first in the flow should be your answer.