Разделы презентаций


IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 6: Class

Содержание

Objectives Describe the static view of the system and show how to capture it in a model.Demonstrate how to read and interpret a class diagram.Model an association and aggregation and show how

Слайды и текст этой презентации

Слайд 1IBM Software Group
®

Essentials of Visual Modeling with UML 2.0 Module

6: Class Diagrams

IBM Software Group®Essentials of Visual Modeling with UML 2.0  Module 6: Class Diagrams

Слайд 2Objectives
Describe the static view of the system and show how

to capture it in a model.
Demonstrate how to read and

interpret a class diagram.
Model an association and aggregation and show how to model it in a class diagram.
Model generalization on a class diagram.
Objectives	Describe the static view of the system and show how to capture it in a model.Demonstrate how

Слайд 3Where Are We?
Class diagrams
Class relationships
Association
Aggregation
Generalization

Where Are We?Class diagramsClass relationshipsAssociationAggregationGeneralization

Слайд 4What Is a Class Diagram?
Статическое описание системы
ФормаЗакрытия
Регистрации
+ открыть()
+ закрыть регистрацию()
Преподаватель
-

имя
- табельныйНомер :UniqueId
- датаНайма
- статус
- дисциплина
- максНагрузка
+ выставитьОценки()
+ принятьКурс()
+ установитьМаксНагрузку()
+

взятьОтпуск()
+ учитьКласс()

КонтроллерЗакрытия
Регистрации

+ регистрация открыта?()

+ закрыть регистрацию()

What Is a Class Diagram?Статическое описание системыФормаЗакрытияРегистрации+ открыть()+ закрыть регистрацию()Преподаватель- имя- табельныйНомер :UniqueId- датаНайма- статус- дисциплина- максНагрузка+

Слайд 5Class Diagram Usage
When modeling the static view of a system,

class diagrams are typically used in one of three ways,

to model:
The vocabulary of a system
Collaborations
A logical database schema
Class Diagram UsageWhen modeling the static view of a system, class diagrams are typically used in one

Слайд 6Example: Class Diagram
Is there a better way to organize class

diagrams?
CloseRegistrationForm
LoginForm
Professor
BillingSystem
CloseRegistrationController
RegisterForCoursesForm
Course
CourseCatalogSystem
Student
RegistrationController
CourseOffering
Schedule

Example: Class DiagramIs there a better way to organize class diagrams?CloseRegistrationFormLoginFormProfessorBillingSystemCloseRegistrationControllerRegisterForCoursesFormCourseCourseCatalogSystemStudentRegistrationControllerCourseOfferingSchedule

Слайд 7A general purpose mechanism for organizing elements into groups.
A model

element that can contain other model elements.
A package can be

used:
To organize the model under development
As a unit of configuration management

Review: What Is a Package?

Артифакты

Университета

A general purpose mechanism for organizing elements into groups.A model element that can contain other model elements.A

Слайд 8Example: Registration Package
Регистрация
ФормаЗакрытия
Регистрации
КонтроллерЗакрытия
Регистрации
ФормаРегистрацииНаКурс
КонтроллеРегистрации

Example: Registration PackageРегистрацияФормаЗакрытияРегистрацииКонтроллерЗакрытияРегистрацииФормаРегистрацииНаКурсКонтроллеРегистрации

Слайд 9Class diagrams
Class relationships
Association
Aggregation
Generalization
Where Are We?

Class diagramsClass relationshipsAssociationAggregationGeneralizationWhere Are We?

Слайд 10What Is an Association?
The semantic relationship between two or more

classifiers that specifies connections among their instances.
A structural relationship

specifying that objects of one thing are connected to objects of another thing.

Курс

Студент

Расписание

What Is an Association?The semantic relationship between two or more classifiers that specifies connections among their instances.

Слайд 11Example: What Associations Can You Find?
: CourseOffering
: RegistrationController
: Schedule

: Student
: PrimaryScheduleOfferingInfo
8: any conflicts?( )
: RegisterForCoursesForm
2: submit schedule(

)

4: submit( )

3: save( )

7: still open?( )

9: add student(Schedule)

5: is selected?( )

10: mark as enrolled in( )

6: has pre-requisites(CourseOffering)

1: submit schedule( )

: Student

Example: What Associations Can You Find?: CourseOffering : RegistrationController: Schedule : Student: PrimaryScheduleOfferingInfo8: any conflicts?( ) :

Слайд 12What Is Multiplicity?
Multiplicity is the number of instances one class

relates to ONE instance of another class.
For each association, there

are two multiplicity decisions to make, one for each end of the association.
For each instance of Professor, many Course Offerings may be taught.
For each instance of Course Offering, there may be either one or zero Professor as the instructor.

Преподаватель

ПредложКурсы

0..1

0..*

0..1

0..*

instructor

What Is Multiplicity?Multiplicity is the number of instances one class relates to ONE instance of another class.For

Слайд 13Multiplicity Indicators
2..4
0..1
1..*
0..*
1
*
2, 4..6
Unspecified
Exactly One
Zero or More
Zero or More
Zero or One

(optional value)
One or More
Specified Range
Multiple, Disjoint Ranges

Multiplicity Indicators2..40..11..*0..*1*2, 4..6UnspecifiedExactly OneZero or MoreZero or MoreZero or One (optional value)One or MoreSpecified RangeMultiple, Disjoint Ranges

Слайд 14Example: Multiplicity
ФормаРегистрацииНаКурс
ПредложКурсы
Расписание
0..4
0..*
Студент
0..*
1
КонтроллерРегистрации
1
1
1
1
0..1
0..1
0..1

Example: MultiplicityФормаРегистрацииНаКурсПредложКурсыРасписание0..40..*Студент0..*1КонтроллерРегистрации11110..10..10..1

Слайд 15Class diagrams
Class relationships
Association
Aggregation
Generalization
Where Are We?

Class diagramsClass relationshipsAssociationAggregationGeneralizationWhere Are We?

Слайд 16What Is an Aggregation?
A special form of association that models

a whole-part relationship between the aggregate (the whole) and its

parts.
An aggregation is an “is a part-of” relationship.
Multiplicity is represented like other associations.

Часть

0..1

1

What Is an Aggregation?A special form of association that models a whole-part relationship between the aggregate (the

Слайд 17Example: Aggregation
RegisterForCoursesForm
CourseOffering
Расписание
0..4
0..*
Студент
0..*
1
RegistrationController
1
1
1
1
0..1
0..1
0..1

Example: AggregationRegisterForCoursesFormCourseOfferingРасписание0..40..*Студент0..*1RegistrationController11110..10..10..1

Слайд 18Class diagrams
Class relationships
Association
Aggregation
Generalization
Where Are We?

Class diagramsClass relationshipsAssociationAggregationGeneralizationWhere Are We?

Слайд 19Review: What Is Generalization?
A relationship among classes where one class

shares the structure and/or behavior of one or more classes.
Defines

a hierarchy of abstractions where a subclass inherits from one or more superclasses.
Single inheritance
Multiple inheritance
Is an “is a kind of” relationship.

Review: What Is Generalization?A relationship among classes where one class shares the structure and/or behavior of one

Слайд 20Example: Single Inheritance
One class inherits from another.

Checking
Savings
Суперкласс
Подкласс
Связь Обобщения
Потомки
Предок
Account
- balance
- name
-

number
+ withdraw()
+ createStatement()

Example: Single InheritanceOne class inherits from another.CheckingSavingsСуперклассПодкласс Связь ОбобщенияПотомкиПредокAccount- balance- name- number+ withdraw()+ createStatement()

Слайд 21Example: Multiple Inheritance
A class can inherit from several other classes.
Use

multiple inheritance only when needed and
always with caution!
FlyingThing
Animal
Horse
Wolf
Bird
Helicopter
Airplane
Multiple Inheritance

Example: Multiple InheritanceA class can inherit from several other classes.Use multiple inheritance only when needed and always

Слайд 22What does a class diagram represent?
What benefits do packages provide

to the model?
Define association, aggregation, and generalization.
How do you find

associations?
What is multiplicity? What information does multiplicity provide the modeler?




Review

What does a class diagram represent?What benefits do packages provide to the model?Define association, aggregation, and generalization.How

Слайд 23Exercise
Given:
A set of classes and their relationships
Draw:
A class diagram

ExerciseGiven:A set of classes and their relationshipsDraw:A class diagram

Обратная связь

Если не удалось найти и скачать доклад-презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:

Email: Нажмите что бы посмотреть 

Что такое TheSlide.ru?

Это сайт презентации, докладов, проектов в PowerPoint. Здесь удобно  хранить и делиться своими презентациями с другими пользователями.


Для правообладателей

Яндекс.Метрика