.

Monday, March 11, 2019

Review of related literature about billing system Essay

Create editable date lead with Rational softw be package couturier Create editable rank draws with Rational Softw be Architect Whats recent in Rational Softw atomic number 18 Architect 8.5 and Design Manager 4 beta Notice the inventing in my relation above Ad prefered 2.0 Draft stipulation of UML. It is true that the condition is still in draft status, hardly the key is that the Draft Specification has been adopted by OMG, a consortium that does non adopt new samples until they become pretty solid. There ordain be some changes to the specification before UML 2 is managely adopted, but these changes should be minimal. The main changes ordain be in the internals of UMLinvolving features typi describey white plagued by softw ar companies who see UML tools. The main purpose of this article is to continue our pore on the intrinsic UML plats this month, we take a close see to it at the chronological epoch plat. enjoy note, again, that the spokespersons provided below are based on the new UML 2 specification. The draws purposeThe order plot is partd primarily to describe the interactions betwixt disapproves in the sequential holy order that those interactions give-up the ghost. Much similar the severalize plot, developers typic solelyy think while diagrams were meantexclusively for them. However, an organizations chore staff feces understand while diagrams useful to communicate how the demarcation currently works by showing how various business tendencys interact. also documenting an organizations current affairs, a business- direct chronological succession diagram potentiometer be use as a requirements document to communicate requirements for a future strategy of rules implementation. During the requirements phase of a project, analysts atomic number 50 take use cases to the next take by providing a to a great extent formal level of refinement. When that occurs, use cases are often gauzy into one or more age diagrams.An organizations technical staff burn run a risk range diagrams useful in documenting how a future system should be eat up. During the externalize phase, architects and developers can use the diagram to force out the systems tendency interactions, thus fleshing out overall system blueprint. One of the capital uses of time diagrams is in the transition from requirements expressed as use cases to the next and more formal level of refinement. Use cases are often refined into one or more installment diagrams. In sum to their use in designing new systems, chronological succession diagrams can be apply to document how goals in an existing (call it legacy) system currently interact. This credentials is rattling useful when transitioning a system to some other person or organization. plunk for to spendThe notationSince this is the first article in my UML diagram series that is based on UML 2, we need to first discuss an summation to the notation in UML 2 diagrams, figure of speechly a notation chemical atom called a install. The skeletal system fraction is used as a home for m whatsoever other diagram brokers in UML 2, but the first dis beat roughly people will encounter a frame element is as the graphical boundary of a diagram. A frame element provides a consistent range for a diagrams label, eon providing a graphical boundary for the diagram. The frame element is facultative in UML diagrams as you can see in material bodys 1 and 2, the diagrams label is place in the top leftover corner in what Ill call the frames namebox, a sort of worn rectangle, and the actual UML diagram is defined within the body of the larger wrap rectangle. augur 1 An empty UML 2 frame elementIn addition to providing a visual border, the frame element also has an cardinal functional use in diagrams depicting interactions, such as the period diagram. On instalment diagrams incoming and outgoing pass ons (a.k.a. interactions) for a sequenc e can be sculptured by connecting the contentednesss to the border of the frame element (as seen in approach pattern 2). This will be espouse in more gunpoint in the Beyond the basics section below. get into 2 A sequence diagram that has incoming and outgoing centresNotice that in externalize 2 the diagrams label begins with the letters sd, for range plat. When use a frame element to enclose a diagram, the diagrams label necessitate to follow the format of Diagram image Diagram NameThe UML specification provides specific text time time appreciates for diagram types (e.g., sd = Sequence Diagram, activity = bodily function Diagram, and use case = Use Case Diagram). Back to topThe basicsThe main purpose of a sequence diagram is to define event sequences that result in some desired outcome. The focus is little on mental aims themselves and more on the order in which passs occur neertheless, to the highest degree sequence diagrams will communicate what capacitys a re send in the midst of a systems objects as well as the order in which they occur. The diagram conveys this information along the horizontal and upright quietuss the vertical dimension shows, top down, the time sequence of messages/calls as they occur, and the horizontal dimension shows, left to right, the object voices that the messages are sent to. Life delineatesWhen drawing a sequence diagram, life line notation elements are hardened across the top of the diagram. Lifelines fend for either roles or object typesetters cases that participate in the sequence creation baby-sited. Note In fully graveled systems the objects (instances of grades) will also be modeled on a systems class diagram. Lifelines are bony as a box with a dashed line go from the center of the bottom edge ( interpret 3). The lifelines name is displace inside the box. encipher 3 An example of the Student class used in a lifeline whose instance name is freshmanThe UML standard for naming a lifeline follows the format of Instance Name household NameIn the example shown in enter 3, the lifeline represents an instance of the class Student, whose instance name is freshman. Note that, here, the lifeline name is accentd. When an underline is used, it mode that the lifeline represents a specific instance of a class in a sequence diagram, and not a particular physique of instance (i.e., a role). In a future article well look at structure modeling. For now, just observe that sequence diagrams may accept roles (such as buyer and seller) without specifying who plays those roles (such as Bill and Fred). This allows diagram reuse in different contexts. Simply put, instance names in sequence diagrams are underlined roles names are not. Our example lifeline in Figure 3 is a named object, but not all lifelines represent named objects. Instead a lifeline can be used to represent an anonymous or unnamed instance.When modeling an unnamed instance on a sequence diagram, the lifelines name f ollows the same pattern as a named instance but instead of providing an instance name, that portion of the lifelines name is left blank. Again indicatering to Figure 3, if the lifeline is representing an anonymous instance of the Student class, the lifeline would be Student. Also, because sequence diagrams are used during the design phase of projects, it is completely legitimate to have an object whose type is unspecified for example, freshman. MessagesThe first message of a sequence diagram al trends starts at the top and is typically located on the left side of the diagram for readability. Subsequent messages are and so added to the diagram slightly lower hence the previous message. To show an object (i.e., lifeline) displace a message to another object, you draw a line to the receiving object with a solid arrowhead (if a synchronous call operation) or with a stick arrowhead (if an asynchronous signal). The message/method name is placed above the arrowed line. The message tha t is be sent to the receiving object represents an operation/method that the receiving objects class implements. In the example in Figure 4, the analyst object retraces a call to the system object which is an instance of the ReportingSystem class. The analyst object is calling the system objects getAvailableReports method. The system object thence calls the getSecurityClearance method with the line of merchandise of userId on the secSystem object, which is of the class type SecuritySystem. Note Whenreading this sequence diagram, assume that the analyst has already logged into the system. Figure 4 An example of messages macrocosm sent surrounded by objectsBesides just showing message calls on the sequence diagram, the Figure 4 diagram includes mother messages. These expire messages are excerptal a return message is force as a dotted line with an open arrowhead back to the originating lifeline, and above this dotted line you place the return value from the operation. In Figur e 4 the secSystem object returns userClearance to the system object when the getSecurityClearance method is called. The system object returns availableReports when the getAvailableReports method is called. Again, the return messages are an woofal part of a sequence diagram. The use of return messages depends on the level of detail/abstraction that is being modeled. Return messages are useful if better detail is required otherwise, the invocation message is sufficient. I personally like to include return messages whenever a value will be returned, because I find the extra details make a sequence diagram easier to read.When modeling a sequence diagram, there will be measure that an object will need to send a message to itself. When does an object call itself? A purist would argue that an object should never send a message to itself. However, modeling an object sending a message to itself can be useful in some cases. For example, Figure 5 is an better version of Figure 4. The Figure 5 version shows the system object calling its determineAvailableReports method. By showing the system sending itself the message determineAvailableReports, the model draws attention to the fact that this impact takes place in the system object. To draw an object calling itself, you draw a message as you would normally, but instead of connecting it to another object, you connect the message back to the object itself. Figure 5 The system object calling its determineAvailableReports methodThe example messages in Figure 5 show synchronous messages however, in sequence diagrams you can model asynchronous messages, too. An asynchronous message is drawn similar to a synchronous one, but the messages line is drawn with a stick arrowhead, as shown in Figure 6. Figure 6 A sequence diagram pall showing an asynchronous message being sent to instanceGuardsWhen modeling object interactions, there will be time when a condition must be met for a message to be sent to the object. Guards are use d through and throughout UML diagrams to control flow. Here, I will discuss shields in both UML 1.x as well as UML 2.0. In UML 1.x, a vindication could only be assigned to a single message. To draw a ward on a sequence diagram in UML 1.x, you placed the keep back element above the message line being concured and in front of the message name. Figure 7 shows a come apart of a sequence diagram with a guard on the message addStudent method. Figure 7 A element of a UML 1.x sequence diagram in which the addStudent message has a guardIn Figure 7, the guard is the text onetime(prenominal)Due proportion = 0. By having the guard on this message, the addStudent message will only be sent if the billhooks receivable system returns a preceding(a) due equaliser of zero. The notation of a guard is very simple the format is Boolean TestFor example,pastDueBalance = 0 feature dispels ( picks, excerptions, and kinks)In most sequence diagrams, however, the UML 1.x in-line guard is not suff icient to handle the logic required for a sequence being modeled. This lack of functionality was a problem in UML 1.x. UML 2 has addressed this problem by removing the in-line guard and adding a notation element called a Combined Fragment. A combined crack is used to separate sets of messages together to show conditional flow in a sequence diagram. The UML 2 specification identifies 11 interaction types for combined fragments. Three of the cardinal will be cover here in The fundamental principle section, devil more types will be covered in the Beyond The Basics section, and the remaining six I will leave to be covered in another article. (Hey, this is an article, not a book. I necessity you to eat this piece in one day) AlternativesAlternatives are used to specify a mutually exclusive choice between deuce or more message sequences. Note It is indeed attainable for two or more guard conditions habituated to different alternative operands to be true at the sametime, but at most only one operand will actually occur at run time (which alternative wins in such cases is not defined by the UML standard). Alternatives allow the modeling of the clean if then else logic (e.g., if I buy three items, then I get 20% off my purchase else I get 10% off my purchase). As you will notice in Figure 8, an alternative combine fragment element is drawn exploitation a frame. The word alt is placed inside the frames namebox. The larger rectangle is then divided into what UML 2 calls operands. Note Although operands look a lot like lanes on a highway, I specifically did not call them lanes.Swim lanes are a UML notation used on activity diagrams. Please refer to The Rational Edges earlier article about Activity Diagrams. Operands are unaffectionate by a dashed line. Each operand is effrontery a guard to test against, and this guard is placed towards the top left section of the operand on top of a lifeline. Note Usually, the lifeline to which the guard is attached is t he lifeline that owns the variable that is included in the guard expression. If an operands guard equates to true, then that operand is the operand to follow. Figure 8 A sequence diagram fragment that contains an alternative combination fragmentAs an example to show how an alternative combination fragment is read, Figure 8 shows the sequence starting at the top, with the bank object getting the checks amount and the grades balance. At this point in the sequence the alternative combination fragment takes over. Because of the guard balance = amount, if the greenbacks balance is great than or equal to the amount, then the sequence continues with the bank object sending the add accountTransaction and storePhotoOfCheck messages to the account object. However, if the balance is not greater than or equal to the amount, then the sequence proceeds with the bank object sending the addInsuffientFundFee and noteReturned Check message to the account object and the returnCheck message to itsel f. The second sequence is called when the balance is not greater than or equal to the amount because of the else guard. In alternative combination fragments, the else guard is not required and if an operand does not have an explicit guard on it, then the else guard is to be assumed. Alternative combination fragments are not limited to simple if then else tests. There can be as many alternative paths as are needed. If more alternatives are needed, all you must do is add an operand to therectangle with that sequences guard and messages. pickThe option combination fragment is used to model a sequence that, given a certain condition, will occur otherwise, the sequence does not occur. An option is used to model a simple if then statement (i.e., if there are fewer than five donuts on the shelf, then make two dozen more donuts). The option combination fragment notation is similar to the alternation combination fragment, except that it only has one operand and there never can be an else gu ard (it just does not make spirit here). To draw an option combination you draw a frame. The text opt is placed inside the frames namebox, and in the frames content area the options guard is placed towards the top left corner on top of a lifeline. Then the options sequence of messages is placed in the remainder of the frames content area. These elements are illustrated in Figure 9. Figure 9 A sequence diagram fragment that includes an option combination fragment culture an option combination fragment is easy. Figure 9 is a reworking of the sequence diagram fragment in Figure 7, but this time it uses an option combination fragment because more messages need to be sent if the learners past due balance is equal to zero. According to the sequence diagram in Figure 9, if a students past due balance equals zero, then the addStudent, getCostOfClass, and chargeForClass messages are sent. If the students past due balance does not equal zero, then the sequence skips sending any of the messa ges in the option combination fragment. The example Figure 9 sequence diagram fragment includes a guard for the option however, the guard is not a required element. In high-level, abstract sequence diagrams you power not want to specify the condition of the option. You may simply want to indicate that the fragment is optional. LoopsOccasionally you will need to model a repetitive sequence. In UML 2, modeling a repeating sequence has been alter with the addition of the hand-build combination fragment. The loop combination fragment is very similar in appearance to the option combination fragment. You draw a frame, and in the frames namebox the text loop is placed. Inside the frames content area the loops guard is placed towards the top left corner, on top of alifeline. Note As with the option combination fragment, the loop combination fragment does not require that a guard condition be placed on it. Then the loops sequence of messages is placed in the remainder of the frames content area. In a loop, a guard can have two special conditions tested against in addition to the standard Boolean test. The special guard conditions are minimum iterations written as minint = the number (e.g., minint = 1) and maximum iterations written as maxint = the number (e.g., maxint = 5). With a minimum iterations guard, the loop must execute at least the number of times indicated, whereas with a maximum iterations guard the number of loop executions cannot exceed the number. Figure 10 An example sequence diagram with a loop combination fragmentLarger view of Figure 10.The loop shown in Figure 10 executes until the reportsEnu objects hasAnotherReport message returns false. The loop in this sequence diagram uses a Boolean test to verify if the loop sequence should be run. To read this diagram, you start at the top, as normal. When you get to the loop combination fragment a test is done to see if the value hasAnotherReport equals true. If the hasAnotherReport value equals true, then the sequence goes into the loop fragment. You can then follow the messages in the loop as you would normally in a sequence diagram Back to topBeyond the basicsIve covered the basics of the sequence diagram, which should allow you to model most of the interactions that will take place in a common system. The following section will cover more advanced notation elements that can be used in a sequence diagram. Referencing another sequence diagramWhen doing sequence diagrams, developers neck to reuse existing sequence diagrams in their diagrams sequences. Note It is possible to reuse a sequence diagram of any type (e.g., programming or business). I just find that developers like to functionally fly the coop down their diagrams more. Starting in UML 2, the Interaction Occurrence element was introduced. The addition of interaction occurrences is arguably the most important innovation in UML 2 interactions modeling. Interaction occurrences add theability to compose primitive sequence dia grams into thickening sequence diagrams. With these you can combine (reuse) the simpler sequences to produce more complex sequences. This means that you can abstract out a complete, and possibly complex, sequence as a single conceptual unit. An interaction occurrence element is drawn using a frame. The text ref is placed inside the frames namebox, and the name of the sequence diagram being bring upd is placed inside the frames content area along with any line of reasonings to the sequence diagram. The notation of the referenced sequence diagrams name follows the pattern of sequence diagram nameTwo examples1. Retrieve Borrower faith Report(ssn) borrower characterReport or2. Process Credit Card(name, number, expirationDate, amount 100) In example 1, the syntax calls the sequence diagram called Retrieve Borrower Credit Report and passes it the parameter ssn. The Retreive Borrower Credit Report sequence returns the variable borrowerCreditReport. In example 2, the syntax calls the sequence diagram called Process Credit Card and passes it the parameters of name, number, expiration date, and amount. However, in example 2 the amount parameter will be a value of 100. And since example 2 does not have a return value labeled, the sequence does not return a value (presumably, the sequence being modeled does not need the return value). Figure 11 A sequence diagram that references two different sequence diagramsFigure 11 shows a sequence diagram that references the sequence diagrams Balance hunting and Debit banknote. The sequence starts at the top left, with the customer sending a message to the teller object. The teller object sends a message to the theirBank object. At that point, the Balance lookup sequence diagram is called, with the accountNumber passed as a parameter. The Balance search sequence diagram returns the balance variable. Then the option combination fragments guard condition is checked to verify the balance is greater then the amount variable. In cases where the balance is greater than the amount, the Debit Account sequence diagram is called, passing it the accountNumber and the amount as parameters. After that sequence is complete, the withdrawCash message returns cash to the customer.It is important to notice in Figure 11 that the lifeline of theirBank is hidden by the interaction occurrence Balance Lookup. Because the interaction occurrence hides the lifeline, that means that the theirBank lifeline is referenced in the Balance Lookup sequence diagram. In addition to hiding the lifeline in the interaction occurrence, UML 2 also specifies that the lifeline must have the same theirBank in its own Balance Lookup sequence. There will be times when you model sequence diagrams that an interaction occurrence will overlap lifelines that are not referenced in the interaction occurrence. In such cases the lifeline is shown as a normal lifeline and is not hidden by the overlapping interaction occurrence. In Figure 11, the sequence r eferences the Balance Lookup sequence diagram. The Balance Lookup sequence diagram is shown in Figure 12. Because the example sequence has parameters and a return value, its label located in the diagrams nameboxfollows a specific pattern Diagram Type Diagram NameTwo examples1. SD Balance Lookup(Integer accountNumber) Real2. SD Available Reports(Financial psychoanalyst analyst) ReportsFigure 12 illustrates example 1, in which the Balance Lookup sequence uses parameter accountNumber as a variable in the sequence, and the sequence diagram shows a Real object being returned. In cases such as this, where the sequence returns an object, the object being returned is given the instance name of the sequence diagram. Figure 12 A sequence diagram that takes the parameter of accountNumber and returns a Real objectFigure 13 illustrates example 2, in which a sequence takes a parameter and returns an object. However, in Figure 13 the parameter is used in the sequences interaction. Figure 13 A sequence diagram that uses its parameter in its interaction and returns a Reports objectLarger view of Figure 13.GatesThe previous section showed how to reference another sequence diagram bypassing information through parameters and return values. However, there is another way to pass information between sequence diagrams. Gates can be an easy way to model the passing of information between a sequence diagram and its context. A gate is merely a message that is illustrated with one end machine-accessible to the sequence diagrams frames edge and the other end affiliated to a lifeline. A reworking of Figures 11 and 12 using gates can be seen in Figures 14 and 15. The example diagram in Figure 15 has an entry gate called getBalance that takes the parameter of accountNumber. The getBalance message is an entry gate, because it is the arrowed line that is connected to the diagrams frame with the arrowhead connected to a lifeline. The sequence diagram also has an exit gate that returns t he balance variable. The exit gate is known, because its a return message that is connected from a lifeline to the diagrams frame with the arrowhead connected to the frame. Figure 14 A reworking of Figure 11, using gates this timeFigure 15 A reworking of Figure 12, using gates this timeCombined fragments ( go wrong and parallel)In the basics section presented earlier in this paper, I covered the combined fragments known as alternative, option, and loop. These three combined fragments are the ones most people will use the most. However, there are two other combined fragments that a large share of people will find useful give off and parallel. BreakThe break combined fragment is close to identical in every way to the option combined fragment, with two exceptions. First, a breaks frame has a namebox with the text break instead of option. Second, when a break combined fragments message is to be executed, the enclosing interactions remainder messages will not be executed because the s equence breaks out of the enclosing interaction. In this way the break combined fragment is much like the break keyword in a programming language like C++ or Java. Figure 16 A reworking of the sequence diagram fragment from Figure 8, with the fragment using a break instead of an alternativeBreaks are most commonly used to model exception handling. Figure 16 is areworking of Figure 8, but this time Figure 16 uses a break combination fragment because it treats the balance amount condition as an exception instead of as an alternative flow. To read Figure 16, you start at the top left corner of the sequence and read down. When the sequence gets to the return value balance, it checks to see if the balance is less than the amount. If the balance is not less than the amount, the next message sent is the addDebitTransaction message, and the sequence continues as normal. However, in cases where the balance is less than the amount, then the sequence enters the break combination fragment and its messages are sent. Once all the messages in the break combination have been sent, the sequence exits without sending any of the remaining messages (e.g., addDebitTransaction). An important thing to note about breaks is that they only cause the exiting of an enclosing interactions sequence and not necessarily the complete sequence depicted in the diagram. In cases where a break combination is part of an alternative or a loop, then only the alternative or loop is exited. ParallelTodays modern reckoner systems are advancing in complexity and at times perform concurrent tasks. When the processing time required to complete portions of a complex task is longer than desired, some systems handle part of the processing in parallel. The parallel combination fragment element needs to be used when creating a sequence diagram that shows parallel processing activities. The parallel combination fragment is drawn using a frame, and you place the text par in the frames namebox. You then break up the frames content section into horizontal operands separated by a dashed line. Each operand in the frame represents a thread of execution done in parallel. Figure 17 A microwave is an example of an object that does two tasks in parallel composition Figure 17 may not illustrate the best computer system example of an object doing activities in parallel, it offers an easy-to-understand example of a sequence with parallel activities. The sequence goes like this A hungryPerson sends the cookFood message to the oven object. When the oven object receives that message, it sends two messages to itself at the same time (nukeFood and rotateFood). After both of these messages are done, thehungryPerson object is returned yummyFood from the oven object.

No comments:

Post a Comment