



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CIS 121 Practice Test 1 (Chapters 8 - 11) Name:__________________________________ Part 1 : Fill in the blank (1 point each) with the best word to complete the thought.
Part 2 : Discussion
Part 3 : Programming Note: In the programming section of the real test, you should know how to set up a class definition, write main and instance methods, construct a class diagram, draw using the Graphics object, use the basic JOptionPane dialog boxes, and how to add JLabels, JTextFields, and JButtons to a JFrame object.
Be prepared to demonstrate the ability to use the methods of the Character, String, StringBuffer and StringTokenizer classes, especially String methods: length charAt equals equalsIgnoreCase compareTo indexOf concat valueOf StringBuffer Methods length capacity setLength ensureCapacity charAt setCharAt reverse append insert delete Character isDigit isLetterOrDigit toUpperCase toLowerCase isUpperCase isLowerCase StringTokenizer nextToken countTokens moreToken Assume g is an object of the Graphics class. Write the statement(s) to do the following: a. Assign the color blue to g. b. Draw a rectangle at the top right corner of the window that is 50 pixels wide and 100 pixels high. c. Using g, write the String “CIS 121 Test 1” in Dialog font, in bold, italic style. d. Output the size of the font currently assigned to g. e. Output the size of the font currently assigned to g.