libraryUML - Modeling with UML (1.4) Class Model Diagrams...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Modeling with UML (1.4) Class Model Diagrams • UML class model diagrams are commonly used to represent the structural aspects of system design problems • A class diagram consists of a collection of object classes and the relationships among them
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Classes • A class is a distinct object type participating in the system being built • A common noun in English often indicates an object type • An class is represented by a rectangular box, possibly partitioned into three parts horizontally – Class name – Attributes – Operations
Background image of page 2
Class Features • Classes have features (attributes and operations) • While objects and classes exist in the real world or in the mind of the designer, features exist inside of the computer • An attribute is a property of an class – Typically, attributes have types that correspond to primitive or composite data types available on the computer • An operation (method) is a service provided by an object. It may take parameters and possibly return a value
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Methods • Analyze requirements statements into nouns, verbs and adjective; use the results to suggest classes, operations and attributes, respectively • Write scenarios (user stories) and use them to generate CRC (class- responsibility-collaborator) cards
Background image of page 4
Relationships • Relationships exist among classes, and they are represented by lines connecting the related classes • A transitive verb in English may indicate a relationship • UML has three kinds of relationships – Generalization – Dependency – Association
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Library Information System • This exercise asks you to create a UML class diagram that models the problem of managing the information resources for a library • Assume that somebody else will be designing the program from your analysis – Include classes, their attributes and operations and the relationships among them – Indicate attribute types, cardinality of associations, generalization and aggregation relationships
Background image of page 6
Library Problem Requirements 1. Each patron has one unique library card for as long as they are in the system. 2. The library needs to know at least the name, address, phone number, and library card number for each patron. 3. In addition, at any particular point in time, the library may need to know or to calculate the items a patron has checked out, when they are due, and any outstanding overdue fines. 4. Children (age 12 and under) have a special restriction–they can only check out five items at a time. 5. A patron can check out books or audio/video materials. 6.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 38

libraryUML - Modeling with UML (1.4) Class Model Diagrams...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online