Quiz10-Object Oriented Programming Flashcards

1
Q

The act of declaring a class variable does not actually create an object in memory. (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If a constructor is not written when the class is compiled, then a constructor is automatically provided and is known as the ‘default constructor’. (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Entities do not have direct access to the object’s private methods.(T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In an inheritance relationship, the superclass inherits members from the subclass.(T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

There are primarily three methods of programming in use today: procedural, recursive, and object oriented.(T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

UML (Unified Modeling Language) is another name for a flowchat that uses classes.(T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A constructor is a member of a class that holds data.(T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

_________ programming is centered on the procedures of actions that take place in a program.

A

Procedural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

___________ programming encapsulates data and functions in an object.

A

Object-oriented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A(n) __________ entity contains both data and procedures.

A

object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The variables, arrays, or other data structures that are stored in an object are known as the object’s _____________.

A

fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The procedures that an object performs are known as the object’s ____________.

A

methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In the pseudocode of the textbook, a class __________ starts with the word Class, followed by the name of the class.

A

definition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The fields and methods that belong in a class are known as the class’s __________.

A

members

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In a class definition, if the word Private appears before a field declaration, Private is known as a(n) _____________.

A

access specifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Mutator methods are sometimes called ___________.

A

Setters

17
Q

Another name for accessor methods is ______________.

A

Getters

18
Q

The ability to create methods with the same name that are in different classes is known as ____________.

A

polymorphism

19
Q

A(n) ________ is a strandard way to draw diagrams that describe object-oriented systems.

A

UML diagram

20
Q

In a UML diagram the ___________ character, placed in front of a field or method name, indicates that it is Public.
A) -
B) =
C) +

A

C) +

21
Q

The ___________ method is automatically called when an object is created.

A

constructor

22
Q

Given a class named Animals and a class variable named ducky which will reference an Animals object, which is the correct way, using the textbook’s pseudocode, to create an Animals object?

A) Set ducky = New Animals( )
B) Set ducky = Animals( )
C) Set Animals = New ducky( )

A

A) Set ducky = New Animals( )