Академический Документы
Профессиональный Документы
Культура Документы
1. What type of programming is centered on the procedures or actions that take place in a
program?
a. Object-oriented
b. Interactive
c. Procedural
d. Menu-driven
e. None of the above
ANS: C
2. What type of programming encapsulates data and functions together in an object?
a. Object-oriented
b. Interactive
c. Procedural
d. Menu-driven
e. None of the above
ANS: A
3. What software entity contains both data and procedures?
a. Objects
b. Instances
c. Events
d. Memory location(s)
e. None of the above
ANS: A
4. The variables, arrays, or other data structures that are stored in the object are known as the
objects __________.
a. Records
b. Methods
c. Addresses
d. Fields
e. None of the above
ANS: D
5. The procedures that the object performs are known as ____________.
a. Records
b. Methods
c. Addresses
d. fields
e. None of the above
ANS: B
6. The programmer determines the fields and methods of an object and creates the ______ code.
a. Print
b. Class
c. Module
d. Procedure
e. None of the above
ANS: B
7. The class _________ starts with the word Class followed by the name of the class.
a. body
b. definition
c. return
d. members
e. None of the above
ANS: B
8. What is the term used for the fields and methods that belong to a class?
a. body
b. definition
c. return
d. members
e. None of the above
ANS: D
9. The word Private that appears before a field declaration, in a class definition, is known as a(n)
____________.
a. access specifier
b. specifier
c. Class specifier
d. Inside specifier
e. None of the above
ANS: A
11. What allows you to create methods with the same name in different classes and gives you the
ability to call the correct method depending on the type of object that is used to call it?
a. Constructor
b. Inheritance
c. Accessor
d. Polymorphism
e. None of the above
ANS: D
12. ________________________ is a standard way of drawing diagrams that describe objectoriented systems.
a. Data flow diagram
b. UML
c. flowchart
d. Hierarchy chart
e. None of the above
ANS: B
ANS: A
ANS: C
ANS: D
17. Which of the following are contained in a UML diagram for a class?
a. Class name
b. Class fields
c. Class methods
d. All of the above
e. None of the above
ANS: D
18. Which one of the following, in the list below, represents a Class/Object?
a. Program/dataMembers
b. Car/engine
c. Ford/cheveolet
d. Girl/beverly
e. None of the above
ANS: D
19. In a class definition, operations such as if-else, loops, and calculations are specified in:
a. properties
b. records
c. attributes
d methods
e.None of the above
ANS: D
20. A data member that is private
TRUE/FALSE
1. True/False: Procedures, typically, operate on data items that are within the procedure.
ANS: F
2. True/False: The act of declaring a class variable does not actually create an object in memory.
ANS: T
3. True/False: If a constructor is not written when the class is compiled, then a constructor is
automatically provided and it is known as the default constructor.
ANS: T
4. True/False: When a superclass method has the same name as a subclass method, it is often
said that the superclass method overrides the subclass method.
ANS: F
5. True/False: External entities do not have direct access to the objects private methods.
ANS: T
6. True/False: When the program is running, it can use the class to create, in memory, one object
of a specific type as needed.
ANS: F
7. True/False: The private object fields can be directly manipulated by outside entities.
ANS: F
8. True/False: When a class variable is assigned the address of an object, it is said that the
variable references the object.
ANS: T
9. True/False: In an inheritance relationship, the superclass inherits members from the subclass,
not the other way around.
ANS: F
10. True/False: When an objects internal data is hidden from outside code and access to the data
is restricted to the objects methods, the data is protected from accidental corruption.
ANS: T
11. True/False: There are primarily three methods of programming in use today: procedural,
recursive, and object-oriented.
ANS: F
12. True/False: The separation of data and the code that operates on the data can lead to problems
as a program becomes larger and more complex.
ANS: T
2. The objects ___________ are the modules and functions of the object.
ANS: methods
3. ___________ are created from abstract data types that encapsulate data and functions
together.
ANS: Objects
4. ______________ refers to the combining of data and code into a single object.
ANS: Encapsulation
ANS: fields
9. The methods that can be accessed by entities outside the object are known as _________
methods.
ANS: public
10. ____________ refers to an objects ability to hide its data from code that is outside the object.
11.
A method that gets a value from a classs field but does not change it is known as a(n)
____________ method.
ANS: access
12. The methods in an object that are used to initialize an objects fields with starting values are
called ________________.
ANS: constructors
13. A __________ is code that specifies the fields and methods for a particular type of object.
ANS: class
14. Each object that is created from a class is called a(n) _________ of the class.
ANS: instance
16. An ________ is not a stand-alone program, but is used by programs that need its service.
ANS: object