11. Object oriented design Flashcards

1
Q

What is the difference between a mutable and an immutable object?

A

ss

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

What does import do for us?

A

ss

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

Which package has all its classes imported automatically?

A

ss

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

What are stubs used for?

A

ss

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

What symbols are used to start and end a multi-line comment?

A

ss

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

In object oriented design, in what sense is the design oriented around objects?

A

ss

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

What two interesting things might nouns that appear in the requirements statements relate to?

A

ss

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

How does the idea of encapsulation relate to the default of making our instance variables private?

A

ss

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

What principles do we follow when deciding in which class our code should reside?

A

ss

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

What is the name of the mechanism for passing arguments to methods in Java?

A

ss

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

What is the significance of the approach for arguments of a primitive type and those of a reference type?

A

ss

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

In what way must each constructor be distinguished from the others?

A

ss

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

What two things are checked by the compiler in the multiple returns context?

A

ss

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

What do we mean by the phrase ‘single entry, multiple exit’?

A

ss

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

Which of the following method headings suggest they are accessor methods?

private void updateFeature()
public void updateFeature()
private int getFeature()
public int getFeature()
private static int getFeature()
public static int getFeature()
private void setFeature(int f)
public void setFeature(int f)
A

ss

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

What kind of objects never have mutator methods?

A

ss

17
Q

What is the standard input used for?

A

ss

18
Q

What is a package?

A

ss

19
Q

What is a fully qualified name?

A

ss

20
Q

What is the range of the result of the method random()? Exactly?

A

xx

21
Q

What kinds of information does getProperty() give us? What is the return type?

A

ss

22
Q

Exactly how do we obtain the line separator?

A

ss

23
Q

What kind of Java variable is System.in?

A

ss

24
Q

What method is used to read lines of text? And what is used to read int values?

A

ss

25
Q

How does Java ensure the implicit toString() convention does not fail with null references?

A

ss

26
Q

What must be done to a final instance variable, by what stage, and what cannot be done later?

A

ss

27
Q

A class constant is another name for what?

A

ss

28
Q

Which object does null refer to?

A

s

29
Q

Is it mutable or immutable objects for which having more than one variable holding its reference is particularly an issue, and why?

A

ss