Software Engineering (CSC 4350/6350) Rao Casturi
Recap What is software engineering? Modeling Problem solving Knowledge acquisition Rational Managing Software development Communication Rational Management Software configuration Project Management Software Life Cycle 2
Software Engineering Development Activities Problem Statement 1 Requirement Elicitation Nonfunctional Requirements Functional Model Use case Diagrams 2 Analysis Stage Diagrams Class Diagrams 3 System Design Analysis Object Model Dynamic Model Sequence Diagrams Design goals Subsystem decomposition System Design Object Model 4 Object Design 6 Testing Coding 5 Implementation Object Design Model Final Product Class Diagrams 3
Introduction to UML What is UML? Unified Modeling Language History Why is it so important in Software Engineering? Fundamental Notations of UML 4
Evolution of UML Reference Wikipedia 5
3 Major areas of focus in System Development System Development Functional Model Object Model Dynamic Model Use Case Diagrams Output or produces Class Diagrams Output or produces Interaction, State Machine, Activity Diagrams UML helps us in modeling our problem to get a meaningful solution Functional Model Functionality of the system from users view. Represented in UML via use case diagrams. Object Models Represented in UML: via class diagrams describing the Structure of the system in terms of objects, associations and operations. Dynamic Models Represented in UML via sequence diagrams (ID), state charts and activity diagrams describing the internal behavior of the system. 6
Basic Notations of UML Requirement Phase Analysis Phase Design Phase Object Design Phase 1. Use Case Diagrams 2. Class Diagrams 3. Interactive Diagrams 4. State Machine Diagrams 5. Activity Diagrams 7
What is an Use case? Use cases are used to describe the behavior of the system during the requirement phase seen from an actor s point of view. This is also called as external behavior. Actors are external entities that interact with the system. A use case describes a function provided by the system as a set of events that yields a visible result for the actors. Actors initiate a use case to access system functionality. The use case can then initiate other use cases and gather more information from the actors. GSU: Software Engineering - CSC4350/6350 - Rao Casturi 8
UML Notations (Continued) 1. Use Case Diagram: Use case 1 Use case 2 Definitions : Use Case: Statement of functionality required by software 3 Main components of Use Case ACTOR, ACTION,SUBJECT Use Case is written in specific format Use Case (UC) is a Functional Requirement Action Subject Actor 9
Use Case Template Use Case Name Actors/Particip ants Flow of Events Entry Condition Exit Condition Quality requirements Actor System Use case name give an unique Name Actors who are interacting with the Use case Entry condition is the pre requisite for the Use case is initiated Flow of events describe the sequence of interactions which are to be numbered for easy reference. 2 Column format. Actor steps and System Steps Exit conditions describe the conditions satisfied after the completion of the use case Quality requirements are not related to the functionality of the proposed system (eg. Hardware platform, response time etc.) 10
Example of an Use Case Portfolio Manager Risk Manager Trader Trading System Balance Portfolio Risk Analysis Set Risk Limits Price The bond Result Display << Extend>> << Include>> << Include>> Broker Quote (System Boundary) (Use Case) End of Day Holdings Valuation of the Bond Data Warehouse Broker 11
Format for an Use Case Use Case Name Actors/Participants Flow of events Entry Condition Exit Condition Quality constraints UC_001_BalancePortfolio Portfolio Manager 1. Select the Portfolio name 2. Display Portfolio market value and available cash in portfolio 3. Select sell/buy option depending on the cash balance to deploy 4. Confirmation notification for the selected order 5. Confirm the order 6. Generate the trade ticket and request the order and generate order code 7. Enter the order code on trade transmission and submit the order When a Portfolio Manager should be logged on to the Trade Order Management Module When the cash in the portfolio is near zero or less than.01 % of the portfolio value. If portfolio manager decides the trades are sufficient to balance the portfolio The transaction should be completed with in 3 minutes from the time the system generates an order code 12
Relationships Relationships between object are used to reduce the complexity of the Model Communication Relationships (Solid Line) <<Include>> (Dotted Line) Login Two use cases are related by an include relationship if one of them includes the second one in its flow of events. (While Exit) <<Extend>> (Dotted Line) A use case can extend another use case by adding events. An extend relationship indicates that an instance of an extended use case may include (under certain conditions) the behavior specified by the extending use case. (Entry) Inheritance (Solid Line with Triangle Head) 13
UML Notations (Continued) 2. Class Diagram: Describes the structure of the system in terms of Classes and Objects Classes : - Collection of objects Objects: - The Entities to capture the state and behavior of the system Consists of 3 Components Class / Object Name 1. Link : Connection between 2 or more classes 2. Association : Relation between 2 or more classes Roles, Multiplicity (1-1,1-m,m-n) Attributes 3. Aggregation : Hierarchical model 4. Inheritance : Relationship to Root Class to many Methods or operations specialized classes Super Class Sub Class 14
Interaction Diagrams (ID) 3. Interaction Diagrams: Capture Communication between objects Messages between objects (Solid arrows) Timing Diagrams or Sequence Diagrams X Axis Objects Y- Axis Time 15
Interaction Diagrams (ID) Actor Login Screen:LoginModule Authenticate:Manager Login Screen:LoginModule T i m e l i n e 1. Select LoginMenu() 2. ReadUserId() 3.ValidateUserID() 4. GrantAccess() 16
State Machine Diagrams 4. State Machine Diagrams: Describes the sequence of states an object can go through when triggered by an external event. Active, Inactive, Closed etc. Active Inactive Closed Achieved 17
Activity Diagrams 5. Activity Diagrams: Technique to describe any procedural logic or business process or work flow Like flow charts but support parallel behavior Forks, Joins, Decisions Swim lane diagrams Hardware Solution Open Case Resolved Software Solution GSU: Software Engineering - CSC4350/6350 - Rao Casturi 18
Questions? 19
Project Life Cycle 20
Project Organization and Communication Communication Structured / Unstructured Projects consists of 4 major components. Project : 1. Work product 2. Schedule 3. Participants 4. Task Formal Contact / $ Amount / Time Informal Word / Trust 21
Project Organization Concepts 1. Project Organization 2. Roles 3. Tasks and Work Products 4. Schedules 22
1. Project Organization Team Based Organization Hierarchical Cross-Functional Interactions (3 Types) Reporting Used for status information Between Develops or Team Lead to Project manager Decision Making Project Manager can take a decision to move the timelines Team Lead can decide to change the logic to implement a scenario Communication Many forms Formal and informal 23
Hierarchical & Cross-Functional Hierarchical Reaction Time Slow Wrong people making decisions Lowest level participation has no control of the project timelines Budget decisions efficiently Cross-Functional Fast Reaction time Right people at different decision levels Budget control can be an issue Complex communication leads to some slip through gaps 24
2. Roles 25
3. Task and Work Products Task is a well defined unit of work Work Product is a outcome from a task Document Object Subsystems Test Cases Use Cases Work Product Type Description Test Plan Document Gives a test plan for the system or unit Design of Objects Class Model Shows all the class objects in the system Subsystem (Code) Source Code Produced by development team and submitted for review 26
4. Schedule Mapping of task on a timeline or plot Each task has a life of its own (Start and End) 2 Types of Schedule Charts are widely used PERT and Gantt Charts Gantt Chart ( TASK vs Time) PERT (Program Evaluation Review Technique) Critical Path Graphical Representation Source : Wikipedia Page 27
PERT Charts Project Plan preparation 1 Hardware Purchase 30 10 2 3 Requirement 20 Documentation 5 4 7 5 Coding Standards setup Analysis 7 Feedback to client 5 3 6 9 11 8 Object Design 5 Budget Rework 10 20 Coding 10 10 Testing 3 Release Numbers boxes are Nodes and represent a significant milestones or tasks in project Number on the lines indicate the days the task will take to reach next node Directional arrows indicate dependent tasks. (Sequential order) Fork or divergence arrows are possible parallel tasks 28
Project Communication Planned & Un planned Planned: Problem presentation Client reviews Project reviews Peer reviews Status reviews Brainstorming Releases Postmortem reviews. Un Planned: Requests for clarification Requests for changes Issue resolution. 29
Questions? 30