3303-flashcards/topic_7.md
2026-04-20 22:44:45 -04:00

233 lines
7 KiB
Markdown

## What is the primary role of a **Boundary Object**?
---
🌐 It defines **interfaces** to and communicates with the **external environment**.
%%%
What does a **Boundary Class** typically represent in a UML class diagram?
---
🖥️ It represents the **User Interface (UI)** or **external systems' interfaces**, depicting interactions between the system and its actors.
%%%
In terms of **External Interaction**, how does a Boundary Class function?
---
🔄 It acts as a **Proxy**: handling input/output operations and facilitating communication between the internal system and external entities.
%%%
What is the specific responsibility of a Boundary Object regarding **Hardware**?
---
🔌 **Device I/O**: It receives input from and/or sends output to a hardware device.
%%%
## What are the **three key characteristics** of a Boundary Class?
---
1. **Interface Representation** (UI/External interfaces).
2. **External Interaction (Proxy)** (Mediating communication).
3. **Device I/O** (Hardware communication).
%%%
What is the primary function of an **Entity Object**?
---
📦 It **encapsulates information** and represents data that needs to be stored and managed within the system.
%%%
What are the two types of **Entity Objects** based on data lifespan?
---
1. **Data abstraction objects**: Used for **transient** data (temporary).
2. **Database objects**: Used for **persistent** data (long-term).
%%%
In a UML class diagram, what do the **attributes** of an Entity Class represent?
---
📋 They represent the **properties or characteristics** of the entity, corresponding to specific data fields.
%%%
## How do **Entity Classes** typically interact with one another?
---
🔗 Through **associations** (relationships) that indicate how different entities are connected.
%%%
If persistent data is stored in a database, what is the role of the **Entity Object**?
---
🎁 It acts as a **wrapper**: mapping database columns to the object's attributes.
%%%
Why is a **mutex** usually required when using Entity Objects in a multi-threaded environment?
---
🔒 Because Entity Objects are almost always **passive**, meaning they do not manage their own concurrency/execution flow.
%%%
What is the primary purpose of a **Control Object**?
---
🕹️ It provides **overall coordination** for a collection of objects within the system.
%%%
How do Control Objects facilitate the fulfillment of a **Use Case**?
---
🎼 They contain methods that **orchestrate the sequence of actions** needed to execute the use case logic.
%%%
## How does a Control Object interact with **Boundary** and **Entity** classes?
---
🔄 It **receives input** from Boundary classes, processes it, and interacts with Entity classes to **retrieve or update** data.
%%%
What defines a **State-dependent** control object?
---
🚦 Its behavior depends on its **current state**, and it changes states based on **inputs (events)** from other objects.
%%%
What is a **Coordinator** control object?
---
🤝 An overall decision-making object that controls others but is **not state-dependent** (e.g., a system scheduler).
%%%
What is the function of a **Timer** control object?
---
⏱️ It controls other objects on a **periodic basis**, triggered by an external clock.
%%%
What are the **three types** of Control Objects?
---
1. **State-dependent** (Behavior depends on state).
2. **Coordinator** (Decision making, non-state-based).
3. **Timer** (Periodic triggers).
%%%
## What is the primary role of **Application Logic** classes?
---
🧠 They encapsulate the **core functionality, algorithms, and logic** of an application, playing a central role in executing its operations.
%%%
How do Application Logic classes interact with **Entities** and **Controls**?
---
🔗 They interact with **Entity classes** to retrieve/update data and with **Control classes** to coordinate the flow of system activities.
%%%
## What does it mean for Application Logic to be **independent of presentation details**?
---
🏗️ It ensures **separation of concerns**; changes to the User Interface (UI) should not directly impact the core application logic.
%%%
Why are Application Logic classes used to **partition logic away from data**?
---
🔄 Because **logic is expected to change** more frequently than the underlying data structures.
%%%
What is the difference between how **Simple** and **Complex Algorithms** are encapsulated?
---
🧮
- **Simple**: Often encapsulated directly within **Entity objects**.
- **Complex**: Placed in a **separate class** that interacts with multiple objects (similar to a coordinator).
%%%
What is the purpose of a **Service** type Application Logic class?
---
🛠️ It provides a **specific service** to other objects, such as reading/writing data or forwarding messages across a network.
%%%
Which specific object type is the **only** one allowed to communicate with an **Actor**?
---
🎭 **Boundary Objects**. Actors cannot interact with Controllers or Entities directly.
%%%
What are the communication limits for a **Boundary Object**?
---
🔌 it can only talk to **Actors** and **Controllers**. (It cannot talk directly to Entities).
%%%
Who are **Entity Objects** permitted to communicate with?
---
📦 Only **Controllers** and **other Entity Objects**.
%%%
Which class acts as the "middleman" that can talk to **Boundary**, **Entity**, and other **Control** objects?
---
🕹️ The **Control** class. (Note: It still cannot talk directly to Actors).
%%%
Can an **Entity Object** initiate communication with a **Boundary Object**?
---
**No.** Communication between data (Entity) and the interface (Boundary) must be mediated by a **Controller**.
%%%
Which object types are allowed to communicate with **others of their own type**?
---
👥 **Entity** objects and **Control** objects.
%%%
Why is a **Controller** forbidden from talking to an **Actor**?
---
🧱 To ensure **independence from presentation details**; the logic (Controller) should only interact with the interface representation (Boundary).
%%%
Which types of objects are assumed to be **active (concurrent)** by default?
---
🏃 **All non-entity objects**. Each has its own thread of control and can operate in parallel.
%%%
What does it mean for an **Entity Object** to be **passive**?
---
🧘 It does not have its own thread; instead, it is **called by active objects** to perform tasks.
%%%
How does communication differ between **Active** and **Passive** objects?
---
💬
- **Active to Active**: Asynchronous communication.
- **Active to Passive**: Synchronous communication (e.g., a standard method call).
%%%
What is the primary purpose of a **Boundary Object** in the context of the Hardware/Software boundary?
---
🔌 To **abstract away the details** of communicating with the "hardware" side of the interface.
%%%
Why are **Entity Objects** usually the only passive objects in this architecture?
---
💾 Because their primary role is to **store and manage data** for other active components rather than orchestrating system behavior or timing.