Chapter 15 Classes and Objects Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is it called when you create a new object?

A

instantiation

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

An object that belongs to a class.

A

instance

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

The prefix 0x means?

A

The following number is hexadecimal.

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

You can assign values to an instance by using?

A

dot notation
»> blank.x = 3.0
»> blank.y = 4.0

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

A state diagram that shows an object and its attributes is called?

A

An object diagram

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

An object that is an attribute of another object is called what?

A

embedded

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

A programmer-defined type. A “ “ definition creates a new class object.

A

class

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

An object that contains information about a programmer-defined type. The
“ “ “ “ can be used to create instances of the type.

A

class object

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

One of the named values associated with an object.

A

Attribute (pronounced At-tribute)

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

An object that is stored as an attribute of another object.

A

embedded object

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

Define shallow copy

A

To copy the contents of an object, including any references to embedded
objects; implemented by the copy function in the copy module.

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

Define deep copy

A

A deep copy copies the contents of an object, any objects embedded in them, and everything else. Use the deepcopy function to accomplish this.

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