Без темы
<<  UK Trade Investment Automotive Investment Organisation UNIVERSAL SERVICE – GLOBAL BACKGROUND, SCOPE AND BEST PRACTICES  >>
UML and Classes, Objects and Relationships [2]
UML and Classes, Objects and Relationships [2]
Agenda
Agenda
Association - Multiplicity
Association - Multiplicity
Notes
Notes
Notes
Notes
Association - Self
Association - Self
Association - Self
Association - Self
Association - Multiplicity
Association - Multiplicity
Class Relationships
Class Relationships
Generalization (Inheritance)
Generalization (Inheritance)
Generalization (Inheritance) e.g
Generalization (Inheritance) e.g
Inheritance - Implementation
Inheritance - Implementation
Abstract Class
Abstract Class
Abstract Methods (Operations)
Abstract Methods (Operations)
Abstract class and method Implementation
Abstract class and method Implementation
Class Relationships
Class Relationships
Realization- Interface
Realization- Interface
Realization - Implementation
Realization - Implementation
Class Relationships
Class Relationships
Dependency
Dependency
Dependency cont
Dependency cont
Class Diagrams
Class Diagrams
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram - Example
Class Diagram Example
Class Diagram Example
Object Diagram
Object Diagram
Object Diagram - Example
Object Diagram - Example
Summary
Summary

Презентация на тему: «UML and Classes, Objects and Relationships». Автор: Rajkumar Buyya. Файл: «UML and Classes, Objects and Relationships.ppt». Размер zip-архива: 70 КБ.

UML and Classes, Objects and Relationships

содержание презентации «UML and Classes, Objects and Relationships.ppt»
СлайдТекст
1 UML and Classes, Objects and Relationships [2]

UML and Classes, Objects and Relationships [2]

Defining Domain Models Using Class Diagrams

1

2 Agenda

Agenda

Class Relationships and UML Notations Association - DONE Generalization Realization Dependency Class Diagram Object Diagram Summary

2

3 Association - Multiplicity

Association - Multiplicity

Student

Course

A Student can take many Courses and many Students can be enrolled in one Course.

takes

*

*

254: Course

Alice: Student

253: Course

Jill: Student

3

4 Notes

Notes

One class can be relate to another in a One-to-one One-to-many One-to-one or more One-to-zero or one One-to-a bounded interval (one-to-two through twenty) One-to-exactly n One-to-a set of choices (one-to-five or eight)

4

5 Notes

Notes

Multiplicity can be expressed as, Exactly one - 1 Zero or one - 0..1 Many - 0..* or * One or more - 1..* Exact Number - e.g. 3..4 or 6 Or a complex relationship – e.g. 0..1, 3..4, 6..* would mean any number of objects other than 2 or 5

5

6 Association - Self

Association - Self

An association that connects a class to itself is called a self association.

6

7 Association - Self

Association - Self

Employee

A Company has Employees. A single manager is responsible for up to 10 workers.

manager

Responsible for

worker

1

0..10

7

8 Association - Multiplicity

Association - Multiplicity

Team

Player

A cricket team has 11 players. One of them is the captain. A player can play only for one Team. The captain leads the team members.

member of

1

11

Captain

Team Member

1

0..1

10

Captain

1

Leads

8

9 Class Relationships

Class Relationships

Association Generalization Realization Dependency

9

10 Generalization (Inheritance)

Generalization (Inheritance)

Child class is a special case of the parent class

SuperClass

SubClass1

SubClass2

10

11 Generalization (Inheritance) e.g

Generalization (Inheritance) e.g

Circle

GraphicCircle

11

12 Inheritance - Implementation

Inheritance - Implementation

public class Circle { } public class GraphicCircle extends Circle { }

12

13 Abstract Class

Abstract Class

13

14 Abstract Methods (Operations)

Abstract Methods (Operations)

Shape

Circle

Rectangle

draw()

draw()

draw()

14

15 Abstract class and method Implementation

Abstract class and method Implementation

public abstract class Shape { public abstract draw(); //declare without implementation ……… } public class Circle { public draw(){ ……. } ….. }

15

16 Class Relationships

Class Relationships

Association Generalization Realization Dependency

16

17 Realization- Interface

Realization- Interface

Interface is a set of operation the class carries out

OR

17

18 Realization - Implementation

Realization - Implementation

public interface TypeWriter { void keyStroke() } public class KeyBoard implements TypeWriter { public void keyStroke(){ ……… } }

18

19 Class Relationships

Class Relationships

Association Generalization Realization Dependency

19

20 Dependency

Dependency

Change in specification of one class can change the other class. This can happen when one class is using another class.

Circle

Point

Move(p:Point)

20

21 Dependency cont

Dependency cont

Dependency relationship can be used to show relationships between classes and objects.

circleA:Circle

Circle

circleB:Circle

<<instanceOf>>

<<instanceOf>>

21

22 Class Diagrams

Class Diagrams

The UML class diagram consists of several Classes, connected with Relationships.

22

23 Class Diagram - Example

Class Diagram - Example

Draw a class diagram for a information modeling system for a school. School has one or more Departments. Department offers one or more Subjects. A particular subject will be offered by only one department. Department has instructors and instructors can work for one or more departments. Student can enrol in upto 5 subjects in a School. Instructors can teach upto 3 subjects. The same subject can be taught by different instructors. Students can be enrolled in more than one school.

23

24 Class Diagram - Example

Class Diagram - Example

School has one or more Departments.

Department offers one or more Subjects. A particular subject will be offered by only one department.

24

25 Class Diagram - Example

Class Diagram - Example

Department has Instructors and instructors can work for one or more departments.

Student can enrol in upto 5 Subjects.

25

26 Class Diagram - Example

Class Diagram - Example

Instructors can teach up to 3 subjects. The same subject can be taught by different instructors.

26

27 Class Diagram - Example

Class Diagram - Example

Students can be enrolled in more than one school.

27

28 Class Diagram Example

Class Diagram Example

1…*

has

1

offeres

assignedTo

member

1..*

attends

teaches

1

1..*

1..*

1..*

*

*

1..5

1..*

1..3

28

29 Object Diagram

Object Diagram

Object Diagram shows the relationship between objects. Unlike classes objects have a state.

29

30 Object Diagram - Example

Object Diagram - Example

c1: Company

d1: Department

d2: Department

name=“Sales”

name=”CSSE”

manager

employee

p2: Person

p1: Persont

name=“Raj”

name=“Rao”

30

31 Summary

Summary

We have discussed the following concepts and UML notations related: Association Generalization Realization Dependency How to create a Class Diagram that contains all the above relationships Object Diagram for Uni.Dept.system.

31

«UML and Classes, Objects and Relationships»
http://900igr.net/prezentacija/anglijskij-jazyk/uml-and-classes-objects-and-relationships-104368.html
cсылка на страницу

Без темы

661 презентация
Урок

Английский язык

29 тем
Слайды