版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
WhatisObject-Oriented?
?Objectorientationisanapproachto
softwaredevelopmentthatorganizesboth
theproblemanditssolutionasacollection
ofdiscreteobjects;
?Itisakindofrepresentationthatdescribe
object'sdatastructureandbehavior.
?Itisakindofmodelingtechnology.
Characteristicsof00Representation
?Identity-name,reference,handle
?Abstraction
?Classification
?Encapsulation
?Inheritance
?Polymorphism
?Persistence
The00DevelopmentProcess
?Beconsistencyofterminologyandof
-Theproblemandthesolutionweredescribedin
sameterms:classes,objectsmethods,attributes,and
behaviors.
?Beconsistencyofperspective
-Staticviews
-Dynamicviews
-Restrictions
TendencyforChangewhenUsing00Paradigm
(Jacobsonetal.1995)
Characteristicofsoftwareproduct/projectProbabilityforchange
ObjectsderivedfromtheapplicationLow
Long-livedinformationstructuresLow
Passiveobject5sattributeMedium
SequencesofbehaviorMedium
InterfacewiththeoutsideworldHigh
FunctionalityHigh
OORequirements
?OOrequirementsanalysisisusuallydoneintheuser's
language.
?OOrequirementsanalysisdiscussestheconceptsand
scenarioslikelyinapplicationdomain.
-Theconceptsincludeinformation,service,and
responsibilities.
-Domainknowledgeenablesbothdevelopersandusersto
understandtheproblems.
?Therequirementsdefinitioncanbeindependentof
implement.
00Design
?Requirementspecification,thefirststepsofdesign.
?Torepresentasystemdesign
-First,toidentifyandrepresentclassesandobjects.
-Second,toidentifytheinteractionsandrelationships
amongobjectsandclasses.
?Associations
?Compositions
?Aggregations
?Inheritance
?Toprovidethedetailsinprogramdesign.
-Insertcomputationalfeaturesinthemodels
-Insertsomeclasslibrarydetails
-Considernonfunctionalrequirements
UseCases(用例)
?Describeparticularfunctionalitytoexhibithow
auser,externalsystem,andotherentitydialog
withthesystem.
?Scenario場(chǎng)景
?Script腳本
Usecasediagrams(用例圖)
?Actor(角色)
-Aentityinteractingwiththesystem
-Orarolethatanentityplayswithrespectofthesystem
,User
?Device
,Anothersystem
?Cases(用例)
-Adepictionofsomeaspectoffunctionality
?Extensions
-Toextendausecasetoillustrateadifferentordeeper
perspective.
?Uses
-Actuallyareuseofanalready-definedusecase
Overviewofroyalservicestation
Aactoro
Standfbracase
(Billing^)
Customer\
\
(^^efiielmg^)(^^arking^JMaintenance
Firstextensiontoincludepreventivemaintenance
Secondextensiontoincludecreditcardsystem
Thirdextensiontoincludeinventoryandaccounting
FuelOrderingPartsOrdering
systemsystem
UseUMLtoRepresent00
?OMG(ObjectManagementGroup)haveadopted
UMLasthe00notationalstandard.
?UMLcanbeusedtovisualize,specify,or
documentaproblem.
?UMLcanbeusedthroughoutthesoftware
developmentprocess.
UMLdiagrams
?Staticviewisdepictedwith
-Usecases(用例圖)
-Classdiagrams(類圖)
-Packagediagrams(包圖)
-Deploymentdiagrams(酉己置圖)
?Dynamicviewisdepictedwith
-Statediagrams(狀態(tài)圖)
-Activitydiagrams(活動(dòng)圖)
-Sequencediagrams(順序圖)
-Collaborationdiagrams(合作圖)
?Restrictionsandformalization
-BeexpressedwithOCL(objectconstraintlanguage)
00SystemDesign
?Fivelevelsof00design
-Identifysubjects
-Identifyclassesandobjects
-Identifyattributes
-Identifystructures
-Identifyservices
Determinecandidateclasses
?Somequestionscanhelpustogroupthe
candidateclassesandobjects.
-Whatneedstobe"processed“insomeway?
-Whatitemshavemultipleattributes?
-Whendoyouhavemorethanoneobjectinaclass?
-Whatisbasedontherequirementthemselves,not
derivedfromyourunderstandingofthe
requirements?
-Whatattributesandoperationsarealwaysapplicable
toaclassorobject?
RelatedRequirementStatements
Acustomerhastheoptiontobebilledautomaticallyatthetimeof
purchase(offuel,maintenance,orparking)ortobesentamonthly
paperbill.Ineithercase,customerscanpayusingcash,creditcard,
orpersonalcheck.RoyalServiceStationfuelissoldaccordingto
pricepergallon,dependingonwhetherthefuelisdiesel,regular,or
premium.Serviceispricedaccordingtothecostofpartsandlabor.
Parkingissoldaccordingtodaily,weekly,andmonthlyrates.The
pricesfbrfuel,maintenanceservices,parts,andparkingmayvary;
onlyManny,thestationmanager,canenterorchangeprices.Athis
discretion,Mannymaydesignateadiscountonpurchasefbra
particularcustomer;thisdiscountmayvaryfromonecustomerto
another.A5%localsalestaxapplestoallpurchase.
TentativeclassesofRoyalServiceStation
?Personalcheck?Services
?Paperbill?Discounts
?Creditcard?Tax
?Customer?Parking
?Stationmanager?Maintenance
?Purchase?Cash
?Fuel?Prices
FirstGroupingofAttributesandClasses:Stepl
ClassesAttributes
CustomerPersonalcheck
MaintenanceTax
ServicesPrice
ParkingCash
FuelCreditcard
PaperbillDiscounts
Purchase
Stationmanager
RelatedRequirementStatements
Thesystemappliesonlytoregularrepeat
customers.Aregularrepeatcustomermeansa
customersidentifiedbyname,addressandbirth-
datewhousesthestation'sserviceatleastonce
permonthfbratleastsixmonths.
Thesystemwillsendperiodicmessagesto
customers,remindingthemwhentheirvehicles
areduefbrmaintenance.Normally,maintenance
isneededeverysixmouths.
FirstGroupingofAttributesandClasses:Step2
ClassesAttributes
CustomerPersonalcheck
MaintenanceTax
ServicesPrice
ParkingCash
FuelCreditcard
PaperbillDiscounts
PurchaseBirthdate
PeriodicmessageName
StationmanagerAddress
Forthefullsetofrequirements,we
mightexpandourtabletoinclude
alloftheclasses.
FirstGroupingofAttributesandClasses:Step3
ClassesAttributes
Customer
MaintenancePersonalcheck
ServicesTax
Parking
FuelPrice
Paperbill
PurchaseCash
Periodicmessage
StationmanagerCreditcard
Warningletter
PartsDiscounts
Accounts
InventoryBirthdate
CreditcardsystemName
Part-orderingsystem
Fuel-orderingsystemAddress
IdentifyBehavior
?Lookfbrparticularitemsthatsuggestbehaviors:
(Extractverbsfromtherequirementsstatement)
-Imperativeverbs
-Passiveverbs
-Actions
-Thingsorremindedevents
-Roles
-Operatingprocedures
-Serviceprovidedbyanorganization
?Thebehaviorswillbecomeactionsor
responsibilities.
UseUMLtodescribetherelationship
amongtheobject,classes,andbehaviors
bill
Issuedate:Date
Paymentdate:Date
Price()
Taxes()
Customers()
Purchase()
Add_to_bill(customer,amount,date)
Inheritance
Fourkindsofrelationship
?Generalization
?Aggregation
?Association
?composition
UMLnotations
association
composition
aggregation
dependency
navigation
Associationofclasses
Qualifiedassociation
Qualifiedassociation
SwayBackandForth
?AbstractaMessageClassfromwarningletterand
periodicmessage.
?Thefuelclassshouldbeconnectedtoinventoryclass
?Deletetheaccountclass(hasonlyoneattribute)andadd
theaccountnumbertothecustomerclass.
?Addthreenewclass,refuel,parkingspace,service.
-Fortakingadvantageofthepolymorphism
?Thepriceanddiscountcanbedifferentdependingonwhatserviceis
required.
-Removethediscountratefromthefuelclassandputitinthe
partclass.
-Removethepricefromthefuelclassandaddittotherefuel
class.
-Putthepriceofaparkingspace,locationintheparkingclass.
CustomerPeriodic
Messages
nameWarningletter
Address
Birthdatetexttext
Purchase
dateBillStation
CreditCardManager
systemtaxrateissuedate
Paymentdate
Services
ParkingSpacepriceVehicleMaintenance
locationdiscountrateissuedate
Paymentdate
Refuel
Part
gallons£7Inventory?
ocationricepartnumber
price
Price
ParksFueldiscountrate
FuelOrderingOrdering
min_quantity=l00systemsystem
Currentquantity
SwayBackandForth
?DeleteStationManagerclass
?Addservicestationtohandlethetrackingof
dormantaccounts
OtherUMLDiagrams
?Classdescriptiontemplate
?Packagediagrams
?Sequencediagrams
?Collaborationdiagrams
?Statediagrams
?Activitydiagrams
Classdescriptiontemplate
?Templatetellus
-thepositionoftheclassintheoverallhierarchy
-exportcontrols
-cardinality
-associations
?Templatealsospecifies
-theoperationsintheclass
-thepublicinterfacetotheclass
Templatefbrtherefuelclass
Classname:refuelPublicinterface:
Category:serviceOperation:
Externaldocuments:price
Exportcontrol:PublicPrivateinterface:
Cardinality:nAttributes:
Hierarchy:Gallons
Super-classes:servicesprice
Associations:Implementation:
Operationname:priceAttributes:
Publicmemberof:refuelGallons
Documentation:price
Preconditions:Statemachine:no
Gallons>0
Objectdiagram:unspecifiedConcurrency:sequential
Semantics:Persistence:transient
final_price=gallons*price
Concurrency:sequential
Packagediagrams
Standfor
dependent
Interactiondiagrams
?Todescribehowoperationsandbehaviors
arehandledbyobjects.
?Todescribehowtheobjectsareconnected
statically.
?Basedoneachusecase
?Twokindsofinteractiondiagrams
-Sequencediagrams
-Collaborationdiagrams
Sequencediagramfbrtherefuelusecase
CustomerServiceStationCreditCardPurchaseRefuel
System
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度白酒白酒回購(gòu)市場(chǎng)拓展合同模板3篇
- 2025版建筑工程專業(yè)論文模板及法律法規(guī)參考合同3篇
- 2024年版本:趙某的技術(shù)服務(wù)合同
- 課題申報(bào)書:當(dāng)代海外民族音樂學(xué)家中國(guó)音樂研究的再研究
- 2024年集體倉(cāng)儲(chǔ)設(shè)施共建合同
- 2025版臨時(shí)租車協(xié)議包含車輛租賃及道路救援服務(wù)合同3篇
- 2025版文化創(chuàng)意產(chǎn)業(yè)年薪制與知識(shí)產(chǎn)權(quán)保護(hù)合同2篇
- 2025版金融理財(cái)產(chǎn)品銷售代理合同6篇
- 2024年餐飲經(jīng)營(yíng)承包合同樣本版B版
- 2024年版合伙人項(xiàng)目管理合作合同模板版
- 旅行社公司章程53410
- 小學(xué)班主任工作總結(jié)PPT
- 起世經(jīng)白話解-
- 螺桿式制冷壓縮機(jī)操作規(guī)程完整
- 頜下腺囊腫摘除手術(shù)
- 五金件成品檢驗(yàn)報(bào)告
- CDN基礎(chǔ)介紹PPT課件
- SPC八大控制圖自動(dòng)生成器v1.01
- 復(fù)晶砂、粉在硅溶膠精密鑄造面層制殼中的應(yīng)用
- 實(shí)驗(yàn)室設(shè)備和分析儀器的確認(rèn)和驗(yàn)證
- 銻雜廢料的回收應(yīng)用項(xiàng)目建議
評(píng)論
0/150
提交評(píng)論