OOD Principles |
#1 |
It is acceptable to make B a subclass of A only if, for every public method with identical signatures in both A and B, the preconditions for A are no stronger than the preconditions for B and the postconditions for A are no weaker than the postconditions for B. |
What is the Liskov Substitution Principle? |
#2 |
Software entities, including code and data, should not be duplicated. |
What is the DRY Principle (Don't Repeat Yourself)? |
#3 |
You can pick your friends, and you can pick your nose, but you can’t pick your friend’s nose. |
What is the Law of Demeter? |
#4 |
A class should have only one reason to change. |
What is the Single Responsibility Principle? |
#5 |
Many client-specific interfaces are better than one general-purpose interface. |
What is the Interface Segregation Principle? |
Elegant Method Design |
#1 |
These conditions document what should be true before and after executing a method. |
What are preconditions and postconditions? |
#2 |
This quality means that few internal comments are needed to understand method code. |
What is self-documenting code? |
#3 |
All code within a method should be at a similar __________. |
What is level of abstraction? |
#4 |
A method that does just one thing (and does it well) has this quality. |
What is cohesion? |
#5 |
This principle states that a method should either change object state or return a value, but not both. |
What is the Command-Query Separation Principle? |
Software Development Tools & Processes |
#1 |
The process of revising code to make it more elegant without changing its functionality. |
What is refactoring? |
#2 |
Planning Poker is a game for accomplishing this software development task. |
What is estimation? |
#3 |
These cards are used to design classes and their relationships. |
What are Class-Responsibility-Collaborator (CRC) cards? |
#4 |
Git is an example of this general category of tools. |
What is a Version (or Revision) Control System? |
#5 |
A contrast to the Waterfall Model, this kind of software development process involves brief iterations through the entire software development cycle |
What is agile software development? |
OOP Terminology |
#1 |
Like an interface, this kind of class cannot be instantiated. |
What is an abstract class? |
#2 |
Both of these Java keywords should be used when defining a constant. |
What are static and final? |
#3 |
This term describes when a class has two methods with the same name but different parameters. |
What is overloading? |
#4 |
This process means that the Java runtime environment, when asked to invoke a method on an object. looks at the actual class of the object to find the method implementation to execute. |
What is dynamic method invocation? |
#5 |
This property allows objects of different classes to share a common type. |
What is subtype polymorphism? |