Deck 10: Introduction to Object-Oriented Design
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
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
Play
Full screen (f)
Deck 10: Introduction to Object-Oriented Design
1
A data member that is private
A)cannot be referred to by methods that are public.
B)cannot be referred to from anywhere outside the class in which it is declared.
C)is usable only by a constructor method.
D)must be defined before data members that are public are defined.
A)cannot be referred to by methods that are public.
B)cannot be referred to from anywhere outside the class in which it is declared.
C)is usable only by a constructor method.
D)must be defined before data members that are public are defined.
B
2
A design approach that focuses on algorithms is commonly known as
A)process-oriented design.
B)object-oriented design.
C)procedure-oriented design.
D)event-driven design.
A)process-oriented design.
B)object-oriented design.
C)procedure-oriented design.
D)event-driven design.
C
3
Choose a class/object example from the list below.
A)program/data member
B)girl/Beverly
C)Ford/automobile
D)car/engine
A)program/data member
B)girl/Beverly
C)Ford/automobile
D)car/engine
B
4
A return value
A)is required when parameters are specified for a method.
B)is passed back to the caller of a method.
C)is usually specified for a constructor method.
D)identifies the final method in a class definition.
A)is required when parameters are specified for a method.
B)is passed back to the caller of a method.
C)is usually specified for a constructor method.
D)identifies the final method in a class definition.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
A class represents a template from which any number of objects can be created.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
6
Overloading can occur between two or more classes but cannot occur within a single class.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
Use of parameters is not supported for constructor methods.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
A protected data member
A)can only be accessed after overriding has occurred.
B)cannot be accessed from a subclass of the class that contains it.
C)cannot be accessed from classes other than the class that contains it.
D)can be accessed from within the class that contains it.
A)can only be accessed after overriding has occurred.
B)cannot be accessed from a subclass of the class that contains it.
C)cannot be accessed from classes other than the class that contains it.
D)can be accessed from within the class that contains it.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
A special kind of method that performs initialization is a(n)
A)definer.
B)override.
C)constructor.
D)character.
A)definer.
B)override.
C)constructor.
D)character.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
10
What action is expressed by the statement GradeBook: GradeBookM101?
A)The object GradeBookM101 is assigned to the variable GradeBook.
B)The GradeBookM101 method of the object GradeBook is invoked.
C)An object GradeBookMl0l of the class GradeBook is created.
D)The GradeBook class is renamed GradeBookM101.
A)The object GradeBookM101 is assigned to the variable GradeBook.
B)The GradeBookM101 method of the object GradeBook is invoked.
C)An object GradeBookMl0l of the class GradeBook is created.
D)The GradeBook class is renamed GradeBookM101.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
11
Values passed when a method is called are known as
A)variables.
B)parameters.
C)data members.
D)arguments.
A)variables.
B)parameters.
C)data members.
D)arguments.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
12
What action is expressed by the statement GradeBookS204.ShowStudent?
A)The method ShowStudent is assigned to the class GradeBookS204.
B)The method ShowStudent of the object GradeBookS204 is destroyed.
C)The method ShowStudent of the class GradeBookS204 is instantiated.
D)The method ShowStudent of the object GradeBookS204 is invoked.
A)The method ShowStudent is assigned to the class GradeBookS204.
B)The method ShowStudent of the object GradeBookS204 is destroyed.
C)The method ShowStudent of the class GradeBookS204 is instantiated.
D)The method ShowStudent of the object GradeBookS204 is invoked.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
Creating an object is called
A)instantiation.
B) overloading.
C) modeling.
D)abstraction.
A)instantiation.
B) overloading.
C) modeling.
D)abstraction.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
The acronym UML stands for
A)Unified Modeling Language.
B)United Memory Language.
C)United Modeling Language.
D)Unstructured Member Language.
A)Unified Modeling Language.
B)United Memory Language.
C)United Modeling Language.
D)Unstructured Member Language.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
15
If a method is defined wisely,users of the method don't have to know how the method is implemented.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the terms below does not have a meaning similar to the other three?
A)process
B)model
C)class
D)abstraction
A)process
B)model
C)class
D)abstraction
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
17
In a class definition,operations are specified in
A)properties.
B)records.
C)attributes.
D)methods.
A)properties.
B)records.
C)attributes.
D)methods.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
18
The means of communicating with an object is a(n)
A)operation.
B)behavior.
C)message.
D)variable.
A)operation.
B)behavior.
C)message.
D)variable.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
Packaging data methods and members into a single well-defined programming unit is known as
A)overriding.
B)data hiding.
C)encapsulation.
D)classification.
A)overriding.
B)data hiding.
C)encapsulation.
D)classification.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
A class definition is an abstraction.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
Data hiding is a means of achieving overloading of a particular method.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
22
A public method is part of the internal interface of a program.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
A single method cannot be both public and private at the same time.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
A return value for a method is required.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
A constructor must have the same name as the class that contains it.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
A class is an instance of an object.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
A data type must be specified for a method name.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
28
A data type for a return value must be specified in the method heading.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
29
A driver program can cause instances of classes to be created during processing.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
30
A default constructor can perform memory allocation.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck