This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS 1331 Test 2 PRACTICE 1. Terminology [ 30 pts (3 each) ] Answer the following questions by filling in the blank. (a) When writing a class that inherits from another, this reserved word is used on the class header before the superclass’s name. (b) When writing a class that satisfies an interface, this reserved word is used on the class header before the name of the interface. (c) There might be several methods with the same name within a class, with each having a different signature. This is an example of what? (d) This type of java program is designed to run from a web page. (e) This is the name of the default layout manager for a JPanel. (f) Interfaces can have method headers in them and what else? (g) Write a single line of code that would declare and create an array (called scores ) for 20 ints. (h) Class fields (as opposed to instance fields) are labeled with what reserved word when they are declared? (i) What class has the method showInputDialog? (j) Which package should be imported if one is to use JButtons, JPanels, etc in a GUI? (You can give the import statement if you like.) 2. 1-D array as a function parameter [ 15 pts ] Write a method called average...
View Full Document
This note was uploaded on 05/23/2011 for the course COMPUTER S 1331 taught by Professor Sweat,monica during the Fall '07 term at Georgia Tech.
- Fall '07