850 likes | 1.14k Views
Software Specification Models. Software Engineering. The Waterfall Model. Requirements Definition. System and Software design. Implementation and Unit Testing. Integration and System Testing. Operation and Maintenance. Focus on models. ANALYSIS PHASE.
E N D
Software Specification Models Software Engineering
The Waterfall Model Requirements Definition System and Software design Implementation and Unit Testing Integration and System Testing Operation and Maintenance
ANALYSIS PHASE The development process starts with the analysis phase. This phase results in a specification document that shows what the software will do without specifying how it will be done. The analysis phase can use two separate approaches, depending on whether the implementation phase is done using a procedural programming language or an object-oriented language.
System modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers
Stages of Design • Problem understanding • Look at the problem from different angles to discover the design requirements. • Identify one or more solutions • Evaluate possible solutions and choose the most appropriate depending on the designer's experience and available resources. • Describe solution abstractions • Use graphical, formal or other descriptive notations to describe the components of the design. • Repeat process for each identified abstraction until the design is expressed in primitive terms.
Requirements Specification: Approaches • Natural language • Structured natural language • Design description language • Requirements specification language • Graphical notation • Formal specification
Procedure-oriented analysis Procedure-oriented analysis—also called structured analysis or classical analysis—is the analysis process used if the system implementation phase will use a procedural language. The specification in this case may use several modeling tools, but we discuss only a few of them here.
Data flow diagrams Data flow diagrams show the movement of data in the system.
Entity-relationship diagrams Another modeling tool used during the analysis phase is the entity-relationship diagram. This diagram is also used in database design.
Entity-Relation Diagram An entity A relation between entities An entity or relation attribute An inheritance relation
CS311 Student Example: CS 311 Project Major Client 0:n 1 Student Project Person 0:n 0:n 1 Tech contact 5 to 7 Member of
CS305 Student Example: CS 305 Project Major Client 0:n 1 Student Project Person 0:n 0:n 1 Tech contact 5 to 7 Member of
State diagrams State diagrams provide another useful tool that is normally used when the state of the entities in the system will change in response to events. As an example of a state diagram, we show the operation of a one-passenger elevator. When a floor button is pushed, the elevator moves in the requested direction. It does not respond to any other request until it reaches its destination.
Object-oriented analysis Object-oriented analysis is the analysis process used if the implementation uses an object-oriented language. The specification document in this case may use several tools.
Use case diagrams A use-case diagram gives the user’s view of a system: it shows how users communicate with the system. A use-case diagram uses four components: system, use cases, actors and relationships. A system, shown by a rectangle, performs a function.
Class diagrams The next step in analysis is to create a class diagram for the system. For example, we can create a class diagram for our old-style elevator. To do so, we need to think about the entities involved in the system.
State chart After the class diagram is finalized, a state chart can be prepared for each class in the class diagram. A state chart in object-oriented analysis plays the same role as the state diagram in procedure-oriented analysis.
Data Flow Diagrams • DFDs model the system from a functional perspective • Tracking and documenting how the data associated with a process is helpful to develop an overall understanding of the system • Data flow diagrams may also be used in showing the data exchange between a system and other systems in its environment
4 Main Elements • external entity - people or organisations that send data into the system or receive data from the system • process - models what happens to the data i.e. transforms incoming data into outgoing data • data store - represents permanent data that is used by the system • data flow - models the actual flow of the data between the other elements
PROCESS • DATA FLOW SYMBOLS USED IN A DFD Actions performed on data so that they are transformed, stored or distributed. E.g. Result of a query to a database, contents of a printed report : data that moves together to common destinations
DATA STORE • SOURCE/SINK SYMBOLS USED IN A DFD A physical location to hold data e.g. a file folder or notebook etc. Origin and/or destination of the data. Often referred to as external entities as they are outside the system.
Example: University Admissions Rejection Application form Completed application Receive application Evaluate Applicant Offer
Example: University AdmissionsAssemble Application Stage Acknowledgment Acknowledgment Application form Completed application AND Evaluation request Initiate evaluation Receive Applicant AND Supporting information Applicant database Pending database
Example: University AdmissionsProcess Completed Application Stage Rejection Evaluation request Acceptance Offer Financial aid Evaluation Special request Applicant database
DFD Shapes from Visio Visio 2000 Visio 5.x
Levelled DFDs • Even a small system could have many processes and data flows and DFD could be large and messy • use levelled DFDs - view system at different levels of detail • one overview and many progressively greater detailed views 4
Level 0 - Context Diagram • models system as one process box which represents scope of the system • identifies external entities and related inputs and outputs • Additional notation - system box
Level 1 - overview diagram • gives overview of full system • identifies major processes and data flows between them • identifies data stores that are used by the major processes • boundary of level 1 is the context diagram
level 1 process is expanded into more detail each process in level 1 is decomposed to show its constituent processes Level 2 diagrams may not be needed for all level 1 processes Correctly numbering each process helps the user understand where the process fits into the overall system Level 2 Diagrams
Numbering • On level 1 processes are numbered 1,2,3… • On level 2 processes are numbered x.1, x.2, x.3… where x is the number of the parent level 1 process • Number is used to uniquely identify process not to represent any order of processing • Data store numbers usually D1, D2, D3...
Labelling • Process label - short description of what the process does, e.G. Price order • Data flow label - noun representing the data flowing through it e.G. Customer payment • Data store label - describes the type of data stored • Make labels as meaningful as possible
Context Diagram Accountant CampaignManager Staff Assignment Payment Campaign Staff Client Staff Grade Agate Campaign Management System Staff Contact Advert Completion Budget Client Contact CampaignStaff Advert Staff Concept Note Concept Note
Staff Members Campaigns Adverts Clients Notes Top Level Diagram (Level 0) Client 1. Record Clients 4. Maintain Staff Accountant Staff CampaignManager Staff Client Staff Grade Payment Staff Campaign Staff Advert Completion 2. Plan and Manage Campaigns 5. Manage Adverts Staff Contact Budget Campaign Contact + Completion Date Staff Assignment Client Contact Cost 3. Prepare Adverts Advert CampaignStaff Staff 6. Browse Concept Notes Concept Note Advert Concept Note Concept Note Concept Note Concept Note
Staff Members Adverts Level 1 Diagram Client Contact Staff 5.1 Set Client Contact Contact Advert Completion 5.2 Set AdvertCompleted Completion Date
Example • Alexsoft shop buys software from various suppliers and sells it to the public • The shop stocks popular software packages and orders as required • The shop sells monthly about 300 packages • The shop need to be computerized
System requirements • Business functions, account payable, accounts receivable and inventory • The system is batch or online • One computer with appropriate configuration
DFD Package data Package details Customer order Process order invoice Credit status Customer data
DFD (2) Package data Package details Customer order Verify order is valid Assemble order invoice details Credit status Customer data
DFD (3) Details of package to be ordered Batched order Verify order is valid Place order at supplier Pending orders Address or telephone Software Supplier
DFD (4) Package data Package details Customer order Verify order is valid Assemble order invoice details payment Credit status Customer data Payment to invoice Account receivable
0 Food ordering system Level 0 Context diagram CUSTOMER KITCHEN RESTAURANT MANAGER
Level 0 Context diagram CUSTOMER KITCHEN 0 Customer Order Food ordering system Food Order Receipt Management Reports RESTAURANT MANAGER
1.0 Receive and transform Customer Food Order 3.0 2.0 Update Inventory file Update Goods Sold file 4.0 Produce Management Reports