Databases Reference
In-Depth Information
Random()
[retval - random]
nextInt()
[target - random,
retval - size]
Stack()
[retval - stack]
nextInt()
[target - random,
retval - <temp1>]
push()
[target - stack,
1st arg - <temp1>]
<no-call>
[target - random]
push()
[target - stack]
FIGURE 12.3: Function model of the function from Figure 12.2.
publicStackfillStack(Objecto,intnum){
log("Fillingthestack");
Stackstack=newStack();
for(inti=0;i<num;i++);
stack.push(o);
log("Done");
returnstack;
}
FIGURE 12.4: Code violating \normal" stack usage.
 
Search WWH ::




Custom Search