Chapter 8 Flashcards
What is an actor class?
A type of class in which the objects carry out certain tasks.
What are two examples of an actor class?
Scanner and Random
What is a Utility class?
classes with no objects, but it contains a collection of related static methods and constants
What is an example of a utility class?
Math
What is a immutable class
a class with no mutator methods to change contents of String
What is an example of an immutable class?
String
When is a public interface cohesive?
if all of its features are related to the concept that the class represents
What is a public interface?
the set of public constructors and public methods that someone using your class has access to.
What are dependencies?
When a class depends on another (uses another’s methods/variables)
What is UML
“Unified Modeling Language”, which is a notation for object-oriented analysis and design.
What is a side effect?
A modicfication of data that is obserable outside the method.
What is consistency?
When one follows a consistent scheme for a class’ method names and parameter variables.
What is the difference between a call by value and a call by reference?
Every call is by value, but with objects, the value is a reference - and the reference can be mutated.