Exercise

Concepts

T-Box model = class diagram modeling a domain

A-Box model = object diagram modeleling instantiating a T-Box model

Actor-Role Pattern

Types-as-Objects Pattern

Problem 1

Important roles in a hospital include physician, nurse, and patient. (Of course nurses and physicians are occasionally patients, too.) Every patient has a primary physician. Nurses care for patients. A patient has many lab reports. There are many types of lab reports. A report has a date and a link to a document.

Draw a T-Box model of this domain.

Problem 2

Smith is a patient at People's Hospital. Her primary physician is Gupta. Nurses Betty and Ratchet care for her. Smith has two lab reports, a blood panel and an x-ray.

Draw an A-Box model of this domain using the classes in your T-Box model.