You are on page 1of 97
Object Oriented Software Engineering 3, private : A private clement is only visible inside the Private visibility is represented by symbol. Mes, 8 y th deel 4. package : Only the elements that are declared in the same feature. Itis specified using the symbol ~’, REG aualified Association ‘Te qualified association has qualifier which is used to select pa, the set of objets For example For selection of particular Student fro qualifier will be StudentID a Course StudentiD : int 1 —— Fig. 2.12.40 A qualifier is a property which defines selection key. UML, allows is oneach end of a single association. The multiplicity can be associa : te link. a ERY Association Class The abstract class is a class that allows the association to be a class its when two classes are related with each other by an association link, then class. For example- in the following illustration the Enrollment is an the classes Student and Course. Fig. 212.11 Association class TECHNICAL PUBLICATIONS® - an up-thrus for knowledge 2-81 Requirements Analysis and Specification en there is a situation that only one instance of a class is instantiated then it is singleton instance. In the UML class diagram such a class is marked with "1" at the .d to co-ordinate actions across the system. This concept restricts the instantiation to tain number of objects. For example - Y indicates that it is a static member EREE] cctive Class Fig. 2.12.13 Active Class Active Class indicates that, when instantiated, the Class controls its own execution. ne its own thread of behavior. In other words this class initiates a thread or a process. ple - CommandProcessor is an active class when user submits some command based on that command particular process is invoked for execution. run() Fig. 2.12.14 TECHNICAL PUBLICATIONS® - an up-thrust for knowledge 4 Oriented Software Engineering i (Sig EREG when to Use Class Diagrams? Isa, Following are uses of Class diagram : 41. For modeling the vocabulary of the system the class diagram ig us a. + Whom we want to date which abstractions must be the par len nae design the # The class diagram is used to represent the abstractions ang their y, re which abstractions should be outside the boundary, w 2. For modeling the collaborations of the system the class diagram is us, ty i * ed, * Collaborations is a collection of classes, interfaces and other a 4 together to provide some co-operative behavior. Men + The class diagram species uch collaborative cases and thei ay * Forexample- address: sting 1a Shoppingas phone : int Account email: string created ED; id int ove address ; sting 5 open : Date transaction() 1 number; str ordered : Da shipped : Dat 0+ destination total > == Cransaction > Bank mer custo >/ [ <>, > TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Object Oriented Sonware Eng 100 Requirements ess_deposit l 3 Acknowledge Fig. 2.13.8 Sequence diagram (Deposit) EREEI collaboration Diagram ® Definition : A collaboration diagram shows the objects and rel tic in an interaction and the sequence of messages exchanged among | the interaction. Collaboration diagram represent the structural organization of e Both the sequence and collaboration diagrams are the interaction di The sequence and collaboration are similar and can be transformed For representing the structural organization of objects the col used. The communicating objects are placed as vertices in graph. The these vertices are the arcs of this graph. These links have the ro links can be adorned using messages that are sent and recei ‘This gives the flow of control in when the objects collaborate with ¢ A link specifies a path along which the message is sent to another the link can be adorned by using following constraints : - ntad Software Engineering 2 f0t _Requirements Analysis and Spacification It specifies that the cor enclosing scope. caocsl>> specifies that the corresponding, abject is visible in its as it has a local scope for invoking abject responding object is vicible in its Sees It specifies that the object is visible due to its operations, -<> | It specifies that the corresponding object is visible because Ik is parameter. rollowing, figure shows these adornments to the links ol 1414" 143 tude Student ssocatons> “Loaume]] <> ExaminationSection |—opae < Messages and Stimulus ‘There is a distinct flow of control within the system. For each control flow, the messages are ordered in some sequence. The sequence can be specified by following format Sequence_number : message Following is a communication diagram that shows the messages. a sequence number “se C role 2: withdraw(Amount) connector 2.1 checkBalance() (a) flat flow of control (b) Fig, 2.13.9 Flat sequence TECHNICAL PUBLICATIONS® - an up-thrust for knowedye poe _Roquiroments Analysis gn Defect Oriented Software Engineering __— quence of MESSABeS ~ : re two ways to specify the sequen Peed lor nested flow of control is © Procedural sequence : The proced 2 filled solid arrowhead. The ne sub-numbering ©. Flat sequence: For representing the non procedural sequence, the fig Hs . arrowhead. is used. I is represented by a stick arrowhen 4 useful for distinguishing the flow of cg ance of sending the message, with © The message sequence number * A stimulus represents a specific inst arguments. * Types of messages: © Nested message : The nested mess flow of control. The nested sequenct i resumes. The nested message symbol is represented by a filled solid ar Backward nested message age represents a procedure call or. is completed before the outer ley Forward nested message Fig. 2.13.10 Flat message : The flat message shows the progression to the sequence. The flat message symbol is represented by a stick arrowhe Backward Flat message Forward Flat message Fig, 2.13.11 asynchronous message between two objects. The asynchronous mn is represented by a half stick arrowhead. backward asynchronous message = -—_$_ a forward asynchronous message Fig, 2.13.12 ‘Active Objects initiate control activity. For example, processes and tasks are active objects. ACHVED! can contain other symbols and links among them, TECHNICAL, PUBLICATIONS® en up-haust for knowledge aware Engineering 2-103 ynted SOF joo em —Requirements Analysis and Specification. pe represented as follows - n jeear Invoice : Dispayinveiee ee Displayinveice) Fig. 2.13.13, The syntax of denoting the active object is {namel] [type where name is th type is a class or use case e name of active object Communication Diagram / ‘There are tWO types of interaction diagrams - Sequence diagram and communication jagram. Both the diagrams are semantically equivalent. Hence one form of the interaction diagram can be converted to other without losing any information. But there re ways by which these two diagrams differ. For example in above given communication iagram, the two objects can be linked to other objects using {local} or {global} adornment ut this s not possible in sequence diagram. Similarly, in sequence diagram at the end of e transaction you can destroy the object but this facility is not there in communication Sequence diagram ‘ Communication diagram “The sequence diagram models the lifeline of the| The communication diagram represents structural objects. The lifeline denotes the existence of the| links among the objects during there interactions. The particular object can be destroyed explicitly] There is no facility to destroy some object. in sequence diagram. The {local} or {global} scope of the objects with other objects can be represented in this diagram. TECHNICAL PUBLICATIONS® - an up-hrst for owledae Object Oriented Software Engineering Strengths and Weakness different prefe! re because they of Sequence and Communication p i ences for the interaction diagray Dif velopers have ifferent developers have ses greater nota the sequence diagram is preferred m0! Strengths of sequence diagram | . q 1. The call flow can be represented more systematically in sequence gj that of communication diagram. 2. The sequence diagram can. be read from top to bottom and proved for the documentation. 3. The reverse engineering can be easily carried out in sequence diay Weakness of sequence diagram 1. Drawing sequence diagram is complicated. 2. It is more space consuming because if we wish to insert any new: be inserted to the right. Strength of communication diagram 1. The communication diagram can be easily drawn. 2. They are more space efficient because the boxes can be dra horizontally and can be placed anywhere. Sketching of commur is very simple. Weakness of communication diagram 1. Itis difficult to see the sequence of messages in communication di 2. There are very few notational options in communication diagram. PEER Examples on Interaction Diagram Draw a sequence diagram to show how a GUI interacts wit also draw corresponding collaboration diagram. TECHNICAL PUBLCATIONS® on ptt fr nowedge fed Software Engineering. 2- 105 ‘and Specification 7 I 4:send(userName password) | # | S:validation() 6status() / | | Z:display ValidationMessage() | 1 i Fig. 2.13.14 (a) Sequence diagram for interaction with GUI 1: enterUserName() 2: enterPassword() 3: pressSubmitButton() 5 :validate() = 7 : displayValidationMessage() : 4: send(userName,password) — — 6: status() Fig. 2.13.14 (b) Communication diagram for interaction with GUI Draw a sequence diagrams that specifies the flow of control involved in Initiating a simple, t200 party phone call. TECHNICAL PUBLICATIONS® - an up-hrust for knowedge Object 126! Oriented Software Engineering Solution ; a Galen Switch PickUpReceWver actvateDiatTone() | sseeater?sT Communication| ina) PickUpReceivor Connect, @) Connect(a) Connecti) Caller and Calee both starttaking to each olter ‘afer geting connected Fig. 2.13.15 Sequence diagram for two party phone call EEERISEERERY Drew a collaboration diggram that specifies the flow of control registering a new student at a school. Solution : | 6: check sues eabity Fateh soa | :ouio0 A stay Canin) 10: Registers for the Course () [ps Pavment conten + Student 8: Pays Fees) Accountant Fig. 2.13.16 TECHNICAL PUBLICATIONS® - an up-thrst for knowledge Requirements. Analysis and Specification in ATM model, jaion 2 THE login operation in ATM model can be solu! 7 Performed by enterii i card and PIN. The sequence diagram for itis given belo y entering the valid r 2: Validate card Valid 4: Insert PIN 5: Validate PIN Valid 7: Transaction 8: Response Fig. 243.17 SME RERS Explain the two interaction diagrams for “issue of a book” and “renewal of a | book” operations ina library. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Object Oriented Software Engineering Solution : i) Sequence diagram for issue of a book © vmdtementer | roe i 3: Check Hook availabilty + 5: Check number of books issued i] ‘6: Can issue new book 7: Change bodk status a issued Fig. 2.13.18 ii) Renewal of a book 41: Request for book renew 2: Find for book [J Siteakicsueastaus £4: Update member borrowing Fig. 2.13.19 TECHNICAL PUBLICATIONS® - an ups for vare Engineering Qn tod Soltmare ENONCONNE 2-109 ____Requiremonts Analysis ond Specification Davo sequence and collaboration diagram fo rine cour ci iy Sequence diagram gutio? * fa ome _| oa, da | | 7: Display) 1 | | | | i 3: Select course() | 4: Submits form) | i | | | | | 3): Check student eigiity() TER ong / | Pays feeso | | T ‘9: Payment confirmation() | 10: Registers forthe course() Fig. 2.13.20 boration diagram 4 6: Check student eigiilty) 5 = 5 Send for reservation) =eaistar <7 git contig [2:0 10 Registers for the courset) {42 Submits form coe {s:setect course * om, t 9; Payment confirmation() $ 8: Pays feos() Student Accountant Fig. 2.13.21 TECHNICAL PUBLIGATIONS® - an up-thnist fr knowledge 2-110 __ Requirements Fi Object Oriented Soar Engneeine - Analysi samo for online shopping system. ESETSEE MEMS Dring a seven dia Solution : Chua Sane shopping SS] Credit Card Processing 1: Purchase 2 : Calculate Bill) ( [Jere 4: Swaps Card() 10: SubmitReceipi() 11: Makes Signature and Return() ina. Fig. 2.13.22 Sequence diagram for online shopping system, Explain about interaction diagram notation for inventory mand TECHNICAL PUBLICATIONS® - an up-hrus for knowledge [inventory Manager| 1: Logs in() ands items to fulfill mi 4:00 the order 2: validate() 3: Send validity() 5 : Check availabit sta) 6 : Checking Availablty() []7: checking avaitabiity() (| 8: Send availbilty status( 9 : Progress order() 10: Update) 11 : Update database() 12: Generate Bill) 13: Send Biling() top | Fig. 2.13.23 TECHNICAL PUBLICATIONS® - an up-hnist for knowedge Object Oriented Software Engineeting PTUTSEE RENIN Pie vse case “agin” ae Dalidates them and displays & MESS this, Solution : 3: validates Fj Fagin Suacesctul ~ 1 ; Fig. 2.13.24 SEROPRERED Explain about Interaction diagram notation for inventor. system. Eo Solution : See Fig. 2.13.25 on next page TECHNICAL PUBLICATIONS® - an up thrust for knowledge 3 Senda | “Demands tems to fulfil the order) 4: Der 5 : Check avatabitystausy pjoct Oriented Softwore Engineoring 2-193 Requirements Analysis and Specification ‘ventory Manager "Sloek Natntananca ‘Syste ‘Block Oeabave 7 ] ‘toga | 1 |2-vatdstay | Schmcing rinse] i Pr Checking avait | 8 Send availabilty status() | ‘9 Process order) Lto:upcat | | | } KX aa lution : The interaction modeling can be done by designing the sequence diagram for The sequence diagram models the The collaboration diagram represents | lifeline of the objects. The lifeline structural links among the objects during denotes the existence of the object there interactions. | between its creation and destruction B ‘The particular object can be destroyed There is no facility to destroy some object. explicitly in sequence diagram. L ‘ TECHNICAL PUBLICATIONS® - an up-thrust for knowiedge pject Oriented Software Engine with other bjects The linking of the abe’ ote object can not be represented a Toca OF global Designing sequence laste is very difficult Employee J Password 4: Enters Empl0 an Eee er of hours worked Submits numb les made ‘Submit details of the Sal at 6: Request for payment ‘on last day of month | i Fig, 2.13.26 ERED when to use Sequence Diagram 2 The sequence diagram represents following things ~ © One particular scenario ofa use case o The events that are generated by the external actors © Sequence of those events o Events among the interacting objects of the system. TECHNICAL PUBLICATIONS® - en up-thrust for knowledge Itis difficult to in collaboration d 2 2-118 Requirements Anaiysis and Specication The interaction diagrams such as sequence di; ed to represent the dynamic aspect of the syster munication diagram is used - ‘@gram or communication diagrams are ™m. Following are the two ways by which e com! 4. To model flows of control by time ordering The communication diagram is used to model the flow of control by time ordering. The sequence of messages that take part in the represented in the communication diagram, To model flows of control by organization The communication diagram us used to model flow of control by organization of objects. This diagram emphasizes on the structural relationship. The interaction among various instances (objects) is shown by the messages. eo Discuss the relationship between sequence diagram and class diagram. Illustrate with an example, the relationship between sequence diagram and use cases What are system sequence diagrams ? What is the relationship between SSDs and Use cases ? Explain with an example. CXC Troe aoe Mention the strengths and weakness of sequence diagram vs. communication diagram. What is the use of system sequence diagram ? PCRs ery EES Activity Diagrams eee ed An activity diagram, is just similar to the flowchart in which flow of control from activity to activity is shown. The difference between traditional flow chart and activity diagram is that - in an activity diagram, the concurrency as well as branches of control is shown. Activity diagram focuses on dynamic aspect of the system. An activity is an ongoing structured execution of behavior. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Object Oriontod Software Engineering ents, BREED Activity and Actions Actions - © executable and atomic computations The executable and at r 7 awe are called as actions. For example - : evaluation of some expression, sending of gnal to some object, creation or destruction of some object - all these represent the actions. * There are two ways of representing an action - 1) Simple action and 2) expression. © The actions are represented by rounded box. Activity node * Activity node is a nested grouping of actions or other nested a * Activity nodes are created for those actions that take time to conn * Actions is an activity node that cannot be further decomposed, ‘Generate coda()) Fig. 2.14.2 Activity nodes © It is represented as ¢4 Initial and Final Activity * Initial state : In activity diagram, the initial state is represent From this circle the transition to the first activity starts. Thus the initial state represents that all the acti execution from this point. © Termination : In activity diagram, the termination is represented by bull's eye (hee i.e. a solid circle surrounded by a hollow circle. This state represents the ‘Completion termination of all the activities at this point. Fig. 2.14.3 represents these states, ies start their x Orionted Software Engineering io ___Requiroments Analysis and Specification Activity Edge In order to show the flow through an activity class. Activity edge can be control edge or data flow edge (object flow edge). ‘Thus we can show activity edge as a line with an arrow pointing to the next action. For example : Gaz Fig. 2.14.4 Activity edge activity the actions are linked up using Object Flows jen activity edge is represented for data only. For example, Generate Mai Bill UC J Payrm Object Flow Fig. 2.14.5 FW] Decision and Merge Points ‘decision node or decision point (Aapont {choice 1] trol node which has one input Se) si i . => 5 \d multiple outgoing edges. Fauna _lchoice 2} © (eo eae hen data arrives at the decision a single outgoing edge is d from multiple outgoing edges ita is sent over that outgoing The outgoing edge is selected on the evaluation of guard ition. Guard condition is a Fig. 2.14.6 Merge point i El expression that tests some isible to the activity. [Order Rejected] Fig. 2.14.7 Decision point TECHNICAL PUBLICATIONS® - an up-thrust for knowedge Dtject Oriented Sotware Engine ‘The merge node is opposte of decision node. Tt has mutiny output flow. The merge point simply takes any token along so. and makes it available on the outgoing edge. The notation for decision and merge point is diamond shaped. Example [choice 1] [choice 2 [choice 3) {choice 3} Fig. 2.14.8 Merge point [conditions tue} (Reton on True @—<_ >) Decision Node Merge Node: Action of [condition is false} |_False Fig. 2.14.9 Decision and merge point together Fork and Join There are two types of activities - sequential activities and con © The activities that can be performed one after the other a activities. © The computer system can perform more than one activities at that can be performed at the same time are called concurrent a © The concurrent activities can split in several activities or can join action. forking and joining. © The fork and join in activity diagram is represented by synchroni: © The synchronization bars are represented by thick horizontal or The fork represents the separation of two control flows wher joining of two control flows. TECHNICAL PUBLICATIONS® « an up-thnust for knowledge janted Software Engineer t Orie ing Requirements Analysis and Specification [Order Rejected } oo fork “Dispatch Order © Close Order Fig. 2.14.10 Forking and joining Activity Partitions or Swimlane Many times the activity diagram needs to partition in groups to represent the flow _of business processes. Each group represents the particular business flow belonging to some ‘category. Such a group is called swimlane. "Graphically the swimlane is denoted by a vertical solid line. Object Flow The objects may be involved in the activity diagram. These objects are associated with the control flow of the activity diagram. This is called object flow. The state of the object is specified for each of these objects. Following is a simple activity diagram in which the object flow is represented for the objects of the classes Order and Invoice. (See Fig, 2.14.11 on page 2 - 120) TECHNICAL PUBLICATIONS® - an up-thrust for knowedge rl cr ject Oriented Software Engmeets Finance (0: Order finprogress] [ Order Rejected } [Order}Accepted ] Submit order i: Invoice [unpaid] ‘Send Invoice object flow Invoke Shipping Service ‘Accept Payment © Fig. 2.14.11 Object flow TECHNICAL PUBLICATIONS® - an upthrst for knowledge sriented Software Engineering the activity diagram, 2-921 When to use Activity Diagrams? interface, components Requirements Analysis and Specification tivity diagrams are used to model the dynamic aspects of a system. That means ie activity involved in classes, and nodes can be represented Send Invoice ‘Accept Payment activity diagram can be odel the workflow performed. Submit order swimlane Finance 4 Customer Service b Order Fulfiment > Receive Order [Order Rejected } Invoke Shipping Service ispatch Order © Fig. 2.14.12 Swimlane with an activity diagram used in two ways - The actors collaborate with the system and then various activities are TECHNICAL PUBLICATIONS® - an up-thrust for knowledge: the abject flow activities depict tivity diagrams can be used to model this Work flowy, 2. To model the operations tm this case the activity diagram is used as aq : owen re computations. Those activity diagrams include branch, fork and join. Such agg ’ "Such acti normally useful for design of the operations having param, a | et FREED Examples on Activity Diagram EREES LS Draw activity diagram for issue of book in library informa} ae Solution : [not available] Object with the current state (Collect issued book, Fig. 2.14.13 TECHNICAL PUBLICATIONS® - an up-thrust for knowledg® (vatia} K invatig) Fig. 2.14.14 TEGHNIGAL PUBLICATIONS® - an up-trust for krowodgo Object Orionted Software Engineering 2-124 Requirement [EERSERER Dvir activity sivimlane diagram for stock mainteyay Solution : laventory manager Stock maintenance system ! G+ Check availabilty for tems [Not available] (Available) Process order, 4 Fig. 2414.15 TECHNICAL PLBCATIONS®- on upto ocledge Oriented Software Engineoring 2-125 Requirements Analysis and Specification Premed Draw activity/swimlane diagram for credit card processing system. Customer Credit card processing system Bank ering. Finally the customer support tells the customer about several supported DVD ions. The customer chooses a DVD and it is shipped by the mail department. The omer receives the DVD, installs it satisfactorily and then mails her payment to truct an activity diagram for this process. Use swimlanes to show the various ictions. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge rect Oriented Software Engineering 2-126 Requirement Solution : Conon Babee Conon Spon = ] = ee am OOS Fig. 2.14.17 Swimlane diagram attended more than 80 % classes, he is awarded minimum 10 marks, completed assignments are gicen 10 marks. Those who have compl 5 marks and rests are given 0 marks. TECHNICAL PUBLICATIONS® . an up-hnst for knowledge attended 80 % classes. attended more than 80 % classes iments in passport office on the date of appointment. In case of insufficient or incorrect ments, the applicant's has to reapply and get new appointment. After submission of suments, applicant's verification is done by the police. On successful verification, passport sued to the applicant. If verification is unsucessful, applicant has to reapply for passport. ‘TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Object Oriented Software Enginoering Solution ; —_$— == Apnikant Passport System +$ —_—=r | e submits document Fills up the form subs om| ——— Document Verification and Form validation Get Validity Status appointment Incorrect documents or insufficient data valid documents Schedule for police verification Acknowledge Status successful verification Issue Passport Fig. 2.14.19 SEALED Insurance sytem proves vehicle insurance to ee Y TECHNICAL PUBLICATIONS® - an upanrust fr knowledge pct Orionted Soltware Engineering Requirements Analysis and Specification Agent Insurance Comparies details k Invalid <> Valid ‘Accept Policy| ‘Send form to insurance companies Satisfied Need more with quotation improvement not satisfied Quotation [before analysis] Select and Submit Best Policy Fig. 2.14.20 of coffee powder, milk, sugar, water and Analyse Proposals ‘Send Quotations to.agent EIIEPALEY A coffee vending machine dispenses coffee to customers. Customers order coffee By selecting a recipe from a set of recipes. Customers pay for the coffee using coins. Change is n back, if any, to the customers. The ‘Service Assistant’ loads ingredients (coffee. der, milk, sugar, water, chocolate) into the coffee machine. The ‘Service Assistant’ adds a ipe by indicating the name of the coffee, the uni thocolate to be added as well as the cost of the coffee. The Service Assistant can also edit and ete a recipe. i) Develop the use case diagram for the specification above. (Marks 6) ) For any two scenarios draw an activity diagram and sequence nie (5+5 Marks) TECHNICAL PUBLICATIONS® - an up-hnust for knowledge Object Oneried Soran Engincoring 2190 Solution: — i) The use case diagram isas given below - cinco? : Customer 2-131 Requirements Analysis and Specification Fig. 2.14.23 Activity diagram for service assistant for adding the receipe ence diagram : Customer Pane] iController 1: Selects Receipe() 2 : Product Details() 3: Check Availability() ; 4 : Receipe Availhble() T 5 : Display|Cost() 6: Insert Coin() 7: Amount Details() 8: Check amount against cost() 110 : Product informatio Cha mast) 11 : Get Coffee() 112 : Dispense Coffea() Fig. 2.14.24 Customer getting coffee from vending machine TECHNICAL PUBLICATIONS® - an up-thrust for knowledge 2. 192___ Requirements Anaiy, Object Oriented Software Engineer 2 get status) J Receipe net Available() 5 : Loads ingredients) 5. Ming Ingredients) @ Coffee available() Fig, 2.14.25 Service assistant loads the ingredient and prepare coffe w Que: ‘L. With an example, Explain the need for actcity diagram State Chart Diagrams Purpose : UML State machine diagram represents the events and states, a the behavior of object in reaction to an event. The state chart diagram shows the life cycle of the object. Sometimes ita to show each and every event in the state diagram. EBEBI Events, States and Transitions © Event: An event is significant occurrence of something. For example : Customer inserts ATM card. © States : A state is a condition of object at a particular moment of tim mostly between the events. For example : 1. Waiting for user to enter PIN 2. Authenticating the User 3. DI Note that these states represent that object is waiting for so something. TECHNICAL PUBLICATIONS® - an up-thrus for knowtedg® software Engineering 2-199 ments Analysis and Specification han aetie eLGarea -sansitions ? The relationship between the two states is indicated using the transition. When some event occurs the object moves or transits from one state to im other. This is represented by the transition, for example : When the System operator “performs startup"(an event occurs) the jon from Idle state to Active state occurs, Fig. 2.15.1 State machine diagram for ATM system Applying State Machine Diagram {f the object responds to the same way to an event then that object is considered as te-independent with respect to that event. For example - If an object receives the ssage “Customer finished the transaction” or “Customer pressed the Cancel button” the sponding method will be Ejecting Card. If objects respond differently to the events depending upon their states or mode then ch objects are considered as state-dependant objects. ‘For example - For an “Insert Card" event the state will be "Reading Card” whereas inter PIN" event the state will be "Validating PIN" jideline about the state dependant and independent objects 1. The state machines containing state dependant objects with complex behaviour is considered better than the state independent objects. 2. The business information systems have few complex state-dependant classes. On the other hand the process control, device control and protocol control systems have many state dependant objects. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Object Oriented Software Engineering The state machine diagrams can be created for following two Boog 1. In order to model the complex reactive objects in response to wal 2. To model legal sequence of operations or language specification, A list of common objects used in state model diagram is ~ 1, Complex reactive objects © The physical devices contrlled by the objects can be repreg dependant objects. For example CardReader, Microw Machine. * The transaction or business objects such as Order, ny, Purchase can be state dependant objects. © The Role mutator are the objects that change their role. Foy ex: 2. Protocols q © The communication protocols such as TCP or UDP can be State machine model. 3. Legal sequences © User Interface Controller or session such as web applications iq web pages can be displayed to the user based on the current g Navigation can be represented using the state machine mo, using the state dependant object. Use case operations can be represented using the state n example - Withdrawal of money, Validating user. E&J More Notations During the transactions the event occurs and these events cause fh These transition may represent the call to the method of some spec may be a condition guard which represents the Boolean test. When # true then only the further state change occurs. For example in the follo transition between the Reading Card and Requesting PIN states is shd card, it is necessary to validate that card. If the inserted card is valid then for the PIN is made. When the process of Reading card gets comple is glowing. TECHNICAL PUBLICATIONS® - an up-hrust for knowledge Requirements Analysis and Specification Fig, 2.15.2 ted states e nested states are the states that occur within the one super state. For example in following state machine diagram, the Active state is a super state in which the sub jes such as Display, Reading Card Validating PIN and so on are present. When the form shutdown event occurs then the system is restored to the Idle state from the five state. Active Complete Fig. 2.15.3 Following is a simple state machine diagram representing one session with ™M System TECHNICAL PUBLICATIONS® - an up-tirust for knowiodgo gineering 2-198 Reauiremens 4 Compl x Inserts card rd | LoMPIete/Gia eo_{ Request for insert card Reina ay Invalid Card Finishing Transaction chosen Ejeeing Gard] Tensacton (FT cto Ca Wants another Transaction © Select cancel Fig. 2.15.4 State machine model SUSEEREEY Draw state diagram for the control of fa telephone anstvehiy Tachine detects an incoming call n the fist ring and answers the calf Grnouncement. When the announcement is complete, the machine. message. When and shuts of nent, record. {he caller hands up, the machine hangs up im the diagram : call detected, answer cal, play armouncem UP, artnouncement complete. Solution : Answering Machine Caller hangs up Call detectedis Call Hung up and Shut of |_Cal'detectedanswer Cal $ 3 Calerhengeun (Tara ‘ecording (doltecord message SSS Fig. 2.15.5 TECHNICAL PUBLICATIONS® an Up-thrust for fed Software Engineering 2-497 fel Orient Requirements Analysis and Specification perer nee Model a state transition diagram for the following scenario : Fore is what happens in a microwave oven : ere is ‘The oven is initially in an idle state with door open, where the light is turned on. Wher the door is closed it is now in idle but the light is turned off If a button is pressed, then it moves to initial cooking stage, lights are on and heating starts. where the timer is set and ‘At any moment the door may be opened, the cooking is interrupted, the timer is cleared and heating stops. Also while cooking, another button can be pushed and extended cooking state starts, where the timer gets more minutes. At any moment door can be opened here also. ) If the-timer times out, then cooking is complete, heating stops, lights are off and it sounds a beep. When the door is open, again the oven is in idle state with the door open. time event after (3 second: 0 Sal same 3 (3 seconds)/send c.cook Send Signal event tigger with parameter SetTime( —_ Ready To Cook }emmel i lsButtonPress) Cooking )g door closed e— event tigger buttonPressediturmONLightO door opened door closed Interrupted door open timed out is CockingComplete transition 215.6 TECHNICAL PUBLICATIONS® - an up-thrust for knowledge ee ee Qbject Orionted Software Engineer __— Solution : Request for Insert card Invalid Card inserts cad Transaction chosen Finishing Transaction Ejecting Card Select cancel Fig. 2.15.4 State machine model message. When the caller hands up, the mackine hangs up and shuts in the diagram : call detected, ansiver call, play announcement, record up, announcement complete. Solution : Answering Machine Caller hangs up Playing anno ‘Hang up and Shut of |_S2l delectedtanswer Call : Soler hengs up (Fay 9 [dotecord messag Fig. 2.15.5 TECHNICAL, PUBLICATIONS® on upstmstor knowledge 2-137. Requirements Analysis and Specification ere is qwhat happens ina microwave oven : © re oven is initially in an idle state with door apen, where the light is turned on. hen the door is closed itis now in idle but the light is turned of B ifa button is pressed, then it moves to initial cooking stage, where the timer is set and rights are on and henting star 5 At any moment the door may be opened, the cooking is interrupted, the timer is cleared and heating stops. | Also while cooking, another button can be pushed and extended cooking state starts, ‘okere the timer gels more minutes. AE any moment door can be opened here also. ) Uf the. timer times out, then cooking is complete, heating stops, lights are off and it sounds a beep. When thie door is open, again the oven is in idle state with the door open. Presa ee) time event after (3 seconds)/send c.cook Self transition send signal event trigger with parameter Costing le doar closede— event tigger Interrupted door open timed out ‘Completion transition CookingComplete Fig. 2.15.6 TECHNICAL PUBLICATIONS® - an up-hrust for knowiedga aH Requirements Analysis pject Oriented Software Engineering : Object Orionted Soft Assimple digital watch has a display and tivo bot button py voto mates of spay, splay tie” rode and “Set ting i oi te a ihe watch displays the hours and mites wiped by a ie 7 tine mode has tivo sub modes, set hs Lie io ae ‘AP os. Each time it is pressed, the mode advances int as ence : display 4 me mies Within the sub modes, the B button actoances the hours or ai fime it is pr i Buttons must be released bufore they cam generate another state diagram of the watch. Display time do/display hrs & min. A set minutes. Solution : Set Hours Bladvance hour do/display hours A Set Minutes, See ie Bladvance hour Fig. 2.15.10 Digital watch SUEPRERY Draw a state machine diagram for coffee vending machine. Solution : Inserting coin i iia Tight amount entered Insufficient amount Power up 4 rented Software Engineering 2-144 Requirements Analysis and Specification rete When to use State Diagram ? H, state diagrams are used to model the dynamic aspects of a system. That means the event ordered behavior of any kind of object is represented using state diagram. The classes, interfaces, components and nodes can be represented in the state diagram. ‘The state diagram can be used in context of the system as a whole. The state diagrams can also be attached to the use cases, ‘The state diagrams can be used to model reactive objects. The reactive or event driven object is a kind of object whose behavior is characterized by the responses to the events. The reactive object is typically idle until it gets some event. When it receives some event that reactive object responds based on previous event. State diagram is used to model various states of the objects. These states can be the stable states or the transitive states transiting due to event triggering. ‘The state diagrams are used to model the actions that occur on each state change. Write elaborately on UML state diagram and modeling. Explain the state chart diagram with a suitable example, Also define its coment and use. Explain UML state machine diagrams and modeling. What is the purpose of state chart diagram ? How to draw state chart diagram ? Explain. 7 Lee rao 38 Write a short note on the state diagrams. Give the meaning of event, state and transition. State independent and state dependant objects. How to model state dependant objects ? 7 Functional Modelling In function-oriented design, the design of software system is divided into various interacting units. Each unit then becomes a function. Thus system is designed from a functional point of view. This approach is more used in smaller systems but not preferred for larger systems. Various models that can be created in function-oriented design are - 1. Data flow models 2. Data dictionaries 3. Structure charts TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Requirements Analysig ing n and object oriented design Sn oriented desi " Object orientay Difference between Functio' SO eer e eens Sr. Function oriented de’ ig? " ; - The problem is decom paeadinto functions 1. The problem is decompos iM To and procedures mrned to Objects are self-contais contain data and behavior! vior, 2. Functions can be reused and ¢ create more comples functionality In object oriented des ate is shared among the ol 3. In function oriented design ; information is centrally located and sever functions on this centralized data are defined Pedifficalt Object-oriented designs tg manage as the design is, cbjects and modules, 4. Functiona-oriented design ca to heep track of all the functions and how they interact with each other. ted with Object-oriented design isi 5. Function-oriented design is associat object oriented prograi a procedural programming like C. ni The object-oriented designs 6. The function-oriented design does not inheritance and polymorp] support inheritance and polymorphism. Using this design app: easily located and cor The function oriented approach is simple to design. affecting the other mo B,_ Forexample-In railway reservation system For example - To designial the major functions will be reservation system vai get_personal_details(),eserve(),cancel(), _be-Class Passenger, ‘compute_fair() name, age, Sex, SOUTCE, Operations are : sget_personal_data(),r Class Ticket, the attribut Ticket_ID, Source, destin fair_amount and operat compute fair) cae Wenaibedl 1. Discuss the differences between object-oriented and function-oriented design. re TECHNICAL PUBLICATIONS® - an up thrust for knowledge 1 origntad Software Engineering 2-143 pata Flow Diagram lysi 18, YTS FE} 16,17, Mark ithe structured system analysis is a technique in which the system requirements are verted into specifications and then into computer programs, hardware configurations id selated manual procedures. ‘The structured analysis is mapping of problem domain to flows and transformations. ‘The system can be modeled using : © Entity relationship diagram are used to represent the data model. co Data flow diagram which is used to represent the functional model. Data Flow Diagram (DFD) represents the flow of information for any process or system. Rules for Designing DFD 1, No process can have only outputs or only inputs. The process must have both outputs and inputs. x ? x Fig. 2.17.4 2. The verb phrases in the problem description can be identified as processes in the system. 3. There should not be a direct flow between data stores and external entity. This flow should go through a process. TECHNICAL PUBLICATIONS® - an up-thrst for knowledge 4, Data store labels should be noun phrases from problem description, 5. No data should move directly between external entities. The data floy through a process. \ | FS Sink Source Source Fig. 217.4 6. Generally source and sink labels are noun phrases. not represented in DFD. 8. Data flow from process to a data store is for updation/insertion/de! 9. Data flow from data store to process is for retrieving or using the i 10.Data flow labels are noun phrases from problem description. TECHNICAL PUBLICATIONS® - an up-thnst fr knowledge 2-145 Requirements Analysis and Specification tio" _ A student comes to a library for borrowing book. The student makes the book ote by siviMB gometimes student may simply give topic and demand for a book (For example “just sok on data structure”). The library information system maintains lis book title and author name. The student has to submit his library card to the of authors, list This system also keeps record of topics on which books are available sf titles » the system ily the list of demanded book should be displayed, on the console for ease of i ». This system maintains information about shelf number on which books are il cated: Final Jection- ‘The first level lution t : In this DFD the whole system is represented with the help of input, processing and put. The input can be- i Student requests for a book hence Book request. ji) To show identity of the student he/she has to submit his/her Library card, hence d. The processing unit can be globally given as | of DFD can be Library car iprary information system ‘The system will produce following outputs- j) The demanded book will be given to student. Hence Book will be the output. si) The library information system should display demanded book information which can be used by customer while selecting the book. Book request Library card Demanded ‘book Info. Display of Book Fig. 2.17.5 Level 0 DFD (Context level DFD) vel 1 DFD In this level, the system is exposed with more processing details. The processes that eed to carried out are - i) Delivery of book ii) Search by topic These processes require certain information such as List of Authors, f Topics, the book selves from which books can be located. This kind of information is List of Titles, List tepresented by data store. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Delivery cof Book List of topics Book request (By Pe) Demanded ae Book, Based ontop) cies Fig, 2.17.6 Level 1 DFD Shelf number ‘and book info/no. Find book position and student name Demanded book Fig, 217.7 Level 2 DFD TECHNICAL PUBLICATIONS® - an uptrust for knowledge tod Software Engineering 2-147 ned SO" Requirements Analysis and Specification oD ‘i raw use case and data flow di ore aD rf ee flow diagrams fora restaurant system. The activities of 2 qurant sys as are listed below. Receive the customer food orders, produce the er ordered foods, serve the customer with their ordered foods, collect payment from store customer payment details, order raw mat erials and pay for labor. eusto” custom vac mt ; 00 aura giutio customer goes ial oe and orders for the food. The food order is noted S incaretully and this order is sent to kitchen for preparing the required food. do" This restaurant has to manage one housekeeping department which maintains sold stems and inventory data. The daily information about sold items and inventory deplit yeportis giver In this Jevel, the system is designed globally with input and output. The input to Food ordering SY’ 1, As customer orders for the food. Hence food order is an input. jon amount is used to generate a management report. Finally this management to restaurant manager. stem are - Level 0 DFD Orders for the food Order served Fig. 2.17.8 Level 0 DFD (Context level DFD) The output to food ordering system are - 1) Receipt. 2) The food order should be further given to kitchen for processing the order. 3) Bill and management report is given to restaurant manager. TECHNICAL PUBLICATIONS® - an up-thrust for knowied3e 2-148 Level 1 DED Orders for ood Processing of Payment an order Food order Update sold Inventory Update items fle inventory file eee Database of sold Deme: F oae Formatied sold item date Info, about daily sold items ‘and amount Fig. 2.17.9 Level 1 DFD In this level, the bubble 0.0 is shown in more detail by various pro 1.0 is for processing an order. And processes 2.0, 3.0 and 4.0 are f DFD - 1. Database of sold items 2. Inventory database In this DFD we will elabortate "processing of order”. ‘TECHNICAL PUBLICATIONS® - an up-hrust for knowledge order Some Jor food we food items Food items Serve customer order served order list Payment Receipt Fig. 2.17.10 TECHNICAL PUBLICATIONS® - an up-thnust for knowledge List of raw material order [Order raw Order material for file food Ordered raw material items and raw material and pay for ‘Add entries of ordered raw’ material to inventory file Updated inventory data Fig. 2.17.11 Level 2 DFD In this DFD we will elaborate “Generate management report” activity i For generating management report we have to access sold items data and iny Then aggregate both solid items data and inventory data. Total price of be computed. Then from these calculation a management report has to b (See Fig. 2.17.12 on next page.) TECHNICAL PUBLICATIONS® - an up.thrst for knowledge 1 Software Engineering 2-451 yoo on 1 onionte Requirements Analysis and Specification ‘Aecess sold pout daily sold items items Inventory depletion Inventory Info al and, ‘and amount amount database - inventory data and sold items Inventory and sold items list Inventory and sold items list Prepare management report Fig. 2.17.12 Level 3 DFD Bolution : The customers in this system are book sellers who do not make a stock of books. AS e orders come the books are demanded from publishers directly. As per the problem description it is clear that the input to this system is ‘customer’ Now, we will do more detailing for order processing when an order is received by the stem, it will be first verified using the books database. Credit rating will be decided by ecking customer details (i.e. whether the customer is regular customer or whether he is TECHNICAL PUBLICATIONS® .. an up-thrust for knowledge = 152, Object Oriented Sonware Engineering eens ened Software Engineerin Rew). For submitting a batch of orders we have to maintain Pending orders list as well. There may be the order for books which Fig. 21743 Level 0 are published by ; different perme ‘in such a case database for different publigh maintained by the sytem. This lit of purchase oe F aintained {hen after verifying the shipment a shipping note will be given to the level 1 decomposition is as shown in Fig, 2.17.14, ' processing Pending order Batch of orders fla |Shipping note List of corresponding publishers: Publishers Purchase orders L390 Fig, 2.17.14 Level 4 TECHNICAL PUBLICATIONS® - an up-thrust for knowiedge software Enginering 2ieg ad " ot ont Requirements Analysis and Specification © we can further decompose the system by elaborating the process Assemble order. In omble order we 58° { details of total copies per title. First ge! ‘Then prepare purchase order accordingly for corresponding publishers gend these purchase orders to publishers, qhese purchase order details should be stored in the system. Let us draw level 2 DFP for these details. Pending orders Batch of orders Géttotal copies per title Prepare purchase order: Publisher List of corresponding publishers Publishers: Purchase orders Fig. 2.17.15 Level 2 TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Dijeot Oriented Sonware Engnena Design DED for Hotel esereation system. an make onli i Solution : In a hotel reservation system, a customer Ca" MY ve ae specifying the accomodation requirement bed), total number of rooms, duration of stay ra customer's requirements, If such a hotel is found then the availability of checked. The charges are calculated for the selected requirement and these arg to the customer. If the customer is satisfactory about the selection made by the confirms the reservation. The system then gives these booking details to the corresponding ho for this system. clas ype of oom (AC/Non Ac The system then selects a suitay Reservation Online hotel reservation system Processing request Room , time, charges, available Suitable info, details Confirmation of reservation Reservation Reservation details Fig. 2.17.17 Level 1 DFD TECHNICAL PUBLICATIONS® - an up-thrustfor knowledge > spnted Software Engineering 2-155 ot On Requirements Analysis and Specification Customer details Hotel name Room types Hotels’ detail Availability Booking details Charges ‘Calculate: charges Fig. 2.17.18 Level 2 DFD Tamil Nadu Electricity Board (TNEB) would like to automate its billing process. Customers apply for connection-(domesticfcommercial). EB staff take readings and update the system each customer is required to pay charges bi-monthly according to the rates set for the type of connection. Customers can choose to pay either by cash/card. A bill is generated on payment. Monthly reports are provided to the EB Manager. i) Give a name for the system. (Mark 1) ji) Draw the Level - 0 DFD (Context Flow Diagram) (Marks 5) ii) Draw the Level - 1 DFD. (Marks 10) olution : i) Electricity Bill Management System EB Manager Makes payment Fig. 2.17.19 Level 0 DFD TECHNICAL PUBLICATIONS® - an up-thrust for knowledge ted Software Engineering Fig. 2.17.20 Level 1 DFD EEERISEEREAY D-vclopo dataflow diagram for burglar alarm system along wife relationship diagram. TRE Solution: 1) DED: Householder Fig. 2.17.21 Context diagram TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Fig. 2.17.22 Level 1 DFD TECHNICAL PUBLICATIONS® - an up-thrust for knowledge A Fig. 2.17.23 ER diagram Draw the use case and data flow diagrams for a restaurant system. The activities of restaurant system are listed below - Receive the customer food orders, produce the customer ordered foods, serve the cl with their ordered foods, collect payment from customers, store customer payment order raw materials for food products, pay for raw materials and pay for labour. 7 software Engineering 2-159 sol oriented. Requirements Analysis and Specification way art 1: Use case diagram : Place food order <>, uti’ System <> K Kitchen staff x Accounts database Manager JCATIONS® - an up-thnist for knowedg® ted Software Engineering Check for: inventory data ‘Order raw material for ood produ lventory manager Pay for raw material Pay for labour) Update inventory Part II : Data flow diagram : Refer example 2.17.2. Consider an ontine railway resereation system, which allows th route, book/cancel tickets using net banking/credit/Debit cards. The site also maintan of the passengers. For the above system, list and draw the use case scenario an specification using data flow diagram. : Solution : The use cases for the given railway reservation system are - 1. Logs in 2. Select route 3. Book or cancel tickets 4. View status 5. Logs out TECHN FECHNICAL PUBLICATIONS® an uptiust for knowedge are Engineering 2-164 Requirements Analysis and Specification. tw ,onented yoo case diagram is as follows - e use ne Reservation system in ticket XN Bank Passenger Admin Fig. 2.17.24 Use case diagram ‘The evel 0 and level 1 DFD can be as shown below — Ticket info Pas: Ticket /Reservation info / status History of passengers! Waiting info Fig, 2.17.25 Level 0 DFD TECHNICAL PUBLICATIONS® - an up-trust fr knowledge 2-162 Object Oriented Software Engineering User idfpassword Passenger Train details Account Makes details payment Validation Fig. 2.17.26 Level 1 DFD TECHNICAL PUBLICATIONS? - an updinas for knowledge jented Sofware Engineering 2-163 o - ; Requirements Analysis and Specification Consider an aniline book stores, It accepts individual/bulk orders, process Fe nonts, triggers delivery Of the books. Somte of the major features of the system include : i me order books e 7 User. friendly online shopping cart function Create, view, modify and delete books to be sold To store inventory and sales information in database To provide an efficient inventory system Register for book payment options request book delivery ‘Add a wish list Place request for books not available To be able to print invoices to members and print a set of summary reports Internet access. “Analyse the system using the context diagram and level 1 DED for the system. Explain the components of DED. Roemer olution : User 1D/ Fig. 2.17.27 Context level DFD Refer Fig, 2-17.28 on next page. Consider the process of ordering a pizzn over the phone. Draw the use case diagram and also sketch the activity diagram representing each step of the process, from the moment you pick up the phone to the point where you start eating pizza. Include activities that others need to perform. Add exception handling to the activity diagram you developed. Consider at least two exceptions (e.g. delivery person wrote down nas address, deliver person brings wrong pizza). olution : Use case diagram Refer Fig. 2.17.29 on page 2 - 165. ee TECHNICAL PUBLICATIONS® - an uptrust for knowedge Object Oriented Software Engineering Dect Oriented Software Enginoer User lOrPassword Order Book Register for book Payment Invoice Order Details, [] Order Details Fig. 2.17.28 Level 1 DFD nware Engineering 2-165 in Requirements Analysis and Specification onented Call Pizza shop For order Revise Topping Wait for Pizza Client Receive Pizza make Payment Fig. 2.17.29 Use case diagram for pizza ordering system TECHNICAL PUBLICATIONS® - an up-thrust for knowiedge Object Oriented Software Engineering __ Activity diagram [cancel order] Fig. 2.17.30 TECHNICAL PUBLICATIONS® - an upstrust for knowledge inoerrin 2 Engineering Requirements Analysis and Specification What isthe p ae a DED ? What are the components of DFD ? Construct EB following sym i shopping system for XYZ provides many series ails (0 its, ern _ Currently, XYZ staffs manually handle the eit i § oration with the use of basic ofc software, suchas Micros Ofces Word india results having mistakes easly andthe process is very inconvenient. cline shopping system has foe key features ete the user friendly online shopping cart function to members to replace hardcopy inventory and sales information in database to reduce the human mistakes, ‘0 § mecuracy and enhance the flexibility of information processing ; . provide ar efficient inventory system which can help the XYZ staffs to gain enough Pron to update the inventory ; in itl ae , ify to print incaices to members end print ast of summary reports for XY2's S07 yate that ens 0 maintain ond upgrade Addl Ediv delete order Request for report a User ardor payment? Inventory database view Diepay pom Fig. 2.17.32 TECHNICAL PUBLIGATIONS® - an up-tnust for knowledge 2-168 Requirements An; Object Oriented Software Engineering iJ Level 2 DFD : For manage order Request. 3:1 for logging data Response Logging Info. Request to view £32 data acknowledge Order cancellation ‘acknowledge Dispatching data FECHNICAL PUBLICATIONS® °8 Uta —— 10 knowled, — re Engineering oftwWa! Requirements Analysis and Specification. i oniented Ss or manage Items pp: F 2 Check Request for login data Logging database Logging info Inventory database Inventory database Inventory database Fig. 2.17.34 Inventory Database Logging Database Inventory Database ‘Order : Database Entry payment. details —— Payment Confirmation Fig. 2.17.35 vrgs sonware Engineering eet Requirements Analysis and Specification oii : i) Draw the Level 0 and Level 1 data flow diagram for the following system. actif entities in the system and draw a diagram showing the relationship between i) le onlities ooo Vending Machine (CVM) system requirements are as follows : The CVM i. 1g chocolates * 1) Very large Chocolates (VC) at € 15, 2) Large Chocolates (LC) at pie 3) a Small Chocolates (SC) at €5. The vending machine only. deals in coins. The ey joes the proper change after the product selection is made. The CVM must check the cm i deposited by the customer. The vending machine operates in the following Way. (A) it remains idle until a customer or owner begins to interact with the machine. When i vation button is pressed the VCM indicates the required amount (15¢, €10)-, €5).(B) : a full amount needed has been deposited then dispense the proper chocolate and display : Uae you! (C) If an insufficient amount (possibly zero) has been deposited then display : maining amount needed. (D) If an over amount has been ited them dispense the paper candy and change arid display: Thank You! Solution : Selects Makes chocolate | /Checslt®\ payment choco (ecto (cvm) Level 0 DFD Chocolate types Cust sustomer ‘nfo. Payment Change approval Request| ——_____— Chocolate _(Figpence Chocolate availabilty Chocolate Level 1 DFD Oriented Software Engineering Entities in the system are: 1) Customer 2) CVM 3) Chocolate 4) Menu 4 Software Engineering 2-173 Requirements Analysis and Specification , orients rie? forenc® between Structured Analysis and Object Oriented Analysis g pi gp structured analysis Object oriented analysis a analysis the process and data are: In object oriented analysis the process(methods)| a ste este d. and data are encapsulated in the form of object. ly 5; i ; ; pee vaadels that are. getting developed ‘in Various models that are geting, developed in Varios analysis az DAD, ER diagram and object oriented analysis are class diagram, use| rc case diagram, activity diagram and deployment aictionary : pata diagram. Modul: ing this desig ; lular systems can be developed using sim? kind of analysis. “suitable for large and complex projects. For large and complex system object oriented| Iris 0" oa approach is more suitable. pie acribe primary differences between structured analysis and object oriented analysi 1 Bo Two Marks Questions with Answers Q.1Write distinct steps in requirement engineering process. ns. : The distinct steps in requirement engineering process are 1. Requirements elicitation. 2. Requirements analysis. 3. Requirements validation. 4, Requirements management. Q2 Why SRS must be traceable? What is traceability requirement ? Ans. : There may be chances of having new requirements during development of the ptoeare Traceability is concerned with relationship between requirements their sources and the system design. Thus change in requirement is manageable if SRS is traceable. The traceability requirement is the relationship between dependent requirements. as ‘ e What are non-functional requirements for a software 7 8: ; - . Sietli non-functional requirements define system properties and constraints. Various les of a system can be reliability, response time, storage requirements, and Constraints of the s i a te "presentations, ystem can be input and output device capability, system Bt Qt¥ect Oriented Software Engineer Q.4 What is the outcome of feasibility stu0Y ? Ans. : The feasibility stucly decides whethe The outcome of feasibility study is the Fest 1. Whether system contribute: 2. Whether the system can be engi 3. Whether the system can be integra After performing the feasibility study a fe Ans. : Data flow diagram Data flow diagram is a graphical representation for representing the information flow and the transforms that are applied as data move from input to output. The data flow diagram is a collection of Process, data store, flow of data (transitions) and external entity. ‘The data flow diagrams are used to represent the system at any level of abstraction, and the increasing levels are used to expose more and more functionalities in the system. OR OR down ? confusion. environment. 2-174 the pro} 7 ite obtained from following questig s to organizational objec sjgored? Is it within the budget ? ted with other existing system 2 sibility study report is prepared, Q.5 Differentiate data flow diagram and state trans! Requirements analysis is unquestionably the most communication intensi software engineering proves. Why does the communication path fre customers spécify too many technical details and this may 2. There is difficulty in understanding the problem. Sometimes custom decide what are their needs and wants. Sometimes they ha understanding of capabilities and limitations the existing. Requirements Analysig posed system is worthwhile Gy cctives ? ition diagram. State transition diagram representation for representing of a system by depicting its events that cause the system The state transition diagram ig states and events. The state transition diagrams drawn at single level. They a expose the overall behaviour of FURIE ~" creates @ P cry ambiguities and omissions in the functional requirements. What questions would sent! at 1d «kt clarify these functional requirements 7 a eu the questions that must be asked to clarify the functional 1 isthe requirement specification clear ? Can it be misinterpreted ? . the sources of requirements ? Is the final requirement specification as 2, What are per the original source 2 3. Js there any requirement violation for domain constructs ? 4, What are they cross verified ? 5, For tracins quirement testable? the other related requirements of the current requirement ? And are ig the requirement is there any system model ? 6, Is the re 7 Has an index specification created for the requirements ? g. Is the requirement satisfying the system objective. requirements engineering. ascist out : us activities in requirement engineering are - ans. : Varior 1, Requirements elicitation 2. Requirements analysis 3, Requirements validation 4. Requirements management ne functional and non functional requirements. (Refer sections 2.2.1 and 2.2.2) 9.10 Give two examples of non functional requirements. ans. : Consider the Library Management System for which the two non functional Q9 Defi requirements can be - 1. The user who wishes to read the article on-line must be authenticated first. 2. The article must be displayed within 5 seconds. Q.11 What is the need for feasibility analysis 7 Ans, : The feasibility study is required to decide whether or not the proposed system is worthwhile to implement: Q.12 Define feasibility study and list the types. Ans, Definition : A feasibility study is a study made to decide whether or not the Proposed system is worthwhile. TECHNICAL PUBLICATIONS® - an up-thrist for knowledge Object Oriented Software Engineering __2-176_Reauirements Anaya Types : 1) Technical feasibility 2) Eeonomic feasibility 3) Schedule feasibility 4) Operational feasibility. Q.13 List the characteristics of good SRS. Es Ans.: 1) SRS must be correct. 2) SRS must be unambiguous, 3) SRS must be complete. 4) SRS must be consistent. 5) SRS must be traceable. Q.14 Classify the following as functional / non functional requirements, for banking 8) Verifying back balance 'b) Withdrawing money from bank ¢) Completion of transactions in less than one second. 4) Extending the system by providing more tellers for customers. Ans. : a) Functional requirement b) Functional requirement ©) Non-functional requirement —_d) Non-functional requirement, Q.15 What is the purpose of petrinet ? OR Define a petrinet. Ans. : Petrinets are rigorously used to define the system. There are three i) Places : Represent possible states of the system. ii) Transitions : Causes the change in the states. iii) Are: Connects a place with transition or transition with places. Q.16 Differentiate between normal and exciting requirements. Ans. Nornal requirements : The requirements as per goals and objectives of are called normal requirements. For example - Handling mouse and keyboard ¢ any GUI based system. y Exciting requirements : When certain requirements are satisfied by the softw. Customer's expectations then such requirements are called exciting req example - In word processing software system if there are some exceptional facilities then it falls in exciting requirements category. Q.17 Draw a use case diagram for an online shopping which should provide provisi registering, authenticating the customers and also for online payment through Payment gateway like Paypal. TECHNICAL PUBLICATIONS® - an up.thrst for knowledge gineering Sate. Requirements Analysis and Specification ro Enk nto te Online Shopping Make Payment eugoneh through Paypal Fig. 2.18.4 ane Quality Function Development (QDF). in 380° tion deployment is a quality management technique which translates the cet needs and wants into technical requirements. This technique was introduced in an. _ praw the context flow graph of a ATM automation system. Sem] Root ca ‘ATM System. Fig. 2.18.2 Q.20 State two advantages of using Petri Nets Ans. : 1) It specifies the precise definition of problem 2) It represents the graphical workflow. Q.21 How does data flow diagram help in design of software system ? Ans.: The data flow models are used to model the information and function domain. Refinement of DED into greater levels help the analyst to perform functional decomposition, —. TECHNICAL PUBLIGATIONS® - an up-thrsst for knowledge 4.23 Name any two requirements of elicitation techniques. Ans.: 1). Use eases : Developing use cases or user stories to describe spec requirements from a user's perspective. 2) Questioning : Continuous asking questions to and seeking day stakeholders during requirements discussions to ensure underg requirements ; Q.24 Mention the steps involved in requirements elicitation and analysis, Ans. : The steps are as follows - 1) Requirement discovery 2) Requirements classification and discovery 3) Requirements prioritisation 4) Requirement documentation TECHNICAL PUBLICATIONS® - an, ‘up-thrust for knowledge

You might also like