Home  | 

  HINTS FOR EXAM TWO


THE MATERIAL COVERED WILL BE:

 The Forta book Chapters 4 thru 8, and 12 thru 15

Study all of the queries that you ran from the FORTA textbook and be able to write them if called for

 

Gaddis CH 10, Gaddis CH 12, Gaddis CH 16

 

 

 

For GADDIS Chapter 10, know  the Inheritance material

Chapter10  review questions  [answers at end of all sets of questions]

 

1In an inheritance relationship, this is the general class.

a . subclass

b. superclass

c. slave class

d. child class

 2  In an inheritance relationship, this is the specialized class.

a. superclass

b. masterclass

c. subclass

d. parent class

 3  This key word  indicates that a class inherits from another class

a. derived

b. specialized

c. based

d. extends

 4  A subclass does not have access to these superclass members.

a. public

b. private

c. protected

d. all of these

5  This key word refers to an object's superclass.

a. super

b. base

c. superclass

d. t h is

6  In a subclass constructor, a call to the superclass constructor must _.

a. appear as the very first statement

b. appear as the very last statement

c. appear between the constructor's header and the Opening brace

d. not appear

 7  The following is an explicit call to the superclass's default constructor.

a. default();

b. class();

c. super();

d. base();

8  A method in a subclass that has the same signature as a method in the superclass is an example of

a. overloading

b. overriding

c. composition

d. an error

 9  A method in a subclass having the same name as a method in the superclass but a different signature  is  an example of

a. overloading

b. overriding

c. composition

d. an error

 10  These superclass members are accessible to subclasses and classes in the same package.

a. private

b. public

c. protected

d. all of these

11  All classes directly or indirectly inherit from this class.

a. Object

b. Super

c. Root

d. Java

12 Abstract methods must be

a. overridden

b. overloaded

c. deleted and replaced with real methods

d. declared as private

13 Abstract classes cannot ,

a. be used as superclasses

b. have abstract methods

c. be instantiated

d. have fields

14   Replacing inadequate superclass methods with more suitable subclass methods is known as what?

a. Method upgrading

b. Tactical inheritance

c. Method overriding

d. Method overloading

15  When a method is declared with the ________ modifier, it cannot be overridden in a subclass.

a. extends

b. final

c. super

d. public

16  If a superclass does not have a default constructor or a no-arg constructor:

a. then a class that inherits from it, must initialize the superclass values.

b. then a class that inherits from it, must call one of the constructors that the superclass does have.

c. then a class that inherits from it, does not inherit the data member fields from the superclass.

d. then a class that inherits from it, must contain the default constructor for the superclass.

 

 

 

 

For GADDIS Chapter 12 know the how the set up and run GUI applications

Chapter12  review questions     [answers at end of all sets of questions]

 

1. With Swing, you use this class to create a frame.

a. Frame

b. SwingFrame

c. JFrame

d. JavaFrame

 

2. This is the part of a JFrame object that holds the components that have been added to the JFrame object.

a. content pane

b. viewing area

c. Component array

d. object collection

3. This is a JPanel object's default layout manager

a. BorderLayout

b. GridLayout

c. FlowLayout

d. None

 

4. This is the default layout manager for a JFrame object's content pane.

a. BorderLayout

b. GridLayout

c. FlowLayout

d. None

 

5.   ________ is a library of classes that do not replace ________, but provide an improved alternative for creating GUI applications.


a. AWT, Swing


b. Swing, AWT


c. JFC, AWT


d. JFC, Swing


6.   Event listeners must:


a.  implement an interface


b.  be included in private inner classes


c.  not receive any arguments


d.  exit the application once it has handled the event

 


7.   Which of the following statements is NOT true?


a.   Radio buttons are round and check boxes are square.


b.   Radio buttons are often grouped together and are mutually exclusive; Check boxes are not.


c.   Radio buttons implement ActionListener; Check boxes implement ItemListener.


d.   all of these are true.

 

8. This is the default alignment of a FlowLayout manager.

a. left

b. center

c. right

d. no alignment

 

9. Adding radio button components to this type of object creates a mutually

exclusive relationship between them.

a. MutualExclude

b. RadioGroup

c. LogicalGroup

d. ButtonGroup

10. You use this class to create Border objects.

a. BorderFactory

b. BorderMaker

c. BorderCreator

d. BorderSource

 

 

 

For GADDIS Chapter 16, know the code for setting up JDBC and connecting, creating, querying and closing  the database

Chapter 16  review questions           [answers at end of all sets of questions]

  

I.  This is the technology that makes it possible for a Java application to communicate with a DBMS.

a. DBMSC

b. JDBC

c. JDBMS

d. JDSQL

 

2.  This is the standard  language for working with database management systems.

a. Java

b. COBOL

c. SQL

d. BASIC

 

3.   The data that is stored in a table is organized in _____

a. rows

b. files

c. folders

d. pages

 

4.  The data that is stored in a row is divided into ______

a. sections

b. bytes

c. columns

d. tables

 

5.  This is a column that holds a unique value for each row, and can be used to identify specific rows.

a. ID column

b. public key

c. designator column

d. primary key

 

6.  This type of SQL statement is used to retrieve rows from a table.

a. RETRIEVE

b. GET

c. SELECT

d. READ

 

7.  This contains the results of an SQL SELECT statement.

a. select set

b. result set

c. SQL set

d. collection set

 

8.  This clause allows you to specify search criteria with the SELECT statement.

a. SEARCH

b. WHERE

c. AS

d. CRITERIA

 

9.  This is a Java class that is designed to communicate with a specific DBMS.

a. JDBC driver

b. DBMS Superclass

c. DBMS Subclass

d. Stream convener

 

10. This is a string listing the protocol that should be used to access a database, the name of the database, and potentially other items.

a. JDBC driver

b. JDBC locator

c. Database URL

d. Database specifier

 

11. This method is specified in the statement interface, and should be used to execute a SELECT statement.

a. execute

b. executeUpdate

c. executeQuery

d. executeSelect

 

12. This method is specified in the statement interface, and should be used to execute an UPDATE statement.

a. execute

b. cxecutcUpdate

c. executeQuery

d. executeSelect

  

13. This method is specified in the statement interface, and should be used to execute an INSERT statement.

a. execute

b. executeupdate

c. executeQuery

d. executeSelect

 

14. This SQL statement is used to insert rows into a table.

a. INSERT

b. ADD

c. CREATE

d. UPDATE

 

15. This SQI statement is used to remove rows from a table.

a. REMOVE

b. ERASE

c. PURGE

d. DELETE

 

16. This SQL statement is used to delete an entire table.

a. REMOVE

b. DROP

c. PURGE

d. DELETE

 

17. This is a column in one table that references a primary key in another table.

a. secondary key

b. fake key

c. foreign key

d. duplicate key

18. In SQL, the not equal-to operator is:

a. !=

b. NOT

c. ||

d. <>



19. What term refers to data that describes other data?

a. Pseudo-data

b. Micro data

c. Abstract data

d. Meta data



20. A qualified column name takes the following form:

a. ColumnName.TableName

b. TableName.ColumnName

c. RowName.TableName

d. DatabaseURL.ColumnName

 

 

 

Answers  to  ch 10, 12 and 16 Review Questions

Chapter 10     inheritance

 1. b

2. c

3. d

4. b

5. a

6. a

7. c

8. b

9. a

10. c

11. a

12. a

13. c

14. c

15. b

16. b

 

Chapter 12    GUI

 

1. c

2. a

3. c

4. a

5. b

6. a

7. d

8. b

9. d

10. a

Chapter 16  JDBC

 1.         b

2.         c

3.         a

4.         c

5.         d

6.         c

7.         b

8.         b

9.         a

10.       c

11.       c

12.       b

13.       b

14.       a

15.       d

16.       b

17.       c

18.      d

19.      d

20.      b