Object-Oriented Software Engineering CS288 Paul Krause
Lecture 1 - Object-Orientation & UML Contents Overview Classifiers Static Modelling Dynamic Behaviour Summing Up
Unified Modelling Language Visual modelling language Specify Specify Visualise Visualise Construct Construct Document Document UML can be used to capture information about: Static structure Static structure Dynamic behaviour Dynamic behaviour Environmental aspects Environmental aspects Organisational aspects Organisational aspects
Overview height: Real age: Real Person Male_PersonFemale_Person Static View
Overview Locked Available Sold timed out lock unlock buy Behavioural View: Single Object
Overview customercredit servicevendor request item show availability select item demand payment insert card charge card Dynamic behaviour: communication patterns
Overview CreditCardCharges ItemSeller ManagerInterface ItemDB SalesServer CustomerInterface Client ServiceInterface SalesTerminal 1 * 1 * Deployment View
Lecture 2 - Object-Orientation & UML Contents Overview Classifiers Static Modelling Dynamic Behaviour Summing Up
Classifiers ClassifierFunctionNotation actor An outside user of the system class A concept from the modelled system component A physical piece of the system data type A descriptor of a set of primitive values that lack identity Name node A computational resource subsystem A package that is treated as a unit with a specification, implementation and identity use case A specification of the behaviour of an entity in its interaction with outside agents Name >
Lecture 2 - Object-Orientation & UML Contents Overview Classifiers Static Modelling Dynamic Behaviour Summing Up
Class Tuner class name Channel Frequency attributes Get_Frequency Set_Frequency operations
Inheritance Hierarchy Tuner A/V TunerFM Tuner
Aggregation Surf List Surf List Size Add Surf Channel Delete Surf Channel Set Surf Channel Source ID Preset Number Preset Name Edit Preset Number Edit Preset Name 0..*
Association Tuner Surf List 1 1
Putting it all together A/V Source Front EndExternal Source Surf List Source ID 0..* 1 1 Tuner 1..* is tuned to
Lecture 1 - Object-Orientation & UML Contents Overview Classifiers Static Modelling Dynamic Behaviour Summing Up
State A condition or situation during the life of an object during which it satisfies some condition, performs some action, or waits for some event. The Unified Modelling Reference Manual The Unified Modelling Reference Manual
Representation of a State Help entry/ display help screen exit / remove help screen
Events trigger Transitions Closed DownIdle startup closedown Top-level Statechart for ATM Control
Full Label for a Transition StateAStateB e1 [cond] / action1;action2 event name guard condition actions
More ATM Control Closed Down Idle Entry / display Welcome startupclosedown Processing Customer Input card inserted / get pin validation received [invalid card] / confiscate Terminating Transaction Processing Transaction withdrawal selected [valid card] / display wait
Use Cases ATM Customer Validate PIN > Withdraw Cash Query Account Order Statement Operator Add Cash Startup Shutdown
Sequence Chart ATM Customer ATM CardATM Control Customer Interface Bank Server Card Inserted Get Pin PIN Prompt PIN Input Card Request Card Data PIN Entered Validate PIN
Lecture 1 - Object-Orientation & UML Contents Overview Classifiers Static Modelling Dynamic Behaviour Summing Up
Summing Up UML is a visual modelling language that covers a range of aspects of systems analysis and design We have seen examples of modelling static structure and dynamic behaviour Environmental and Organisational aspects can be covered too ______________ Use it!