11. Object oriented design Flashcards
What is the difference between a mutable and an immutable object?
ss
What does import do for us?
ss
Which package has all its classes imported automatically?
ss
What are stubs used for?
ss
What symbols are used to start and end a multi-line comment?
ss
In object oriented design, in what sense is the design oriented around objects?
ss
What two interesting things might nouns that appear in the requirements statements relate to?
ss
How does the idea of encapsulation relate to the default of making our instance variables private?
ss
What principles do we follow when deciding in which class our code should reside?
ss
What is the name of the mechanism for passing arguments to methods in Java?
ss
What is the significance of the approach for arguments of a primitive type and those of a reference type?
ss
In what way must each constructor be distinguished from the others?
ss
What two things are checked by the compiler in the multiple returns context?
ss
What do we mean by the phrase ‘single entry, multiple exit’?
ss
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)
ss
What kind of objects never have mutator methods?
ss
What is the standard input used for?
ss
What is a package?
ss
What is a fully qualified name?
ss
What is the range of the result of the method random()? Exactly?
xx
What kinds of information does getProperty() give us? What is the return type?
ss
Exactly how do we obtain the line separator?
ss
What kind of Java variable is System.in?
ss
What method is used to read lines of text? And what is used to read int values?
ss
How does Java ensure the implicit toString() convention does not fail with null references?
ss
What must be done to a final instance variable, by what stage, and what cannot be done later?
ss
A class constant is another name for what?
ss
Which object does null refer to?
s
Is it mutable or immutable objects for which having more than one variable holding its reference is particularly an issue, and why?
ss