Chapter 6 - Object Modeling

Updated 5 Oct 2026

📦 Chapter 6 — Object Modeling Cheat Sheet

DES329 System Analysis & Design | Final Exam Prep


🧠 Why Object-Oriented Analysis?

Object-Oriented (OO) Analysis describes an information system using objects — real-world things that matter to the system.

Why OO?Benefit
Matches real-world thinkingEasier for analysts + developers to align
Modular designEach object is independent → easy to maintain
Reusable componentsObjects/classes can be reused across systems
Integrates with OO languagesWorks directly with Java, Python, Swift, C++

End product = an Object Model: a full picture of the system using objects and OO concepts.


🧱 Core Building Blocks

Object

A person, place, event, or transaction that is significant to the information system.

Each object has:

  • Attributes — what it knows (data/characteristics)
  • Methods — what it does (functions/behaviors)
  • Instance — a specific real occurrence of that object

Example:

PARENT objectSTUDENT object
AttributesName, Age, Sex, Hair colorName, Age, GPA, Student ID
MethodsRead bedtime story, Drive carpoolRegister for class, Pay fees
InstanceMary Smith (25, Female, Red hair)Google Intakaew (21, Male)

🍎 Analogy: An object is like a blueprint + an actual product. The PARENT class is the blueprint; Mary Smith is the built product (instance).


Attributes

Characteristics that describe an object. They define the object's current state.

  • Determined during the development process
  • An object's state = the current values of all its attributes at a given moment

🔧 Think of attributes as columns in a database row — they describe what the object looks like right now.


Methods

Tasks or functions that an object performs when it receives a message/command.

Each method = a series of steps.

Example — MORE FRIES method:

  1. Heat oil
  2. Fill fry basket with frozen potato strips
  3. Lower basket into hot oil
  4. Check for readiness
  5. Raise basket when ready, let drain
  6. Pour fries into warming tray
  7. Add salt

🍎 Analogy: Methods are like the instructions on a machine — you press a button (send a message), and the machine knows exactly what to do internally.


Messages

A command that tells an object to perform a method. It triggers behavior without specifying how it's done internally.

Why messages? → They allow objects to interact without knowing each other's internals.

This leads to two key concepts:

🔀 Polymorphism

The same message sent to different objects produces different results.

MessageObjectBehavior
GOOD NIGHTPARENTReads a bedtime story
GOOD NIGHTDOGGoes to sleep
GOOD NIGHTCHILDGets ready for bed

🍎 Why use it? You don't need to write separate goodNightParent(), goodNightDog() commands — one message, smart routing.

📦 Encapsulation

An object is a black box — all data and methods are self-contained. You only need to know what message to send, not how it works inside.

🍎 Real-world analogy: A microwave. You press "2 minutes" (send a message). You don't need to know how the magnetron generates microwaves. The internal process is hidden.


🗂️ Classes, Subclasses, and Superclasses

Class

A group/category that objects belong to. All objects in a class share the same attributes and methods.

Superclass vs Subclass

TermMeaning
SuperclassThe general parent class (e.g., VEHICLE)
SubclassA more specific child class (e.g., CAR, TRUCK)

Example — VEHICLE hierarchy:

VEHICLE (Superclass)
  Attributes: Make, Model, Year, Weight, Color
  Methods: Start, Stop, Park
  ├── CAR (inherits all VEHICLE attributes)
  ├── MINIVAN (inherits all VEHICLE attributes)
  ├── TRUCK (+ Load limit attribute)
  └── SCHOOL BUS (+ Emergency exit location attribute)

Example — Fitness Center hierarchy:

PERSON (Superclass)
  Attributes: Name, Date of birth
  Methods: Breathe, Eat, Sleep
  └── EMPLOYEE (Class)
        Attributes: SSN, Telephone, Hire date, Title, Pay rate
        Methods: Get hired, Terminate, Change telephone
        └── INSTRUCTOR (Subclass)
              Attributes: Instructor type, Availability
              Methods: Teach fitness-class

🍎 Analogy: Superclass = a job description template. Subclass = a specific role (like "Senior Instructor") that inherits the general requirements and adds its own.


🔗 Relationships Among Objects and Classes

Inheritance (Strongest Relationship)

A child class derives attributes and methods from a parent class, and can add its own.

Example — INSTRUCTOR inherits from EMPLOYEE:

Attribute/MethodSource
SSN, Telephone, Hire date, Title, Pay rate✅ Inherited from EMPLOYEE
Get hired, Terminate, Change telephone✅ Inherited from EMPLOYEE
Type of Instructor➕ New — added by INSTRUCTOR

Why inheritance? → Avoid repeating the same attributes. Define once in the parent; all children get it for free.

Object Relationship Diagram — Fitness Center

📸 Include Figure 6-10 from textbook here

Key relationships to memorize:

  • EMPLOYEE → is a → MANAGER, OFFICE STAFF, INSTRUCTOR
  • MANAGER → determines → FITNESS-CLASS SCHEDULE
  • INSTRUCTOR → teaches → FITNESS-CLASS
  • OFFICE STAFF → administers → REGISTRATION RECORD
  • REGISTRATION RECORD → generates roster → FITNESS-CLASS
  • REGISTRATION RECORD → adds → STUDENT
  • STUDENT → takes → FITNESS-CLASS

📐 UML — Unified Modeling Language

UML = a standard visual language for describing OO systems using symbols and diagrams.

Why UML? → Everyone (analyst, developer, client) can read the same diagram format. It's the universal language of system design.

There are 6 main diagram types in this chapter:


1. 🎭 Use Case Modeling

Describes who does what in the system — a step-by-step description of a business function.

  • Use Case = one specific business function/process
  • Actor = external entity (person/system) that initiates the use case (drawn as a stick figure)
  • Actor → arrow → Use Case (oval)

Use Case Description Fields:

FieldWhat It Covers
NameName of the use case
ActorWho triggers it
DescriptionBrief summary
Successful completionStep-by-step happy path
AlternativeWhat happens when the main path fails
PreconditionWhat must be true before it starts
PostconditionWhat is true after it completes
AssumptionsAny assumed conditions

Example — ADD NEW STUDENT:

FieldContent
ActorStudent / Manager
PreconditionStudent requests fitness-class
Successful path1. Manager checks schedule → 2. Notifies student → 3. Student pays → 4. Manager registers student
Alternative1. Manager checks schedule → 2. Class is full → 3. Manager notifies student
PostconditionStudent enrolled and fees paid

🍎 Analogy: Use cases = user stories in Agile ("As a student, I want to register for a class") — but more structured and formal.


2. 🗺️ Use Case Diagrams

A visual summary of multiple related use cases in a system or subsystem.

  • Rectangle = system boundary (inside = in-scope, outside = out-of-scope)
  • Actors outside the rectangle
  • Use cases inside the rectangle

📸 Include Figure 6-15 (Auto Service Department) from textbook here

Actors: Customer, Service Writer, Mechanic
Use Cases: Create Work Order, Update Work Schedule, Prepare Invoice

Why use case diagrams? → Quickly shows the scope of the system and who interacts with what.


3. 🏗️ Class Diagrams

Shows the object classes, their attributes/methods, and relationships for a use case.

Each class = a rectangle with 3 sections:

┌─────────────────┐
│   Class Name    │  ← Top
├─────────────────┤
│   Attributes    │  ← Middle
├─────────────────┤
│    Methods      │  ← Bottom
└─────────────────┘

Lines between classes show relationships, labeled with cardinality.

Cardinality Notations (MEMORIZE THESE):

NotationMeaningExample
0..*Zero or manyAn employee can have 0 or many payroll deductions
0..1Zero or oneAn employee can have 0 or 1 spouse
1One and only oneAn office manager manages exactly 1 office
1..*One or manyOne order includes 1 or more items

📸 Include Figure 6-17 (Sales Order Class Diagram) from textbook here

Key relationships in the Sales Order example:

  • Sales Manager manages (1 → 0..*) Sales Rep
  • Sales Rep assigned to (0..* ↔ 0..*) Customer
  • Customer places (1) → Order
  • Order includes (0..* → 1..*) Items Ordered

🍎 Analogy: Class diagrams are like ERDs in databases — same concept (relationships + cardinality), just OO notation.


4. ⏱️ Sequence Diagrams

A dynamic model showing how classes interact over time during a use case — who sends what to whom and in what order.

Key Symbols:

SymbolMeaning
Rectangle (top)Class/Object
Dashed vertical lineLifeline — time the object exists and can interact
ArrowMessage — labeled with what is communicated
Narrow rectangle on lifelineFocus — when messages are actively sent/received
X at bottom of lifelineObject is destroyed / interaction ends

Example — ADD NEW STUDENT Sequence:

STUDENT       MANAGER       FITNESS-CLASS SCHEDULE       REGISTRATION RECORD
   |              |                   |                           |
   |--Request fitness-class-->        |                           |
   |              |--Check schedule-->|                           |
   |              |<--Schedule info---|                           |
   |<--Notify-----|                   |                           |
   |--Pay-------->|                   |                           |
   |              |--Register------------------------>|           |
   |              |                   |               X (ends)    |

📸 Include Figure 6-19 from textbook here

🍎 Analogy: Sequence diagrams = network packet flow diagrams. You can trace exactly who sent what, to whom, and in what order — like wireshark for business logic.

Why use sequence diagrams vs class diagrams?
Class diagrams show structure (what exists). Sequence diagrams show behavior over time (what happens when). You need both.


5. 🔄 State Transition Diagrams

Shows how an object changes state based on events. Documents all possible states and what triggers transitions between them.

  • Rounded rectangles = states
  • Arrows = transitions triggered by events

Example — ORDER object states:

[New Order] --payment received--> [Confirmed] --shipped--> [In Transit] --delivered--> [Completed]
                                      |
                                  [Cancelled] <--cancellation request--

🍎 Analogy: Like a traffic light FSM (Finite State Machine) — it's always in one state (Red/Yellow/Green), and specific events trigger transitions.

Why use it? → Ensures you've handled every possible scenario an object can be in. Great for catching edge cases before coding.


6. 🔀 Activity Diagrams

Shows actions and events as they occur, in order — including decisions and outcomes.

  • Very similar to flowcharts, but in UML notation
  • Shows parallel processes and conditional branching

Example — ATM Cash Withdrawal:

Start
  → Customer inserts ATM card
  → [Card accepted?]
      YES → Customer enters PIN
           → [PIN accepted?]
               YES → Customer requests cash amount
                    → [Sufficient funds?]
                         YES → ATM provides cash → ATM adjusts balance → End
                         NO  → ATM notifies customer → End
               NO  → Card returned → End
      NO  → Card returned → End

📸 Include Figure 6-21 (ATM Activity Diagram) from textbook here

🍎 Analogy: Activity diagrams = flowcharts with UML clothes. If you can draw a flowchart, you can draw an activity diagram.

When to use activity vs sequence?
Activity = shows what steps happen in a process (like a workflow).
Sequence = shows which objects talk to each other in what order.


7. 🏢 Business Process Modeling (BPM)

Models the people, events, and interactions in an entire business workflow — not just one use case.

  • Can be used at any point during development
  • Compatible with object modeling (not a replacement)
  • Great for visualizing end-to-end processes across departments

Why BPM vs Use Case?
Use cases = narrow, one function at a time.
BPM = wide view, entire business process from start to finish.


🛠️ Tools for Object Modeling

Object modeling generates many diagrams — doing this manually is slow and error-prone.

CASE Tools (Computer-Aided Software Engineering):

  • Speed up diagram creation
  • Provide a consistent framework for documentation
  • Help validate and cross-check model consistency

Examples in practice: Lucidchart, Visual Paradigm, StarUML, Enterprise Architect


📊 Quick Comparison — When to Use Which Diagram?

DiagramShowsUse When
Use CaseWho does what (text form)Defining system scope and user interactions
Use Case DiagramVisual overview of use cases + actorsShowing system boundary and actor relationships
Class DiagramStructure — classes, attributes, methods, relationshipsDesigning the static data model
Sequence DiagramDynamic — object interactions over timeTracing message flow in a specific scenario
State TransitionObject state changesModeling lifecycle of a key object
Activity DiagramProcess flow with decisionsModeling workflows and conditional logic
BPMFull end-to-end business processModeling organizational workflows

📝 Key Definitions (Exam-Ready)

TermDefinition
ObjectA person, place, event, or transaction significant to the information system
AttributeA characteristic that describes an object; defines its current state
MethodA task/function the object performs when it receives a message
MessageA command that triggers a method; enables objects to interact
PolymorphismSame message → different behavior depending on which object receives it
EncapsulationAll data and methods are self-contained; internal workings are hidden
ClassA group of objects sharing common attributes and methods
SuperclassThe general parent class
SubclassA more specific child class that inherits from the superclass
InheritanceThe strongest OO relationship; child derives attributes/methods from parent
InstanceA specific, real occurrence of an object
StateThe current values of all of an object's attributes at a given moment
UMLUnified Modeling Language — standard visual notation for OO systems
ActorExternal entity (user/system) that initiates a use case
LifelineDashed line in a sequence diagram showing how long an object is active
CardinalityThe numerical relationship between two classes (e.g., 1 to many)
CASE ToolsSoftware tools that support and speed up object modeling