290 likes | 420 Views
Software Specification KXA233 Lecture 7 Introduction to Object Oriented Analysis Ch 19. Paul Crowther School of Computing University of Tasmania. Today. Introduction to Object Oriented Methodologies Objects from the analyst view. Planning. Risk Analysis. User Communication.
E N D
Software SpecificationKXA233Lecture 7Introduction to Object Oriented AnalysisCh 19 Paul Crowther School of Computing University of Tasmania
Today... • Introduction to Object Oriented Methodologies • Objects from the analyst view
Planning Risk Analysis User Communication Specification (Engineering) User Evaluation Spiral Model Construction and Release
Spiral Model • Model can be adapted to apply throughout a products lifecycle • Entry points on the axis between user communication and user evaluation • Concept Development • New Project Development • Product Enhancement • Product Maintenance
Component Assembly Model • Object oriented • Incorporates spiral model features • Composes applications from pre-packaged software components (classes) • Components are built if they are not available
Component Assembly Model Identify candidate components Look up components in library Extract components if available Construct nth iteration of system Put new components in library Build components if unavailable
Build Components If Unavailable • OO analysis • OO design • OO programming • OO testing
Concepts • Chair - An instance (or member ) of class furniture (the chair is an object) • All furniture has a cost, size, weight, location and colour. These are attributes • Chair may also have a varying number of legs • We can move, buy, sell and paint furniture. These are operations we can carry out • The class chair encapsulates the attributes and operations meaning it can be reused
Object Oriented = Objects + Inheritance + Communication
Class Name Operations Attributes Attributes Operations Concepts - Classes and Objects Superclass can be divided into Subclasses - Class Hierarchy Instances of the Class
Concepts - Attributes • Attached to classes and objects and describe the class or object • In most cases a set of specific values • Could use probability of occurrence in some domains
Concepts - Operations, Methods or Services • Algorithms that process the attributes (encapsulated data) • Each operation provides a representation of the behaviour of the object • The operation may also imply an external stimulus. For example get size (of the object Chair) • May also trigger another object in a chain
Concepts - Messages • Means by which objects interact • Sender object: • message: [destination, operation, parameters] • Messaging ties an object-oriented system together
Concepts - Encapsulation • Internal implementation, data and procedures are hidden • Data structures(attributes) and operations of all objects are merged in a single named entity - class • Interfaces among encapsulated objects are simplified
Concepts - Inheritance • Options with a new class • Inheritance is optional • class hierarchy can be searched to determine if an existing class contains required attributes and operations • Can tag a new class on to an existing super-class • Attributes can be overridden
Concepts - Polymorphism • Enables a number of different operations to have the same name • The input (stimulus) will decide which form of the operation occurs
Identifying the Elements of an Object Model • How do you recognise an object • External entity • A ‘thing’ • Event or occurrence • A person • Organizational unit • Place • Structure (of other objects)
Potential Objects…. SafeHome software enables the home owner to configure the security system when it is installed, monitors all sensors connected to the security system and interacts with the home owner through a key pad and function keys contained in the SafeHome control panel During installation, the SafeHome control panel is used to ‘program’ and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system and telephone number(s) are input for dialing when a sensor event occurs When a sensor event is recognised, the software invokes an audible alarm attached to the system. After a delay time specified by the home owner during configuration, the software dials a monitoring service, provides information about the location and event ...
Potential Objects…. SafeHome software enables the home owner to configure the security system when it is installed, monitors all sensors connected to the security system and interacts with the home owner through a key pad and function keys contained in the SafeHome control panel During installation, the SafeHome control panel is used to ‘program’ and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system and telephone number(s) are input for dialing when a sensor event occurs When a sensor event is recognised, the software invokes an audible alarm attached to the system. After a delay time specified by the home owner during configuration, the software dials a monitoring service, provides information about the location and event ...
Extracting Nouns - Potential Objects • Home owner external entity • sensor external entity • control panel external entity • installation occurrence • system thing • master password thing • telephone number thing • sensor event occurrence • audible alarm external entity • monitoring service external entity
Characteristics 1 Retained information 2 Needed services 3 Multiple attributes 4 Common attributes 5 Common operations 6 Essential requirements
Potential Objects • Home owner external entity reject (1, 2) • sensor external entity accept • control panel external entity accept • installation occurrence reject • system thing accept • master password thing reject (3) • telephone number thing reject (3) • sensor event occurrence accept • audible alarm external entity accept (all but 1) • monitoring service external entity reject (1, 2)
Specifying Attributes • Select things that reasonably belong to an object • What data items fully define this object in the context of the problem to hand • Example sensor information = sensor type + sensor number + alarm threshold
Defining Operations • Operations that manipulate data • Operations that perform computations • Operations that monitor an object for a controlling event
Object system System ID verification phone number system status sensor table alarm delay time alarm threshold master password temporary password number of tries program display reset query modify call System Object...
Management of OO Projects • Establish a common process framework • use this and historical information to develop effort and time estimates • Specify work products and milestones to enable measurement • define checkpoints • Manage changes • Track, monitor, control progress
OO Common process Framework • Isolate major problem classes and connections • Determine if classes and connections can be implemented in a practical way • Extract reusable objects from library and prototype • Get user feedback • Modify analysis model • Refine design • Engineer special objects • Assemble new prototype • Conduct tests • Get user feedback
Framework - Milestones • OO Analysis Completed • Classes and class hierarchy defined and reviewed • Class attributes and operations defined and reviewed • Behavioural model created and reviewed • Reusable classes noted • OO Design Completed • Subsystems defined and reviewed • Classes allocated to subsystems • Task allocation established • Responsibilities and collaborations identified • Attributes and operations designed • Messaging model created • OO Programming Completed • OO testing
Next Week... • OOA - Methodologies • OOA Analysis