Class Models
for Engineering Design
|
Prof. David Bernstein
James Madison University
|
|
Computer Science Department
|
bernstdh@jmu.edu
|
Overview
- Purpose of Class Models for Engineering Design
- Contents of Such Models
- The Process
Class Models for Engineering Design
- Purpose:
- Illustrate the specifications for the static structure
of classes and interfaces
- Enhineering Models vs. Conceptual Models:
- A conceptual model represent real-world concepts
- An engineering design model represent software components
Contents of Class Models for Engineering Design
- Classes and Interfaces/Contracts
- Attributes
- Methods
- Dependencies
The Process
- Identify all of the classes
- Identify attributes of each class
- Identify methods
- Add type/signature information
- Add associations ("use"), aggregations ("has a"), and
specializations ("is a")
- Replace classes with interfaces (as appropriate)
- Add dependencies (where needed)
Classes in UML
The Basics
Classes in UML (cont.)
Visibility
- Public (+)
- Private (-)
- Protected (#)
- Implemented (or Package) (~)
Interfaces in UML
- Defined:
- A set of operations/services
- Implications:
- A class that implements/realizes an interface promises
that it will implement all of the methods in the interface
- A class that implements/realizes an interface has an "is a"
relationship with that interface
Interfaces in UML (cont.)
An Example
There's Always More to Learn