pri Flashcards

(30 cards)

1
Q

What does UML stand for and what is it?

A

Unified Modeling Language. It is a STANDARDIZED visual language for describing software systems — their structure, behavior, and interactions. It is NOT a development method, just a notation/language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Who created UML and when?

A

Grady Booch, James Rumbaugh, and Ivar Jacobson (the ‘Three Amigos’) at Rational Software, starting 1996. UML 1.0 was submitted to OMG in 1997. Current standard: ISO/IEC 19501.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Use Case?

A

A description of a sequence of actions a system performs that yields a result of value to an Actor. It defines WHAT the system does from the user’s perspective, not HOW it does it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Actor in UML?

A

A role played by a person, organization, or external system that interacts with our system. One person can play multiple actor roles. An actor can also be another software system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between include and extend in Use Case diagrams?

A

INCLUDE: Use case A always calls use case B (mandatory). Example: ‘Login’ always includes ‘Verify Password’. EXTEND: Use case B optionally extends A under certain conditions. Example: ‘Apply Discount’ extends ‘Checkout’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Use Case Model?

A

Defines: (1) the system’s context — actors and external systems, (2) the system itself — the use cases. It specifies system behavior in terms of responses to inputs from outside.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an Activity Diagram used for?

A

Modeling workflows and processes. Can represent: business processes, use case scenarios, parallel processing, algorithms, and operations. Shows the FLOW of control or objects through activities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between an Action and an Activity in UML?

A

ACTION: A basic, atomic operation that cannot be interrupted. ACTIVITY: A composite operation made of other actions/activities. An activity diagram detailing an activity must have the same name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Decision Node in Activity Diagrams?

A

A diamond-shaped node where control flow splits based on a condition (guard). Like an if-statement. Control follows ONE path based on the condition. The merge node reunites the paths.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a Fork and Join in Activity Diagrams?

A

FORK: Splits one flow into multiple PARALLEL flows (like starting multiple threads). JOIN: Waits for ALL incoming parallel flows to complete before continuing. Together they model concurrent processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 4 main OOP concepts?

A
  1. ENCAPSULATION — hiding internal details, exposing only interface. 2. INHERITANCE — child class inherits properties of parent. 3. POLYMORPHISM — same interface, different behavior. 4. ABSTRACTION — modeling only relevant details.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Class in OOP?

A

A blueprint/template that defines the properties (attributes) and behaviors (methods) shared by all objects of that type. Example: ‘Car’ class defines color, speed, drive(), brake().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an Object?

A

A specific INSTANCE of a class with its own data values. Example: myCar = Car(color=’red’, speed=120). Each object has: identity (unique ID), state (attribute values), behavior (methods).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How is a Class shown in a UML Class Diagram?

A

A rectangle divided into sections: TOP: class name (bold), MIDDLE: attributes (name: type = default), BOTTOM: methods (name(params): returnType). Visibility: + public, - private, # protected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Inheritance in UML Class Diagrams?

A

Shown as an arrow with a hollow triangle pointing to the PARENT class. The child class inherits all attributes and methods of the parent. Also called ‘generalization’ (going up) or ‘specialization’ (going down).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an Association in UML?

A

A relationship between two classes where objects of one class are related to objects of another. Shown as a line between classes. Has: name, roles, and multiplicity.

17
Q

What is Multiplicity in UML associations?

A

Specifies how many objects participate in a relationship. Common notations: 1 (exactly one), * or 0..* (zero or more), 1..* (one or more), 0..1 (zero or one), 2..5 (two to five).

18
Q

What is the difference between Aggregation and Composition?

A

AGGREGATION (hollow diamond): ‘has-a’ — parts can exist independently. Example: Department has Employees. COMPOSITION (filled diamond): ‘strong has-a’ — parts cannot exist without the whole. Example: House has Rooms.

19
Q

What is an Association Class?

A

A class attached to an association that holds attributes/methods belonging to the RELATIONSHIP itself, not to either participating class. Example: ‘AccessPermission’ between User and File storing permission level.

20
Q

What is a Qualified Association?

A

An association with a QUALIFIER attribute that acts as a key to identify specific objects on one end. Like using a key in a dictionary to look up a specific object. Reduces multiplicity.

21
Q

What is disjoint vs overlapping inheritance?

A

DISJOINT: An object can belong to only ONE subclass (default in Java/C++). OVERLAPPING: An object can belong to MULTIPLE subclasses simultaneously. Example: a vehicle that is both a WaterVehicle and LandVehicle.

22
Q

What is an N-ary Association?

A

An association linking objects from more than 2 classes simultaneously. A ternary association links 3 classes. Note: N-ary associations cannot have aggregation, composition, qualifiers, or one-way navigation.

23
Q

What is a Derived Association?

A

An association that can be calculated/derived from other associations in the model. Marked with ‘/’ before the name. It’s redundant but shown for clarity.

24
Q

What is the purpose of a sequence diagram?

A

Shows object interactions arranged in TIME order. Shows which objects call which methods and in what sequence. Great for showing the flow of a single use case scenario.

25
What is encapsulation and why is it important?
Hiding the internal implementation of an object and only exposing a public interface. Importance: (1) protects data from corruption, (2) allows changing implementation without breaking other code, (3) reduces complexity.
26
What is polymorphism?
The ability for objects of different classes to respond to the same message/method call in different ways. Example: shape.draw() works for Circle, Square, Triangle — each draws itself differently.
27
What is an abstract class?
A class that CANNOT be instantiated directly. It defines a common interface and may have abstract methods (no implementation) that subclasses MUST implement. Shown in UML with class name in italics.
28
What is the difference between a class diagram and an object diagram?
CLASS DIAGRAM: Shows the types (classes) and their relationships — the blueprint. OBJECT DIAGRAM: Shows specific instances (objects) at a particular moment in time — a snapshot.
29
What is a stereotype in UML?
An extension mechanism that adds new meaning to a UML element. Written in guillemets: «stereotype». Examples: «interface», «abstract», «actor», «boundary», «control», «entity».
30
What is a dependency in UML?
A relationship where a change in one element may affect another. Shown as a dashed arrow. Weaker than association. Example: a class using another class only as a parameter in a method.