Looks like no one added any tags here yet for you.
Abstraction
Conveys essential behaviors • Embodied in interfaces and inheritance.
• Design patterns are sophisticated and reusable design solutions to known problems
abstract classes cannot be instantiated, but they can have a subclass
abstract methods are declared without an implementation
Encapsulation
Hides the details of the implementation of an object. • Enabled using access modifiers
makes abstraction possible. You use IT to clearly define the essential behavior
cohesion
the extent to which all behaviors in a class belong together
Low cohesion
The class is a mixture of behaviors without any commonality
High cohesion
The class in which all behaviors are tightly linked
coupling
the degree to which a class or module knows about some other class or module's implementation details
Tight coupling
when a change in one class or module necessitates a change in another
Loose coupling
when two classes or modules can evolve independently, even if they are used together
Abstract Data types
Definition: A collection of well-defined behaviors, irrespective of implementation details
• Examples: Lists, maps, sets, stacks, queues •
A list: • Is ordered • Can access elements by position • Allows arbitrary insertion and deletion • Allows duplicates
maximally cohesive
A class in which each variable is used by each method
Single Responsibility Principle
each software module or class should have one and only one reason to change
• I read this as "drivers for change" instead of "reason to change"
• Regardless, SRP supports high cohesion
• Low cohesion and weak abstractions often go hand-in-hand
Open/Closed Principle
a class should be open for extension but closed for modification
Liskov Substitution Principle
subclasses must be able to substitute for their base classes
Interface Segregation Principle
a class should not be forced to implement interfaces it doesn't need to
Dependency Inversion Principle:
objects should depend on abstractions instead of concrete implementations
Composition
Adding behavior to a class by embedding other objects within it
Composition vs. Inheritance
Is-a vs Has-a realtionships
Overuse of inheritance creates tight coupling
Use of composition enables dependency injection
Design patterns
are sophisticated and reusable design solutions to known problems. They're abstractions!
• We create the implementations and must encapsulate them well to reduce the risk of tight coupling.
• They provide at least some areas of high cohesion, helping us drive overall cohesion.