Deck 12: Java Code Examples of Problem Domain Classes
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
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
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
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
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
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
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