Deck 12: Java Code Examples of Problem Domain Classes

Full screen (f)
exit full mode
Question
Methods that allow access to the attributes of a class are known as accessor methods.
Use Space or
up arrow
down arrow
to flip the card.
Question
A(n) __________ program test classes by creating objects of the class and sending messages to them.
Question
The __________ keyword invokes the constructor of the class.
Question
A builder is a special method used to create a new object of the class.
Question
The extend keyword indicates a(n) ____________ relationship.

A) Whole-part
B) Inheritance
C) Composition
D) Has-a
Question
___________ methods allow access to the attributes of the class.
Question
Java syntax is based on the _________ language.
Question
What program tests classes by creating objects of classes and sending messages to them?

A) Driver
B) Runner
C) Controller
D) Builder
Question
Java is based on the syntax of COBOL.
Question
The ________ keyword is used to indicate that a class is abstract.
Question
What special method is used to create a new object in a class?

A) Destructor
B) get method
C) Constructor
D) set method
Question
In Java, each class must be a(n) __________.

A) File
B) Method
C) Attribute
D) Program
Question
Each __________ of code is enclosed with curly braces {}.
Question
Java is case sensitive.
Question
In Java blocks of code are enclosed by parenthesis.
Question
When associated with a class, the keyword __________ means that objects of the class can be accessed by anything in the system.
Question
A(n) __________ is a special method used to create a new object of the class.
Question
Java uses the __________ keyword to indicate an inheritance relationship.
Question
Which of the following is NOT a keyword?

A) abstract
B) extends
C) new
D) builder
Question
In Java, each "program" must be a __________.
Question
Classes typically consist of attributes and methods.
Question
The void keyword is used to designate a class as abstract.
Question
A driver program is used to test classes.
Question
Java uses the extends keyword to indicate an inheritance relationship.
Question
Create keyword invokes the constructor of the class.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 12: Java Code Examples of Problem Domain Classes
1
Methods that allow access to the attributes of a class are known as accessor methods.
False
2
A(n) __________ program test classes by creating objects of the class and sending messages to them.
Driver
3
The __________ keyword invokes the constructor of the class.
New
4
A builder is a special method used to create a new object of the class.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
The extend keyword indicates a(n) ____________ relationship.

A) Whole-part
B) Inheritance
C) Composition
D) Has-a
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
___________ methods allow access to the attributes of the class.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
Java syntax is based on the _________ language.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
What program tests classes by creating objects of classes and sending messages to them?

A) Driver
B) Runner
C) Controller
D) Builder
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
Java is based on the syntax of COBOL.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
The ________ keyword is used to indicate that a class is abstract.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
What special method is used to create a new object in a class?

A) Destructor
B) get method
C) Constructor
D) set method
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
In Java, each class must be a(n) __________.

A) File
B) Method
C) Attribute
D) Program
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Each __________ of code is enclosed with curly braces {}.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
Java is case sensitive.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
In Java blocks of code are enclosed by parenthesis.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
When associated with a class, the keyword __________ means that objects of the class can be accessed by anything in the system.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
A(n) __________ is a special method used to create a new object of the class.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
Java uses the __________ keyword to indicate an inheritance relationship.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
Which of the following is NOT a keyword?

A) abstract
B) extends
C) new
D) builder
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
In Java, each "program" must be a __________.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Classes typically consist of attributes and methods.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
The void keyword is used to designate a class as abstract.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
A driver program is used to test classes.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
Java uses the extends keyword to indicate an inheritance relationship.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
Create keyword invokes the constructor of the class.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 25 flashcards in this deck.