COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science
COP 3331: Object Oriented Software Engineering w What is Software Engineering (SE)? Involves more than just coding w Problem Definition w Problem Analysis w High level system design (including hardware!) w Design of classes/objects w Implementation w Testing w Maintenance
Modeling! w Modeling is a nice way to abstract and simplify some of the activities in software engineering w There are many modeling notations w UML - Unified Modeling Language A nice way of representing things with diagrams Different types of diagrams for use with different stages of software engineering Works well with OOP.
UML First Pass: Use Case Diagrams WatchUserWatchRepairPerson ReadTime SetTime ChangeBattery Actor Use case Package SimpleWatch Use case diagrams represent the functionality of the system from user’s point of view
UML First Pass: Class Diagrams Battery load() 1 2 Time now() PushButton state push() release() blinkIdx blinkSeconds() blinkMinutes() blinkHours() stopBlinking() referesh() LCDDisplay SimpleWatch Class Association Multiplicity Attributes Operations Class diagrams represent the structure of the system
UML First Pass: Sequence Diagram Object Message Sequence diagrams represent the behavior as interactions blinkHours() blinkMinutes() incrementMinutes() refresh() commitNewTime() stopBlinking() pressButton1() pressButton2() pressButtons1And2() pressButton1() :WatchUser :Time:LCDDisplay:SimpleWatch Activation
button1&2Pressed button1Pressed button2Pressed button1Pressed button1&2Pressed Increment Minutes Increment Hours Blink Hours Blink Seconds Blink Minutes Increment Seconds Stop Blinking UML First Pass: Statechart Diagrams StateInitial state Final state Transition Event
Other SE issues w Requirements Elicitation and Analysis w Communication w Management Issues w Testing and Quality Assurance w Design Patterns w This is the stuff you will have to deal with in the real world, if you work for a company doing software development.