Chapter 8 Flashcards

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

What is an actor class?

A

A type of class in which the objects carry out certain tasks.

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

What are two examples of an actor class?

A

Scanner and Random

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

What is a Utility class?

A

classes with no objects, but it contains a collection of related static methods and constants

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

What is an example of a utility class?

A

Math

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

What is a immutable class

A

a class with no mutator methods to change contents of String

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

What is an example of an immutable class?

A

String

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

When is a public interface cohesive?

A

if all of its features are related to the concept that the class represents

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

What is a public interface?

A

the set of public constructors and public methods that someone using your class has access to.

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

What are dependencies?

A

When a class depends on another (uses another’s methods/variables)

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

What is UML

A

“Unified Modeling Language”, which is a notation for object-oriented analysis and design.

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

What is a side effect?

A

A modicfication of data that is obserable outside the method.

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

What is consistency?

A

When one follows a consistent scheme for a class’ method names and parameter variables.

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

What is the difference between a call by value and a call by reference?

A

Every call is by value, but with objects, the value is a reference - and the reference can be mutated.

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