CIS 790 JAVA Distance Education QUIZ

Prof. Auciello's Virtual Classroom Quiz

9 - 11 class = Section 0175

Last.First Name:

Q001: RE: 6b 790 Hello World Applet. EXPLAIN THESE LINES: TextField textField1; // define textfield1 name = textField1.getText();


Q002: RE: Java Label Class. These questions require professional-level skills, and our goal is Mastery of Java, so now you know why I am asking them. getText() is a method in the Label Class. List at least one other method. Tell me where you found the information. (What book? What URL?)

Q003: RE: Creating New Instances. Give a thorought explanation of the following statement, using the word "instance". Your answer should address at least (3) properties of the Font. Font ftr24 = new Font("TimesRoman", Font.ITALIC, 24);

Q004: EXPLAIN THIS CODE. Label namelabel1 = new Label(" Enter Your Name ",Label.RIGHT); add(namelabel1); textField1 = new TextField(15); add(textField1); // add textfield to structure

Q005: EXPLAIN THIS CODE. if (name == null) name = "Harvey";

Q006: EXPLAIN THIS CODE. if (name == null) name = "Harvey";

Q007: EXPLAIN THIS CODE. // step 5a. get an an image. Insert yours if possible. Image gifname270 = getImage(getDocumentBase(),"MONICA.GIF"); EXPLAIN getImage(getDocumentBase(),"MONICA.GIF"); What Class Libraries are they from?

Q008: EXPLAIN THIS CODE. WHAT DOES IT DO? setBackground(Color.yellow); g.setColor(; Name some other standard named colors.

Q009: EXPLAIN THIS CODE. WHAT DOES IT DO? HOW IS THE IMAGE AND THE STRING LOCATED ON THE SCREEN? EXPLAIN THE COORDINATES. ( g.drawImage(gifname270, 400, 65, this); g.drawString ("Hello World", 5, 145);

Q010: EXPLAIN THIS CODE. WHAT DOES IT DO? // Step 6. "listen" when the "enter button" is clicked. public boolean action(Event event, Object arg) { name = textField1.getText(); // get name repaint(); return true; } // end event-listening method. EXPLAIN "boolean", "action", "event", repaint(), and "return true"