• Mindscape 🔥
    • Playlist 🎧
  • Algorithm

    • 1018번: 첎슀판 닀시 칠하Ʞ
    • 1966번: 프며터 큐
    • Python 시간 쎈곌 방지륌 위한 팁
    • C++ std::vector 사용법 정늬
    • Vim 사용 맀뉎얌
  • Ubuntu

    • 늬눅슀 우분투 GRUB 폰튾 변겜
    • 우분투 읎믞지 비디였 썞넀음(믞늬볎Ʞ) 안 볎임 묞제 핎결
    • Wine 환겜에서 칎칎였톡 싀행 시 explorer.exe 뜚지 않게 하는 법
    • 우분투 Wine 칎칎였톡 사진 읎믞지 슀크늰샷 붙여넣Ʞ
    • Wine 칎칎였톡 읎몚지 깚짐 묞제 핎결
    • Ubuntu 윈도우 애니메읎션 끄Ʞ
  • Wellness

    • 찚전자플 (Psyllium Husk)
    • 엑슀튞띌 버진 올늬람유 (Extra Virgin Olive Oil)
    • 자가비강섞척 (Nasal Irrigation)
    • QCY HT08 (MeloBuds Pro Plus)
    • 윘서타 (Concerta)
    • 읞데놀 (Inderal)
    • 섀튞랄늰 (Sertraline)
    • 멜띌토닌 (Melatonin)
    • 치겜부 마몚슝
    • 바벚 슀쿌튞 (Barbell Squat)
  • Humanities

    • Nordvik, Russia
    • North Sentinel Island
    • 롱고롱고(Rongorongo)
    • 바로크 음악 (Baroque Music)
  • Design

    • 구Ꞁ의 아읎윘 대개펞 — 6년 만의 싀수 읞정
    • 제럎드 젠타 — 럭셔늬 슀포잠 워치의 찜시자
    • 바우하우슀 — 현대 디자읞의 원점
  • Brands

    • NOMOS GlashÃŒtte
    • Frédérique Constant
    • KZ (Knowledge Zenith)
    • 에슀튞띌 (AESTURA)
    • JINHAO (金豪)
    • Herman Miller
    • 데슀컀 (DESKER)
    • 묎신사 슀탠닀드 (Musinsa Standard)
  • Finance

    • 현대칎드 ZERO — Edition2 vs Edition3 비교
    • 신한칎드 처음
    • S&P 500 ETF 투자 가읎드
    • 파킹통장 vs CMA 통장
    • 버크셔 핎서웚읎 (Berkshire Hathaway)
    • 비튞윔읞(Bitcoin)
  • Products

    • 였디였 읞터페읎슀 (Audio Interface)
    • 쿠룚토가 (KURUTOGA)
    • CX31993 DAC 동Ꞁ
    • 큎렌징 밀크 (Cleansing Milk)
    • 플젯 토읎 (Fidget Toy)
    • ThinkPad
  • Programming Languages

    • 8.0. Statement Level Control Structures
    • 8. Subprogram
    • 9. Implementing Subprogram
    • 10.1. Abstract Data Types and Encapsulation Constructs
    • 10.2. Support for Object Oriented Programming
    • 11. Concurrency
    • 12. FPL (1)
    • 13. FPL (2)
    • 14. Exception Handling and Event Handling
    • Final Exam

10. Object-Oriented Analysis

작성 2026. 6. 12.·수정 2026. 6. 12.

학습 목표

  • Domain의 핵심 추상화륌 식별하고 domain model로 몚덞링
  • 시슀템 낮 핵심 상혞작용 식별 및 system sequence diagram윌로 몚덞링
  • Low representational gap 섀계 원칙의 장점 및 한계 녌의

From Requirements to Code

┌──────────────┐           ┌───────┐
│  User Needs  ├──────────►│       │
│(Requirements)│  Miracle? │ Code  │
└──────────────┘           └───────┘

From Problem to Solution

┌──────────────┐      ┌──────────────┐
│Problem space │      │Solution space│
│(Domain model)├─────►│(Object model)│
└──────────────┘      └──────────────┘
  • Problem Space (Domain Model)
    • 싀제 섞계의 개념
    • 요구사항, 개념
    • 개념 간의 ꎀ계
    • 묞제 핎결
    • 얎휘 구축
  • Solution Space (Object Model)
    • System 구현
    • Classes, objects
    • Objects 간의 ì°žì¡° 및 상속 계잵
    • 결곌 계산
    • Solution ì°Ÿêž°

An Object-Oriented Design Process

  • OO Analysis: 묞제 읎핎
    • 묞제 model / diagram, 개념 정의
      • Domain model (a.k.a. conceptual model), 용얎집
    • System 동작 정의
      • System sequence diagram
      • System behavioral contracts
  • OO Design: Solution 정의
    • Object 책임 할당, 상혞작용 정의
      • Object interaction diagrams
    • 잠재적 Solution model / diagram
      • Object model

A Design Process

  • Object-Oriented Analysis
    • 묞제 읎핎
    • 핵심 개념곌 ê·ž ꎀ계 식별
    • (시각적) 얎휘 구축
    • Domain model (aka conceptual model) 생성
  • Object-Oriented Design
    • Software classes와 ê·ž ꎀ계륌 class diagrams로 식별
    • 책임 (attributes, methods) 할당
    • Interaction diagrams륌 통한 동작 탐색
    • 섀계 대안 탐색
    • Object model (aka design model) 및 interaction models 생성
  • Implementation
    • 섀계륌 code로 맀핑, classes 및 methods 구현

A High-level Software Design Process

  • Project 시작
  • 요구사항 수집
  • Actors 및 use cases 정의
  • 묞제 model / diagram, objects 정의
  • System 동작 정의
  • Object 책임 할당
  • Object 상혞작용 정의
  • 잠재적 Solution model / diagram
  • Solution 구현 및 test
  • 유지볎수, 발전 등

Domain Models 도메읞 몚덞

Object-Oriented Analysis

  • 요구사항에 나였는 명사듀, 자연얎 용얎집
  • Problem domain의 개념 ì°Ÿêž°
    • Real-world abstractions, 반드시 software objects는 아님
  • 묞제 읎핎
  • 공통 얎휘 확늜
  • 공통 묞서화, 큰 귞늌
  • Communication을 위핚
  • (비공식적읞) 표Ʞ법윌로 UML class diagrams을 자죌 사용
  • 추후 classes륌 ì°Ÿêž° 위한 출발점 (low representational gap)

Input to the Analysis Process: Requirements and Use Cases

공공 도서ꎀ은 음반적윌로 지역 사회 죌믌듀읎 대출할 수 있는 도서, 영화 또는 Ʞ타 도서ꎀ 자료륌 소장합니닀. 각 회원에게는 음반적윌로 도서ꎀ 계정곌 계정 ID 번혞가 Ʞ재된 도서ꎀ 칎드가 발꞉되며, 읎륌 통핎 도서ꎀ에서 볞읞 확읞을 할 수 있습니닀. 회원의 도서ꎀ 계정에는 핎당 회원읎 대출한 자료와 각 대출 자료의 반납 Ʞ한읎 Ʞ록됩니닀. 각 자료 유형에는 Ʞ볞 대여 Ʞ간읎 섀정되얎 있윌며, 읎는 자료가 대출될 때 반납음을 결정합니닀. 회원읎 반납음 읎후에 자료륌 반납할 겜우, 핎당 자료에 지정된 연첎료륌 지불핎알 하며, 읎 ꞈ액은 회원의 도서ꎀ 계정에 Ʞ록됩니닀.

유슈쌀읎슀 시나늬였: 도서ꎀ 회원은 도서ꎀ 시슀템 킀였슀크에서 도서ꎀ 칎드로 로귞읞하여 책을 대출할 수 있얎알 합니닀. 회원의 믞납 연첎료가 없음을 확읞한 후, 도서ꎀ 시슀템은 핎당 도서의 대여 Ʞ간을 현재 날짜에 더하여 반납 Ʞ한을 결정하고, 핎당 도서와 반납 Ʞ한을 회원의 도서ꎀ 계정에 대출 자료로 Ʞ록핎알 합니닀.

Modeling a Problem Domain

  • Domain 섀명의 핵심 개념 식별
    • 명사, 동사, 개념 간 ꎀ계 식별
    • "System"곌 같은 non-specific한 얎휘 지양
    • Operations와 concepts 구분
    • Domain 전묞가와 brainstorming

Glossary 용얎집

  • 핵심 개념 식별 및 정의

  • 개발자와 고객 간의 공유된 읎핎 볎장

           ┌─── 몚혞할 수 있는 개념 정의 ──────┐   
    

    ┌────────▌───────────────────────────────────┌──┐ │Library item: Any item that is indexed and │ │ │can be borrowed from the library │ │ │Library member: Person who can borrow from â–Œ │ │library, identified by a card with an ID number│ │Book │ └─▲─────────────────────────────────────────────┘ └─명백한 개념에 대핎선 섀명할 필요 없음.

Visual Notation: UML

 Name of real-world concept   Multiplicities/cardinalities
 (not software cases)       ┌─indicate "how many"         
   │                        │                             
┌──▌────────────┐           │┌───────┐                    
│Library Account│           ││Book   │                    
├────────────────   borrow  │├────────                    
│accountID      ├─────▲─────▌─title  │                    
│lateFees       │1    │     *│author │                    
└▲──────────────┘     │      └───────┘                    
 └─Properties     Associations                            
   of concept     between concepts                        

Reading Associations

────────────────────────────────────────►       
One library account can borrow many books       
┌───────────────┐            ┌───────┐          
│Library Account│            │Book   │          
├────────────────   borrow   ├────────          
│accountID      ├─────────────title  │          
│lateFees       │1          *│author │          
└───────────────┘            └───────┘          
One book can be borrowed by one library account 
◄──────────────────────────────────────────────

Attributes vs. Concepts

┌───────────────┐      ┌───────────────┐          ┌───────┐
│Library Account│      │Library Account│          │Book   │
├────────────────      ├────────────────  borrow  ├────────
│accountID      │ vs.  │accountID      ├───────────title  │
│lateFees       │      │lateFees       │1        *│author │
│borrowedBooks  │      └───────────────┘          └───────┘
└───────────────┘                                          

"싀제 섞계에서 ì–Žë–€ 개념적 class X륌 text나 숫자로 생각하지 않는닀멎, 귞것은 attribute가 아니띌 concept음 가능성읎 높닀."

  • Type annotations 회플

Modeling a Problem Domain

  • Domain model은 삎아있는 묞서
  • Communication을 위핎 사용
  • 싀제 섞계 개념에 집쀑
    • (예: Database 같은 추상적 구현 ꎀ심사 아님)
    • Methods/operations 없음
    • ꎀ계(relationships)와 닀쀑성(cardinalities) 표시

Identifying Concepts

"A public library typically stores a collection of books, movies, or other library items available to be borrowed by people living in a community. Each library member typically has a library account and a library card with the account’s ID number, which she can use to identify herself to the library. A member’s library account records which items the member has borrowed and the due date for each borrowed item. Each type of item has a default rental period, which determines the item’s due date when the item is borrowed. If a member returns an item after the item’s due date, the member owes a late fee specific for that item, an amount of money recorded in the member’s library account 20"

Hints for Identifying Concepts

  • 요구사항 명섞 읜Ʞ, 명사 ì°Ÿêž°
  • Ʞ졎 models 재사용
  • 범죌 list 사용
    • 유형의 사묌: cars, telemetry data, terminals 등
    • 역할: mother, teacher, researcher
    • 읎벀튞: landing, purchase, request
    • 상혞작용: loan, meeting, intersection 등
    • 구조, 장치, 조직 닚위 등
  • 음반적읞 use scenarios 분석, 동작 분석
  • Brainstorming
  • 수집 뚌저. 조직, 필터링, 수정은 읎후에!

One Domain Model for the Library System

┌───────────────┐              ┌─────────────┐       
│    Library    │<>-1-----0*..>│    Item     │       
└───────┬───────┘   has many   ├──────────────       
        │                      │rentalPeriod │       
        │has many              │lateFee      │       
        1                      └───────▲─────┘       
        │                              │is a         
        │                      ┌───────┮─────┐       
┌───────▌───────┐          ┌───┮──┐     ┌────┮──┐    
│ LibraryMember │<>-1-has-1│ Book │     │ Movie │    
├────────────────          └──────┘     └───────┘    
│has            │has                                 
1               1                                    
┌───────▌───────┐  ┌───────────────────────────┐     
│  LibraryCard  │<-│-------1──────────────┐    │     
├────────────────  │associated with       │    │     
│idNumbers      │  │                      1    │     
└───────┬───────┘  │                ┌─────▌────▌────┐
        └──────────│───────────────>│LibraryAccount │
          1        │                ├────────────────
                   │                │idNumbers      │
                   │                │lateFeeOwed    │
                   │                └─────┬─────────┘
                   │                      │has many  
                   │                      1          
                   │                ┌─────▌─────────┐
                   └----------0..*<>│ BorrowedItem  │
                                    ├────────────────
                                    │dueDate        │
                                    │item           │
                                    └───────────────┘

Notes on the Library Domain Model

  • 몚든 개념은 프로귞래뚞가 아니얎도 ì ‘ê·Œ 가능
  • UML 표Ʞ법은 닀소 비공식적. ꎀ계는 종종 닚얎로 섀명됚
  • 싀제 섞계의 "is-a" ꎀ계는 domain model에 적합
  • 싀제 섞계의 추상화는 domain model에 적합
  • 반복읎 쀑요: 읎 예시는 쎈안임. 싀제 섀계에서는 음부 용얎 수정 가능성
    • 예: Item vs. LibraryItem, Account vs. LibraryAccount
  • 집합 타입(Aggregate types)은 볎통 별도 개념윌로 몚덞링
  • Ʞ볞 attributes (숫자, 묞자엎)는 볎통 attributes로 몚덞링

Why Domain Modeling?

  • Domain 읎핎
    • 섞부사항읎 쀑요! (예: System에게 책곌 비디였는 닀륞가?)
  • 완전성 볎장
    • (예: 연첎료가 고렀되었는가?)
  • 공통 용얎 집합에 동의
    • 예: library item vs collection entry vs book
  • 섀계 쀀비
    • Domain concepts는 OO classes의 좋은 후볎 (-> low representational gap)

Hints for Object-Oriented Analysis

  • Domain model은 얎휘 제공
    • 개발자, 테슀터, 고객, domain 전묞가 간 communication을 위핚
    • 닚음 얎휘에 동의하고 시각화
  • Software classes나 data가 아닌, concepts에 집쀑
    • 아읎디얎, 사묌, objects
    • 읎늄 부여, 정의 및 예시 제공 (symbol, intension, extension)
  • 용얎집(Glossary) 추가
  • 음부는 classes로 구현될 수도, 아닐 수도 있음
  • 많은 선택지가 졎재
  • Model읎 완벜하게 정확하지 않을 것
    • ꎜ찮음.
    • 부분적읞 model로 시작, 필요한 것만 modeling
    • 나쀑에 추가 정볎로 확장
    • 변겜 사항 명확히 communicate
    • 귞렇지 않윌멎 "analysis paralysis(분석 마비)" 위험

Domain Model Distinctions

  • VS. data model (solution space)
    • 반드시 저장될 data는 아님
  • VS. object model 및 Java classes (solution space)
    • 싀제 domain concepts만 포핚 (싀제 objects 또는 싀제 섞계의 추상화)
    • "UI frame", database 등 믞포핚

System Sequence Diagram

Understanding System Behavior

  • System sequence diagram: 하나의 use scenario에 대핮, system의 겜계(boundary)에서 발생하는 읎벀튞 순서륌 볎여죌는 model
  • 섀계 목표: System의 interface 식별 및 정의
    • System 수쀀의 구성요소만 (예: 사용자와 전첎 system)

One Example for the Library System

┌─────┐        ┌───────┐
│User │        │System │
└──┬──┘        └───┬───┘
   │    login(card)│    
   ├──────────────►│    
   │◄--------------│    
   │               │    
   │   borrow(book)│    
   ├──────────────►│    
   │◄--------------│    
   │success?       │    
   │due date       │    
  • Use case 시나늬였: Library member가 library card로 kiosk 로귞읞 후 책 대출. 연첎료 믞납을 확읞 후, rental period륌 더핮 반납 Ʞ한 결정. 책곌 반납 Ʞ한을 member의 account에 Ʞ록

Behavioral Contracts

Formalize System at Boundary

┌─────┐        ┌───────┐
│User │        │System │
└──┬──┘        └───┬───┘
   │    login(card)│    
   ├──────────────►│    
   │◄--------------│    
   │               │    
   │   borrow(book)│    
   ├──────────────►│    
   │◄--------------│    
   │success?       │    
   │due date       │    
  • System behavioral contract
    • System sequence diagrams에서 식별된 특정 operation에 대한 pre-conditions와 post-conditions Ʞ술
    • System 수쀀의 텍슀튞 명섞, software specifications와 유사

System Behavioral Contract Example

  • Operation: borrow(item)
  • Pre-conditions
    • Library member가 system에 읎믞 로귞읞핚
    • Item읎 현재 닀륞 member에게 대출되지 않음
  • Post-conditions
    • 로귞읞된 member의 account에 새로 대출된 item Ʞ록, 또는 member에게 믞납 연첎료 겜고
    • 새로 대출된 item은 item의 rental period + 현재 날짜로 계산된 믞래의 반납 Ʞ한 포핚

Distinguishing Domain vs. Implementation Concepts

  • Domain-level concepts
    • 싀제 섞계의 유사묌(analogue)을 가진 거의 몚든 것
  • Implementation-level concepts
    • 구현곌 유사한 method 읎늄
    • Programming types
    • Visibility modifiers
    • Helper methods 또는 classes
    • Design patterns의 산출묌

Summary: Understanding the Problem Domain

  • Domain 수쀀의 표현을 구축하는 tools 파악
    • Domain models
    • System sequence diagrams
    • System behavioral contracts
  • 신속하고 (때로는) 유연하게
    • 명백한(?) 섞부 사항 생략
    • 반복, 반복, 또 반복...
  • Domain 전묞가로부터 feedback 받Ʞ
    • Domain 수쀀의 concepts만 사용
최귌 수정: 26. 6. 12. 였후 3:28
Contributors: kmbzn, Claude Sonnet 4.6

BUILT WITH

CloudflareNode.jsGitHubGitVue.jsJavaScriptVSCodenpm

All trademarks and logos are property of their respective owners.
© 2026 kmbzn · MIT License