Introduction
Conceptual modeling is an important activity for ontology design, object-oriented programming, user interface design, and database design. This lesson is a guided workshop.
The exercises can be found in this LucidChart Document.
Activity I
Represent the following facts in a UML Class Diagram. Only represent in UML what is provided; do not make assumptions; do not add any facts.
- a flight reservation is for to one or more passengers and one or more flight segments
- a flight reservation has a unique reservation record locator
- each flight segment is a flight with a unique number for an airline
- a flight has an assigned flight crew which consists of one captain, one first officer, a purser, and 4. some number of flight attendants, but at least one
- some flights have a TSA security officer
- a flight has a departure and destination airport
- an airport is located in a city, state (or region, province), a country, and has a three digit/letter airport code (e.g., BOS for Boston)
- a flight is operated on an aircraft
- each aircraft has a make, model, year of manufacture, year of entry into service, flight hours, number of cycles, and a tail number
Attempt to sketch the UML Class Diagram for the above facts first before watching the tutorial below which discusses a solution approach:
Activity II
Extract at least three additional facts or constraints from the UML Class Diagram below. Write the facts as a sentence.
One fact is provided as an example.
- A customer makes at least one reservation.
- …
- …
- …
UML Class Diagram Containing Facts and Constraints
Attempt to write the facts before watching the tutorial below which discusses a solution approach:
Activity III
Add the appropriate classes, attributes, aggregation, composition, or generalization relationship definitions for the red-lined associations based on the facts below.
- Some courses do not have any lessons.
- A lesson may not necessarily be in a course.
- Course have many lessons.
- A demonstration is a kind of lesson.
- Every course has one or more instructor.
- No course can have more than three instructors.
- Instructors are paid a per-diem rate.
- Lessons can be bunched together into a stack.
UML Class Diagram With Missing Elements
Attempt to sketch the UML Class Diagram containing the missing modeling elements before watching the tutorial below which discusses a solution approach:
Summary
This lesson used worked examples to explain UML Class Diagrams.
Errata
None collected yet. Let us know.
LS0tCnRpdGxlOiAiV29ya3Nob3A6IFVNTCBDbGFzcyBEaWFncmFtIFJlcHJlc2VudGF0aW9uIgpwYXJhbXM6CiAgY2F0ZWdvcnk6IDMwCiAgc3RhY2tzOiAiMCwwIgogIG51bWJlcjogMTYwCiAgdGltZTogNDUKICBsZXZlbDogYmVnaW5uZXIKICB0YWdzOiBVTUwsQ2xhc3MgRGlhZ3JhbSxWaXN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