csci 363 midterm review

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 36

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

37 Terms

1
Single Responsibility Principle (SRP)
A class should have only one reason to change.
New cards
2
Open/Closed Principle (OCP)
Classes should be open for extension but closed for modification.
New cards
3
Liskov Substitution Principle (LSP)
Subtypes must be substitutable for their base types.
New cards
4
Interface Segregation Principle (ISP)
A class should not be forced to implement interfaces it doesn’t use.
New cards
5
Dependency Inversion Principle (DIP)
High-level modules should depend on abstractions, not concrete implementations.
New cards
6
Encapsulation
Restricting direct access to object data while exposing necessary parts.
New cards
7
Inheritance
Uses 'is-a' relationships.
New cards
8
Composition
Uses 'has-a' relationships.
New cards
9
Abstraction
Hiding implementation details while exposing only essential functionality.
New cards
10
Singleton pattern
Ensures only one instance of a class exists.
New cards
11
Factory Method pattern
Encapsulates object creation, letting subclasses decide which class to instantiate.
New cards
12
Abstract Factory pattern
Creates families of related objects without specifying concrete classes.
New cards
13
Builder pattern
Separates object construction from representation by building it step by step.
New cards
14
Adapter pattern
Converts one interface into another to make incompatible systems work together.
New cards
15
Bridge pattern
Separates abstraction from implementation.
New cards
16
Flyweight pattern
Shares objects to reduce memory usage.
New cards
17
Strategy pattern
Encapsulates multiple interchangeable behaviors.
New cards
18
Observer pattern
Defines a dependency where multiple objects listen and react to changes in a subject.
New cards
19
Command pattern
Encapsulates a request as an object, allowing parameterization, queuing, and logging.
New cards
20
State pattern
Allows an object to change behavior when its internal state changes.
New cards
21
Chain of Responsibility pattern
Passes a request through a chain of handlers until one processes it.
New cards
22
Strategy vs State patterns
Strategy lets the client choose the behavior; State changes behavior based on internal state.
New cards
23
When to use Observer pattern
When multiple objects need to react to state changes in a subject.
New cards
24
Chain of Responsibility pattern flexibility
Requests are passed through multiple handlers, allowing different handlers to process them dynamically.
New cards
25
Builder pattern benefits
Helps construct complex objects while keeping the creation process flexible.
New cards
26
When to use Adapter pattern
When you need to make an existing class compatible with another interface.
New cards
27
Fixing Singleton thread safety
Use synchronized getInstance() or double-checked locking.
New cards
28
Primary benefit of the Bridge pattern
Decouples abstraction from implementation.
New cards
29
How Command pattern aids in undo/redo
Commands can be stored in a history log, allowing undo and redo operations.
New cards
30
Flyweight pattern drawback
Managing shared state can be complex.
New cards
31
Factory Method and Open/Closed Principle
New types can be added without modifying existing code.
New cards
32
Observer pattern coupling
Subjects and observers are loosely coupled.
New cards
33
Tight vs Loose coupling
Tight coupling makes changes harder, while loose coupling improves flexibility.
New cards
34
High cohesion
A class focuses on a single responsibility, making it easier to maintain.
New cards
35
Low cohesion
A class has multiple unrelated behaviors, making it difficult to maintain.
New cards
36
Aggregation vs Composition
Aggregation is a weak relationship; composition is a strong relationship where the contained object cannot exist independently.
New cards
37
Composition preference over inheritance
It avoids deep inheritance hierarchies and helps achieve loose coupling.
New cards
robot