Object and class structuring COMET software life cycle process model Object and class structuring Corso di Ingegneria del Software II Sonia Fagorzi
Summary Introduction Categorization of Application Classes 18/01/2019 Summary Introduction Context What the seminary tells about Categorization of Application Classes Interface Object Device Interface Object (example) User Interface Object (example) System Interface Object (example) Entity Object (example) Control Object Coordinator Object State dependent Object Timer Object (example) Application Logic Object Business Logic Object Algorithm Object Subsystems: packages (examples) 1/18/2019
Context Requirements Modeling Analysis Modeling Design Modeling Incremental Software Construction Throwaway Prototype Incremental Software Construction Incremental Prototype System Testing 1/18/2019
Context Requirements Modeling Analysis Modeling Design Modeling Use case modeling: Use case model Static modeling: Static physical model of the domain problem System context model Static model of the entity classes in the problem domain Class dictionary Object structuring Dynamic modeling Requirements Modeling Analysis Modeling Design Modeling Incremental Software Construction Throwaway Prototype Incremental Software Construction Incremental Prototype System Testing 1/18/2019
Context Requirements Modeling Analysis Modeling Design Modeling Use case modeling: Use case model Static modeling: Static physical model of the domain problem System context model Static model of the entity classes in the problem domain Class dictionary Object structuring Dynamic modeling Requirements Modeling Analysis Modeling Design Modeling Incremental Software Construction Throwaway Prototype Incremental Software Construction Incremental Prototype System Testing 1/18/2019
What the seminary tells about Goal: to determine the software objects in the system that model real-world objects in the problem domain and to categorize them using object structuring criteria 1/18/2019
Categorization of Application Classes A category is a specifically defined division in a system of classification Categorization of classes into certain groups: because most software systems have this kinds of classes to help understand the system under development 1/18/2019
Categorization of Application Classes 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «input device interface» «output device interface» «input/output device interface» 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «input device interface» «output device interface» «input/output device interface» 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «business logic» «algorithm» «input device interface» «output device interface» «input/output device interface» 1/18/2019
Categorization of External Classes Interface Classes Categorization of External Classes «external» 1/18/2019
Categorization of External Classes Interface Classes Categorization of External Classes «external» «external timer» «external device» «external system» «external user» 1/18/2019
Interface Classes Categorization of External Classes «external» «external timer» «external device» «external system» «external user» «external input device» «external output device» «external input/output device» 1/18/2019
Categorization of External Classes Interface Classes Categorization of External Classes 1/18/2019
Interface Classes Categorization of External Classes «external» «external user» «external device» «external system» «external timer» «external input device» «external output device» «external input/output device» 1/18/2019
Interface Classes Categorization of External Classes «external» «external user» «external device» «external system» «external timer» «external input device» «external output device» «external input/output device» «application» «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «input device interface» «output device interface» «input/output device interface» «business logic» «algorithm» 1/18/2019
Interface Classes «application» «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «business logic» «algorithm» «input device interface» «output device interface» «input/output device interface» 1/18/2019
Input Device Interface Object: example 1/18/2019
Input Device Interface Object: example «external input device» : aReal-World Temperature Sensor «input device interface» : aTemperature Sensor Real-world hardware object Software object Hardware/software boundary (*) 1/18/2019
Input Device Interface Object: example Temperature Sensor Input Temperature Sensor Data «external input device» : aReal-World Temperature Sensor «input device interface» : aTemperature Sensor Real-world hardware object Software object Hardware/software boundary (*) 1/18/2019
Output Device Interface Object: example 1/18/2019
Output Device Interface Object: example Light Command «output device interface» : RedLight Interface «external output device» : RedLight Actuator On, Off Software object Real-world hardware object Hardware/software boundary (*) 1/18/2019
Input/Output Device Interface Object: example 1/18/2019
Input/Output Device Interface Object: example Card Reader Data, Card Inserted, Card Ejected, Card Confiscated «input/output device interface» : ATMCard Reader Interface Card Reader Input «external input/output device» : ATMCard Reader Card Reader Output Eject, Confiscate Real-world hardware object Software object Hardware/software boundary (*) 1/18/2019
User Interface Object: example 1/18/2019
User Interface Object: 18/01/2019 User Interface Object: example Operator Commands Sensor Request «user interface» : Operator Interface «entity» : Sensor Data Repository Display Data Sensor Data : Actor Hardware/software boundary (*) 1/18/2019
System Interface Object: example 1/18/2019
System Interface Object: example Pick & Place Robot Command «system interface» : Pick&Place Robot Interface «external system» : External Pick&Place Robot Pick, Place Picked, Placed Pick & Place Robot Response Software object Real-world hardware object Hardware/software boundary (*) 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «business logic» «algorithm» «input device interface» «output device interface» «input/output device interface» 1/18/2019
Entity Class and Object: example 1/18/2019
Entity Class and Object: example Open, Close, Credit, Debit, Read Balance, Status «entity» Account accountNumber: Integer balance: Real «entity» : anAccount 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «business logic» «algorithm» «input device interface» «output device interface» «input/output device interface» 1/18/2019
Control Object A Control Object provides the overall coordination (what and when) for execution of a use case 1/18/2019
Coordinator Object A Coordinator Object is a not state-dependent overall decision-making object that determines the overall sequencing (when and in what order) for a collection of related object 1/18/2019
Coordinator and Business Logic Object: example ATM Transaction Bank Response «coordinator» : Bank Coordinator Transfer Transaction Query Transaction PIN Validation Request PIN Validation Response Withdraw, Confirm, Abort Transfer Response Withdraw Response Query Response «business logic» : Transfer Transaction Manager «business logic» : PINValidation Transaction Manager «business logic» : Query Transaction Manager «business logic» : Withdrawal Transaction Manager 1/18/2019
Categorization of Application Classes «interface» «entity» «control» «application logic» «user interface» «device interface» «system interface» «timer» «state dependent control» «coordinator» «business logic» «algorithm» «input device interface» «output device interface» «input/output device interface» 1/18/2019
State-Dependent Control Object A State-dependent control object is a control object whose behavior varies in each of its states. It is defined by a finite state machine 1/18/2019
State-Dependent Control Object: example «output device interface» : ReceiptPrinter Inteface Print Receipt Receipt Printed «state dependent control» : ATM Control Dispense Cash «output device interface» : CashDispenser Interface Cash Dispensed, Insufficient Cash 1/18/2019
Timer Object: example 1/18/2019
Timer Object: example Distance Timer Event «external timer» : Digital Clock «timer» : Distance Timer Calculate «entity» : Distance 1/18/2019
Business Logic Object A Business Logic Object define the business-specific application logic for processing a client request. It encapsulates business rules that could change independently of each other Usually it accesses various entity objects during its execution 1/18/2019 EX
Algorithm Object An Algorithm Object is used to encapsulate a substantial algorithm used in the problem domain that can change independently of other aspects of the domain 1/18/2019
Example of Algorithm Object «entity» : Desire Speed «entity» : Current Speed Current Speed Value Desired Speed Value Read Read «state dependent control» : CruiseControl «output device interface» : Throttle Interface «algorithm» : Cruiser Enable Maintain Speed, Disable Maintain Speed Throttle Value Throttle Position 1/18/2019
Packages - External classes and Interfaces classes The system is shown as a package The interface classes are shown inside the system package The external classes are depicted outside the system package 1/18/2019
Packages - External classes and Interfaces classes: example «system» Banking System «input/output device interface » CardReader Interface «external input/output device» CardReader 1 1 1 «output device interface » ReceiptPrinter Interface «external output device» ReceiptPrinter 1 1 1 «user interface» OperatorInterface «external user » Operator 1 1 1 1 1 1 1 1 «external user» ATMCustomer «user interface» CustomerInterface 1 1 1 1 «output device interface » CashDispenser Interface «external output device» CashDispenser 1 1 1/18/2019
Packages - subsystem and their relationship Structuring the system into subsystems Goal: objects with high coupling among each other to be in the same subsystem objects that are weakly coupled to be in different subsystems 1/18/2019
Packages - subsystem and their relationship: example Banking System «subsystem » ATMClient Subsystem «subsystem » BankServer Subsystem 1/18/2019
Packages - subsystem and their relationship: example «external output device» Receipt Printer «external user» Operator 1 «system» Banking System 1 1 1 «external input/output device» CardReader «subsystem » ATMClient Subsystem 1..* 1 «subsystem » BankServer Subsystem 1 1 1 1 1 «external input device» CashDispenser «external user» ATMCustomer 1 1/18/2019
(*): this notation does not conform to the UML notation 1/18/2019