- Software Engineering - - PowerPoint PPT Presentation

1 / 70
About This Presentation
Title:

- Software Engineering -

Description:

... Booch, OOSE(Object-Oriented Software Engineering) Shlare/Mellor, ... (state), (behavior), (identity) . – PowerPoint PPT presentation

Number of Views:128
Avg rating:3.0/5.0
Slides: 71
Provided by: DKE62
Category:

less

Transcript and Presenter's Notes

Title: - Software Engineering -


1


8? ???? ??
- Software Engineering -
2
?? ??
  • ? ???? ?????
  • ????? ??
  • ???? ?? ??
  • ???? ????
  • UML
  • ??? ??? ??

3
? ???? ?????
  • ????? ??
  • ???? ?? ??? ? ?? ??
  • ??? ??? ??
  • ??? ??
  • ???? ??
  • ?? ??
  • ??? ??
  • ????? ? ?? ??
  • ??? ? ????
  • ????? ??? ??? ?????
  • ??? ?? ??? ??? ??

4
? ???? ?????
  • ? ??? ??? ??? ???? ??? ??
  • ????? ???? ??? ???
  • ??? ??? ???? ??? ??? ???? ??? ? ??
  • ??? ??
  • ????? ???? ??? ? ?????? ?? ??
  • ??? ??
  • ??? ?? ??? ??? ?? ?? ???? ????? ??

5
???? ??
  • ? ???? ?????
  • ????? ??
  • ???? ?? ??
  • ???? ????
  • UML
  • ??? ??? ??

6
????? ??
  • ??? ???
  • ???? ??? ??? ?? ??? ??
  • ???? ???? ??? ??? ???? ??? ???
  • ?? ????? ?
  • ??? ??
  • openness, closeness? ? ?? ??? ??
  • ??(inheritance), ???(polymorphism)
  • Time to market
  • ??? ?????? ??? ?? ?? ??? ??
  • ???? ???? ??? ?? ?? ??? ??
  • ??? ????? ??
  • ?? ? ??? ??? ????? ??

7
???? ??
  • ? ???? ?????
  • ????? ??
  • ???? ?? ??
  • ???? ????
  • UML
  • ??? ??? ??

8
???? ???? ??
  • ??? ??
  • ????, ??? ???? ?
  • ?? ?? ??
  • ??? ?? ??? ??

9
????
  • ??? ????
  • ?????? ???? ??? ???
  • ???? ??
  • ??? ????? ???? ??? ???? ?? ?????? ???
  • ??? ??
  • ??? ??? ??? ???? ???? ?? ???
  • ???? ???? ???? ??
  • ?) ???? ???
  • ???? ????
  • ???? ??? ??? ?? ???? ??

10
???? ????
  • ??? ???? ?? ?? ???
  • ??(object)?? ?? ???? ???? ??
  • ??? ???? ????. ????
  • ??? ???? ???, ???
  • ??? ???? ????? ?? ??
  • ?? ????? ?? ??? ???? ??? ?? ??? ??

11
?? ??
???? ????
??? ????
12
? ?
  • ??? ??
  • ????? ??(??) ???? ??
  • ??? ??(state), ??(behavior), ???(identity)? ???.
  • ??
  • ???? ????? ???? ???? ???? ???? ???
  • ??(property)? ??
  • ??? ??(state)? ???
  • ??(behavior)? ??
  • ?? ??? ???? ?????? ???
  • ???? ???? ??? ??? ????? ? ?? ??
  • ??? ?? ???
  • ?? ????(instance) ??
  • ??? ??? ??? ??? ?? ???? ??

13
? ?
14
? ? ?(Class)
  • ???
  • ???? ?????? ???? ??
  • ?? ???? ??
  • ????
  • ????? ??
  • ????? ??(??)? ???
  • ??? ???? ???? ??
  • ???(class) vs ???? (instance)
  • ??? ??? ??(object type)
  • ???? ???? ??? ??? ??
  • ???? ??(attribute)
  • ? ?? ???
  • ?? ??, ??, ??, ?? ?? ?
  • ?? ??, ?? ??, ?? ?? ?

?????
??? ??
15
??? ?? ???
  • ???? ??
  • bankAccount(X)
  • BankAccount(o)
  • ??? ??
  • ????? ???? ??
  • ?/? Municipality(o), City(X)
  • ?? ??? ??? ??? ??
  • Bus ??, ????

16
? ? ?(Encapsulation)
  • ???? ??
  • ??? ??? ??? ??? ??
  • ?gt ?? ?? ???
  • ??? ??, ??, ?? ???
  • ?? ?? ??, ?? ??, ?? ?? ???
  • ???? ??
  • ????? ??? ??
  • ????(information hiding)
  • ??? ??? ?? ??, ??? ????
  • ??? ?? ?? ??
  • ?? public, private, protected

17
? ?(inheritance)
  • ??? ??
  • ?? ???? ??? ??? ?? ??
  • ?????(superclass), ?? ???(subclass)
  • ?gt?? ????? , ??? ?????
  • ???? (multiple inheritance)
  • ?? ??? ??????? ?? ??

18
? ?
  • ?? ???
  • ?? ???? ???? ??(feature)?? ??
  • ?? ??
  • ?? ???? ?? ??? ??? ??? ???
  • ??? ???? ???(generalization)? ???
  • ??(inheritance)
  • ?? ???? ??? ???? ?? ???? ????? ???? ?

19
?? ??? ?
  • ??(inheritance)
  • ?? ???? ??? ???? ?? ???? ????? ???? ?

20
Is-a ??
  • ???? ????? Is-a ??? ??????? ??
  • A saving account is an account.
  • (???? ??? ????? ????.)
  • A graduate student is a student.
  • (????? ??? ????.)
  • A school is a university.? ?????
  • Is-a ??? ??.
  • ???? ??? ????.? ??? ?

21
?????? ????
22
?? ??
  • ??? ?? ??? ???????? ??? ???? ??

23
? ? ?(polymorphism)
  • ??? ?? ?????? ?? ?? ????? ?? ???? ??? ? ?? ?????
    ??
  • ?? ??? ?? ?? ?? ?? ???? ??? ?
  • ?? ???? ????? ?? ?? ?? ??? ??? ?? ?
  • If-else? switch ??? ???? ??
  • ???? ??
  • ?? ??? ??? ?? (?? ??? ???? ? ??)
  • ?? ??? ???? ?? ?? or ??????? ??
  • ?gt getarea() ? ??? ??? ??? ??
  • ?????? ???? ??? ?????? ??
  • ?? ??? ???? ?? ?????
  • ????? ??? ?? ???? ???? ??

24
? ? ?(polymorphism)
  • ?? ??? ???? ?? ??? ???? ?? ??? ? ??

Polygon
Area
getarea()
Circle

getarea()
Rectangle

getarea()
???? ?
25
???
  • Polymorphism
  • Universal
  • ??? ??? ?? code? ??
  • ad hoc
  • ??? ??? ?? version? code? ??
  • Universal
  • parametric General function
  • inclusion subtype, inheritance
  • ad hoc
  • overloading (???? ???, ??? ???)
  • coercion 34.0 gt 34 ?? 3.04.0??
    ????(coercion)

26
???? ??
  • ? ???? ?????
  • ????? ??
  • ???? ?? ??
  • ???? ????
  • UML
  • ??? ??? ??

27
???? ????
  • ???? ????? ??
  • ???
  • ???? ?? ??? ??
  • ?? ?? ??, ??, ??, ???? ??
  • ?? ?? ?? ??? ??? ??, ??, ???, ?? ??
  • ??? ?? ???, ??? ?? ??? ?? ??
  • ??, ??, ??, ??? ??
  • ??? ??? ??
  • ???, ???, RUP(Rational Unified Process)?

28
???? ??
  • ???? ????
  • ???? ??? ??? ???? ???? ?? ??
  • ??????? ???
  • ????
  • ????? ???? ?? ??????? ??
  • ??????? ????
  • ????(??? ?? ??)
  • ??? ?? ?? ??? ??? ??
  • ???????, ???????? ???? ????? ??

29
???? ??
30
???? ??
  • ?? ??? ???? ??? ?? ?? ?? ??? ??? ???? ?? ??, ??
    ??? ????
  • ??
  • ?? ?? ??? ??? ?? ???? ??
  • ?? ?? ??? ??? ?? ??, ?? ??
  • ??? ?? ??
  • ??? ??? ??
  • ??? ?????, ??????, ?? ???? ?

31
???? ??
32
???? ??? ???
  • ????, ??? ?????? ???? ??
  • ???? ?? ???
  • ??? ???? ???? ??
  • ????? ? ?? ??? ? ??? ?? ???

?????
??? ??
33
RUP(Rational Unified Process)
  • RUP? ???? ?? ?? ??? ???? ??? ???? ?? ?
  • ? ???? ?? ??? ???? ??
  • ?? ? ?? ??? ???? ??
  • ? ????? ????, ??, ??, ??? ??(iteration)
  • ???, ??? ?? ???
  • ??? ?? (incremental and iterative )

??1
??2
??? V.1.0
??? V.2.0
34
RUP? ??? ??
  • RUP??? ??
  • ?? ???? ?? ???? ? ??? ? ??.
  • ?? ???? ???? ??? ?? ??? ???? ? ??.
  • ?? ???? ????? ??? ? ??? ? ??.
  • ???? ???? ??(?, UML)? ??? ? ??.
  • ?????? ??? ? ??? ? ??.

?? ???
??
??


??




?
?



?
?
????
?? ????
?? ???
???? ???
35
RUP? ??
  • RUP? ??
  • ????(inception) - ??, ???? ???, ??? ????? ????
    ??.? ????? ????, ??, ??, ??? ??(iteration)
  • ??(elaboration) - ??? ?????, ???? ????? ??? ?????
    ??? ?? ???? ??? ????. ??? ??? ???? ??? ???.
  • ??(construction) - ?? ?? ? ??? ??? ???? ??? ????.
  • ??(transition) - ???, ??, ?? ?? ?? ??

36
???? ??
  • ? ???? ?????
  • ????? ??
  • ???? ?? ??
  • ???? ????
  • UML
  • ??? ??? ??

37
4.1 UML???
  • UML??
  • 1980?? ??? 1990?? ?? ?????? ??? ?? ??? ??? ?? ??
  • ??? ?? ??? ???? ??? ??
  • Rumbaugh? Booch? 1994? ? ?? ??? ????? ?
  • Rational Software ?? ?? ??
  • OMT(Object Modeling Technique?, Booch,
    OOSE(Object-Oriented Software Engineering) ??? ??
  • Shlare/Mellor, Coad/Yourdon, Wirfs-Brock,
    Martin/Odell ??? ??
  • 1995? Jacobson? ?? ??
  • ?? ??? ??
  • 1997? Object Management Group(OMG)? UML ??? ??
  • ??? ??(modeling process)? ??? ??(modeling
    language)? ??
  • ??? ?? ?????? ???? ???? ????
  • ??? ?? ??? ??? ? ???? ??? ??
  • ??? ?? ???? ??
  • ?????? ?? ??, ??? ??? ?

38
UML??? OO ??
  • Shlaer? Mellor? ??? ??? ?? ??
  • Coad? Yourdon? ??? ????? ?? ??
  • Worfs-Brock ? ???? Smalltalk ??? ??? ?? ?? ?? ?
    CRC(Class-Responsibility-Collaboration) ?? ??
  • Rational Software? Booch? ??? Ada ?? ??
  • GE ???? Rumbaugh? ??? ?? ??? OMT
  • Odell? Martin? ????? ??? ? ??
  • Ericsson?? ?? Jacobson? use case ??? ??? ??

39
UML ?????
????? ?? ???? ?? ? ?
?? ??(use case) ????? ??? ?? ??? ???? ???? ??? ???
??? ????? ???? ???? ?? ??? ?? ??????? ???? ??? ??? ???
??? ????? ??? ???? ???? ??? ?? ???? ??? ??? ??
40
UML ?????
????? ?? ???? ?? ? ?
??(sequence) ????? ??? ??? ??? ??? ??? ??? ?? ???
?? ????? ?? ?????? ?? ??? ????? ??? ???? ???
?? ????? ?? ??? ?? ???? ?? ?? ??? ???. ?? ???? ??? ???? ??? ????? ??? ???
41
UML ?????
????? ?? ???? ?? ? ?
????(activity) ????? ???? ???? ???? ??? ??? ?? ???? ?? ??? ???
???? ????? ????? ??, ?? ?? ????, ? ?? ?????, ?? ?? ?? ??? ???
?? ????? ??, ????, ??? ? ???? ??? ?? ??? ???
42
UML ??
  • ??? ??(semantic) ??
  • ?? ????
  • ?? ??? ??
  • Object Constraint Language(OCL)
  • UML? ???
  • ????? ?? ??? ???? ??
  • ???? ??

43
UML(Unified Modeling Language)
  • ??? ?? ??
  • ??? ??(functional model) - ??? ???? ? ??? ???
    ???? UML??? ???? ??????? ??.
  • ?? ??(object model) - ??, ??, ?? ??, ?????? ???
    ???? ??? ???? UML??? ??? ??????? ????.
  • ?? ??(dynamic model) - ???? ?? ??? ????. UML???
    ?? ?????, ?? ?????, ???? ??????? ????. ?? ??????
    ??? ??? ??? ??? ???? ?? ?? ?????? ??? ??? ?? ? ??
    ??? ??? ??? ??? ??? ????.
  • UML? ?????
  • ????, ???, ??, ??, ???? ?????

44
???, ??, ????? ??
  • ??? ?? ? ??? ????
  • ? ??? ?? , ?? ??? ?? , ?? ?????
  • ??? ???? ?? ??? ???? ??? ??? ?? ?? ?? ??? ????
    ???? ??
  • ?? ???? ?? ??
  • public? ??, ?? ?? ??
  • - private? ??, ?? ?? ???
  • ??? ?????? ????? ?? ??
  • ?? ??? ?? ?????
  • ??? ?? abstract ??
  • ???? ??
  • ltlt gtgt? ??

Employee
Name char ..
promote (from,to) ..
45
4.2 ???? ?????
  • ??
  • ???? ??? ??? ??? ??? ???? ??? ?? ??? ????? ?
    (UML user guide)
  • ??
  • ???? ?? ??? ???, ???? ??? ???? ??
  • ????? ???? ??? ??? ???? ??? ??? ??? ???? ???
  • ?? ??? ???? ??? ???? ??? ?? ?
  • ?? ??? ????? ? ?
  • ???? ???? ??? ???? ???? ?? ????
  • ???? ???
  • ???? ???
  • ????? ?? ??, ???? ??? ??? ??

46
????
  • ????? ????? ??? ???? ??? ? ??? ????? ?
  • ???? ????? ????? ???
  • ???? ???? ??? ??
  • ????? ?? ??? ????? ??? ????? ????? ?
  • ??? ???? ???? ?? ???? ????? ?

47
???? ?????
  • ????
  • ????(use case) ???? ??? ???? ??, ????
  • ??(actor) ???? ?????? ?? ???(???? ?? ???,
    ????), ??? ?? ??
  • ?? ??? ????? ??? ??
  • ??
  • ???? ??? ??
  • ???? ??
  • ???? ??, ??? ??

??
??
????
48
???? ????? ?
Video Store
Rent Video
Return Video
Store Manager
User
Add Video
49
???? ?????? ??
  • ????(include)
  • ???? ??
  • ?? ?????, ltltincludegtgt
  • ????(extend)
  • ?? ????? ???? ??? ???? ??? ?? ?? ????? ?? ?
  • ?? ????? ?? ????? ??? ?
  • ???? ??
  • ?? ?????, ltltextendgtgt
  • ????? ????? ???
  • ????? ????? ? ???

Edit Customer Profile
ltltextendgtgt
Parental Authorization
50
????? ??
  • ???? ??? ???? ??? ?
  • ?? ??? ?????? ???
  • ??? ???? ????? ?? ?
  • ??????? ????? ??? ?
  • ??? ??? ????? ??? ? ??

51
??? ?????
  • ??
  • ???? ???? ???? ??? ???
  • ???? ?? ??? ???? ??? ? ?
  • ??
  • ???? ??? ? ?? ???? ????
  • ??? ??? ??? ???
  • ????
  • ??, ???, ??, ?????, ????
  • ??
  • ??? ?????? ???? ????? ??(??? ??)? ???

52
??? ????? ?
ViedoSroreSystem

rent(videoId)
1
1
1
has
Inventory

rent(videoId,rental)

Customer
name address
changeAdd(address)
1
1
exist
Rental
date
add(videoTitle, price)

has
rent
Video
Title Charge category
rent(rental)
1


Adult
Child
53
??? ?????? ??
  • ????(association)
  • ??? ??? ??, ??? ???(??? ??)
  • ??(role)
  • ???? ?? ?? ?? ??? ??(has, exist, rent)
  • ???(multiplicity)
  • ??? ??, ??? ??? ?? , ? ??(many)? ??

54
??? ?????? ??
  • ???? ??(aggregation)
  • ?? ??? ??? Directory
  • ?? ??? ??? File
  • ?? ?? ??? ??, ?????? ??
  • ???
  • ???? ??? ???? ? ???? ??? ??? ??? ??
  • ????? ?????? ???? ??? ?? ????
  • ???? ???? ?

0

Directory
File
55
?? ?????
  • ??
  • ??? ??? ????? ???? ??? ??? ???
  • ??
  • ????(participating object)? ??? ???? ???
  • ????? ???? ????? ??
  • ????
  • ??(??),??,???(???? ???),???(??? ??)
  • ??
  • ???? ??? ? ?????? ????? ?? ?
  • ??? ??? ?? ??
  • ????? ??? ??? ????

56
?? ????? ?
VideoStoreSystem
Customer
Inventory
Video
rent(videoID)
Get CustomerID
ID
Get delay charge
delay charge
collect chrge
\
create
Rental
rent(videoID rental)
rent(rental)
OK
add(title,price)
57
?? ?????
  • ??
  • ??? ?? ?? ??? ?? ??? ??? ??
  • ??? ??? ???? ??
  • ??
  • ?? ??? ??? ???
  • ??? ?? ??? ???? ?? ????? ??
  • ??? ??? ??? ??
  • ????
  • ? - ??? ?? , ??? ??(transition)
  • ??
  • ?? ??? ??? ???? ?? ??? ?? ??? ??
  • ??? ??? ???

58
?? ????? ?
scan()
rent(videoId,rental)
rent(videoId,rental)
Returned(videoId)
reserve(videoId)
59
???? ?????
  • ????
  • ????? ???? ??(?????? ??)
  • ???? ???
  • ???? ?????
  • ???? ????? ??? ?
  • ?? ??? ?? ?????
  • ????? ?? ??? ????
  • ????
  • ? ????
  • ??? ????(?? ????? ??)
  • ?? ?? ???? ???
  • ????? ????
  • ??, ??
  • ????
  • ????, ????? ??? ??? ???? ??

60
???? ????? ?
61
???? ??
  • ? ???? ?????
  • ????? ??
  • ???? ?? ??
  • ???? ????
  • UML
  • ??? ??? ??

62
??? ??? ??
  • ???? ???? ??
  • ??(association)
  • ?? ??(whole/part)
  • ??(inheritance)
  • ??(use)
  • ????? ??? ????? ??

63
????
  • ??? ??? ???? ???? ??
  • ???? ???? ??

Has a
Mother
Child
1

Class Mother . private Child
theKids new Child20 public
addChild(Child ch) ?? theKids? Child? ?? ?????
?? ??? ??? Child? ?? ??
Class Child . private Mother mom
public setMom(mom) ?? mom? mother??? ????
? Mom? ????? ????? ???
64
????
  • ???? ?? ??
  • ?????(navigability) ??
  • ?????? ??? ???
  • ????? ??? ???
  • ?? ??
  • ??? ??? theKids?
  • ??? ?? ? ??
  • ?? theKids? private? ???? ????? ?????
  • ??? ?? ?? ?????(Mother)? ??? ?? ? ??.

Mother theMom new Mother() Child jim new
Child() Child jennifer new Child() theMom.addChi
ld(jim) theMom.addChild(jennifer) Jim.setMom(the
Mom) Jinnifer.setMom(theMom)
65
???? ??-????
  • ??????
  • ????(composition), ????(aggregation)
  • ????
  • ?? ?? ?? ???? ??(???4?? ??1?? ??)
  • ????? ???? ?? ??? ??? ??
  • ??? ,????? ??, ???? ?? ??
  • ??? has, comprise, consist of? ??
  • ????? ??
  • ????? ?? ??? ??? ? ??
  • ????? ??? ??? ????? ?? ????
  • ????? ??? ????? ?? ??
  • UML?? ?? ?????

66
???? ??-????
  • ????
  • ?gt ?? ??? ??, ?/?? ?/?? ??
  • ???? ??? ??
  • ?? ??? ?????? ????? ?? ? ??
  • ????? ??
  • ????? ?? ??? ??? ? ??
  • ????? ?? ??? ????? ?? ????
  • ????? ??? ????? ?? ??
  • UML?? ? ?????

67
???? ?? UML
68
????
  • ????( ??? ??)
  • ??? ??? ???? ? ??? ???? ??
  • A kid of? ??
  • ??
  • ???? ??? ??? ???
  • ???? ??? ???(derived) ???
  • UML?? ??????? ????? ???
  • ??? ???? ??? ??? ????
  • ????, ????
  • ???? ??? ??? ???? ???
  • ???? ?? ??? ??? ???? ???

Box


WeightedBox


69
????
  • ????
  • ? ???? ?? ???? ?? ??? ??? ?
  • ??
  • ???? ?? ??
  • ??? ??
  • ??? ??
  • ?????? ????? ?? ???? ???? ???
  • ?? ??
  • ?gtCourseSchedule???? add? remove ?????? ??
  • Course ???? ????? ????
  • UML?? ?? ???

CourseSchedule

Add(c Course) Remove(c Cpurse)
Course
70
??? ??
???? ???? ?? ???? ????
?? ??? ??? ???? ??? ?? ?? ??? ?? ?? ?? ???, ??? ?? ? ????? ?? ??? ??? ???? ??
???? ??? ??? ????? ??? ???? ??? ?? ??? ??? ????? ??? ??? ???? ??? ?? ?? ???? ?? ? ?? ??? ?????? ?? ???? ??? ??? ?? ??
?? ??? ??? ?? ???? ??? ??, ???? ??? ???? ?? ?? ??? ?? ????? ???? ??? ??, ???? ??? ???? ?? ?? ??? ??, java? ?? ?????? ?????? ?? ????? ??? ???? ?? ???? ?? ????? ????? ??
UML
Write a Comment
User Comments (0)
About PowerShow.com