/
Basi di Dati e Sistemi Informativi IISpecifyingOperations--12003 Giorg Basi di Dati e Sistemi Informativi IISpecifyingOperations--12003 Giorg

Basi di Dati e Sistemi Informativi IISpecifyingOperations--12003 Giorg - PDF document

danika-pritchard
danika-pritchard . @danika-pritchard
Follow
376 views
Uploaded On 2015-10-29

Basi di Dati e Sistemi Informativi IISpecifyingOperations--12003 Giorg - PPT Presentation

Page 1 Basi di Dati e Sistemi Informativi IISpecifyingOperations22003 GiorginiThe role of operation specificationsAnalysis perspective An operation specification is created at the point when the ana ID: 175827

Page 1 Basi Dati

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Basi di Dati e Sistemi Informativi IISpe..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Page 1 Basi di Dati e Sistemi Informativi IISpecifyingOperations--12003 GiorginiSpecifying OperationsSpecifying OperationsWhy operations are specifiedAlgorithmic methodsNon-algorithmic methods Basi di Dati e Sistemi Informativi IISpecifyingOperations--22003 GiorginiThe role of operation specificationsAnalysis perspective An operation specification is created at the point when the analyst’s understanding of some aspect of an application domain can be fedback to users, ensuring that the proposals meet users’ needs Users must confirm the logic, or rules, of the behaviourFrom a design perspective an operation specification is a framework for a more detailed design specification, that later guides a programmer to a method.The designer and the programmer responsible for the class will be the main users of the specification, as they need to know what an operation is intended to do. Designers and programmers of other parts of the system also needto know about its effects on the other classes. Defining Operations should neither be begun too early, nor left too late Page 2 Basi di Dati e Sistemi Informativi IISpecifyingOperations--32003 GiorginiSpecification by ContractOperations are defined primarily in terms of the services they deliver, and the ‘payment’ they receiveWe identify the nature of the service provided by the server object, and what must be provided by the client object in order to obtain the serviceThe intent or purpose of the operationThe return typeAn appropriate descriptionof the logicOtheroperations called, whether in the same object or in other objectsEvents transmitted to other objectsAttributes set during the operation’s executionThe response to exceptionsAny non-functional requirements that apply Basi di Dati e Sistemi Informativi IISpecifyingOperations--42003 GiorginiNon-algorithmic approaches : describing the logic of an operation as a black boxDecision tablePre-and post conditionsAlgorithmic approaches : braking the internal logic of a process into small steps Structured EnglishPseudo-codeActivity DiagramsDescribing Operation Logic Page 3 Basi di Dati e Sistemi Informativi IISpecifyingOperations--52003 Giorgini Decision table Basi di Dati e Sistemi Informativi IISpecifyingOperations--62003 GiorginiWhat conditions must be satisfied before an operation can take place?What are the conditions that can apply after an operation is completed?Ex: Pre-condition: creativeStaffObjectis validPost-condition: a link is created between creativeStaffObjectPre-and post conditions Page 4 Basi di Dati e Sistemi Informativi IISpecifyingOperations--72003 GiorginiStructured English Basi di Dati e Sistemi Informativi IISpecifyingOperations--82003 GiorginiIt differs from Structured englishin that it is closer to the vocabulary and syntax of a specific programming language.Pseudo-code remains only a skeleton of a program, intended only to illustrate its logical structure without including full design and implementation detailsActivity diagramsThey are a part of UML notation set that can be used to specify the logic of procedurally complex operationsWe will discuss them later. Page 5 Basi di Dati e Sistemi Informativi IISpecifyingOperations--92003 GiorginiSome constraints can be adequately expressed in the graphical language (e.g., Multiplicity of an association).Some can not. For example, constraints within operation specifications (pre-and post-conditions)Where great precision is required, OCL provides a formal languageOCL expressions are constructed from a collection of pre-defined elements and typesThe language has a precise grammar that enables the constructionof unambiguous statementsObject Constraint Language Basi di Dati e Sistemi Informativi IISpecifyingOperations--102003 Giorginicontex that defines a domain within which the expression is valid (underlinedfor clarity).property of that instance which is the context for the expression. Properties may include attributes, association-ends and query operations.An OCL operation that is applied to the property. Operations include the arithmetical operators (*,+,-,/) and logical operators (AND, OR, IMPLIES) Page 6 Basi di Dati e Sistemi Informativi IISpecifyingOperations--112003 Giorgini OCL features Basi di Dati e Sistemi Informativi IISpecifyingOperations--122003 GiorginiType::operation(parameter1:type, parameter2:type)return type pre:�parameter1 …post:result= … EX: CreativeStaff::changeGrade(id:String, grade.id:String,gradeChangeDate:Date) �pre: self.id-notEmptyself.grade.id-�notEmptyself.gradeChangeDate�= today (assumes no retrospective changes)post:staffGrade[gra�de.id]-existsself.staffGrad�e-notEmptyself.staffGrade[grade.id].prev�iousGrade-notEmptyself.staffGrade.gradeFinishDate= gradeChangeDate:BooleanPre-and Post-conditions in OCL Page 7 Basi di Dati e Sistemi Informativi IISpecifyingOperations--132003 Giorgini[Warmer99] Warmer, J. Kleppe, A. The Object Constraint Language: Precise Modeling with UMLAddison-Wesley 1999[Yourdon89] Yourdon, E. Modern Structured Analysis. Prentice Hall.[Meyer97] Meyer, B. Object Oriented Construction. Prentice Hall.[Senn89] Senn, J. A. Analysis & Design of Information SystemsMcGraw-Hill.Additional Readings