S A M P L E CPS 1 (Ramm) Spring 1998 25 March 1998 Quiz #9 Name ___________________ Honor Code________________________ Section _____ A. Do a trace for the program shown below left using the column headings shown below center. Assume that the user enters a 2, then a 24, and then a 17 when input is requested. Show at least the statement # for each statement actually executed. | # CF AX SUM COUNT | # CF AX SUM COUNT | | 1 in ax | | | | 2 copy count,ax | | | | 3 #L0 cmp ax,#c1 | | | | 4 jb #L1 | | | | 5 in ax | | | | 6 add ax,sum | | | | 7 copy sum,ax | | | | 8 copy ax,count | | | | 9 sub ax,#c1 | | | | 10 copy count,ax | | | | 11 jmp #L0 | | | | 12 #L1 copy ax,sum | | | | 13 out ax | | | | 14 halt | | | | 31 #c1 1 | | 32 count 0 33 sum 0 CONTINUE IN RIGHT COLUMN ABOVE B. Some true/false or short answer question(s) regarding Java graphics. e.g.: True/False 1) Fractals are a good application of recursion. 2) Fractals compressed images are often require larger storage space than bitmap images. 3) In the Java coordinate system, (0,0) is the lower left corner of the screen. 4) The Sierpinski algorithm for animation reduces flicker.