Saturday, December 7, 2019
Significance of the Study Sample free essay sample
The user enters a five-digit PIN using the keypad. If the user enters a valid account number and the correct PIN for that account, the screen displays the main menu. If the user enters an invalid account number or an incorrect PIN, the screen displays an appropriate message, then the ATM returns to Step 1 to restart the authentication process. After the ATM authenticates the user, the main menu contains numbered options for the three types of transactions: balance inquiry (option 1), withdrawal (option 2) and deposit (option 3). It also should contain an option to allow the user to exit the system (option 4). The user then chooses either to perform a transaction (by entering 1, 2 or 3) or to exit the system (by entering 4). If the user enters 1 to make a balance inquiry, the screen displays the userââ¬â¢s account balance. To do so, the ATM must retrieve the balance from the bankââ¬â¢s database. The following steps describe what occurs when the user enters 2 to make a withdrawal: The screen displays a menu of standard withdrawal amounts and an option to cancel the transaction. The user enters a menu selection using the keypad. If the withdrawal amount is greater than the userââ¬â¢s account balance, the screen displays a message stating this and telling the user to choose a smaller amount. The ATM then returns to Step 1. If the withdrawal amount chosen is less than or equal to the userââ¬â¢s account balance (i. e. , an acceptable amount), the ATM proceeds to Step 4. If the user chooses to cancel, the ATM displays the main menu and waits for user input. If the cash dispenser contains enough cash, the ATM proceeds to Step 5. Otherwise, the screen displays a message indicating the problem and telling the user to choose a smaller withdrawal amount. The ATM then returns to Step 1. The ATM debits the withdrawal amount from the userââ¬â¢s account in the bankââ¬â¢s database. The cash dispenser dispenses the desired amount of money to the user. The screen displays a message reminding the user to take the money. The following steps describe the actions that occur when the user enters 3 to make a deposit: The screen prompts the user to enter a deposit amount or type 0 (zero) to cancel. The user enters a deposit amount or 0 using the keypad. If the user specifies a deposit amount, the ATM proceeds to Step 4. If the user chooses to cancel the transaction (by entering 0), the ATM displays the main menu and waits for user input. The screen displays a message telling the user to insert a deposit envelope. If the deposit slot receives a deposit envelope within two minutes, the ATM credits the deposit amount to the userââ¬â¢s account in the bankââ¬â¢s database (i. e. , adds the deposit amount to the userââ¬â¢s account balance). After the system successfully executes a transaction, it should return to the main menu so that the user can perform additional transactions. If the user exits the system, the screen should display a thank you message, then display the welcome message for the next user. Analyzing the ATM System The preceding statement is a simplified example of a requirements document Typically the result of a detailed process of requirements gathering A systems analyst might interview banking experts to gain a better understanding of what the software must do would use the information gained to compile a list of system requirements to guide systems designers as they design the system. The software life cycle specifies the stages through which software goes from the time itââ¬â¢s first conceived to the time itââ¬â¢s retired from use. These stages typically include: analysis, design, implementation, testing and debugging, deployment, maintenance and retirement. Several software life-cycle models exist Waterfall models perform each stage once in succession Iterative models may repeat one or more stages several times throughout a productââ¬â¢s life cycle The analysis stage focuses on defining the problem to be solved. When designing any system, one must solve the problem right, but of equal importance, one must solve the right problem. Our requirements document describes the requirements of our ATM system in sufficient detail that you need not go through an extensive analysis stageââ¬âitââ¬â¢s been done for you. Use case modeling identifies the use cases of the system, each representing a different capability that the system provides to its clients. ââ¬Å"View Account Balanceâ⬠ââ¬Å"Withdraw Cashâ⬠ââ¬Å"Deposit Fundsâ⬠Each use case describes a typical scenario for which the user uses the system. A use case diagram models the interactions between a systemââ¬â¢s clients and its use cases. Shows the kinds of interactions users have with a system without providing the details Often accompanied by informal text that gives more detailââ¬âlike the text that appears in the requirements document. Produced during the analysis stage of the software life cycle. Stick figure represents an actor, which defines the roles that an external entityââ¬âsuch as a person or another systemââ¬âplays when interacting with the system. During the analysis stage, systems designers focus on understanding the requirements document to produce a high-level specification that describes what the system is supposed to do. The output of the design stageââ¬âa design specification specifies clearly how the system should be constructed to satisfy these requirements. In the next several sections, we perform the steps of a simple object-oriented design (OOD) process on the ATM system to produce a design specification containing a collection of UML diagrams and supporting text. We present our own simplified design process A system is a set of components that interact to solve a problem. System structure describes the systemââ¬â¢s objects and their interrelationships. System behavior describes how the system changes as its objects interact with one another. Every system has both structure and behaviorââ¬â designers must specify both. The UML 2 standard specifies 13 diagram types for documenting the system models. Each models a distinct characteristic of a systemââ¬â¢s structure or behaviorââ¬âsix diagrams relate to system structure, the remaining seven to system behavior. We are interested in two of the six diagram types: Use case diagrams model the interactions between a system and its external entities (actors) in terms of use cases. Class diagrams model the classes, or ââ¬Å"building blocks,â⬠used in a system. Identify the classes that are needed to build the system by analyzing the nouns and noun phrases that appear in the requirements document. We introduce UML class diagrams to model these classes. Important first step in defining the systemââ¬â¢s structure. Review the requirements document and identify key nouns and noun phrases to help us identify classes that comprise the ATM system. We may decide that some of these nouns and noun phrases are actually attributes of other classes in the system. We may also conclude that some of the nouns do not correspond to parts of the system and thus should not be modeled at all. Additional classes may become apparent to us as we proceed through the design process. We create classes only for the nouns and noun phrases that have significance in the ATM system. Though the requirements document frequently describes a ââ¬Å"transactionâ⬠in a general sense, we do not model the broad notion of a financial transaction at this time. Instead, we model the three types of transactions (i. e. , ââ¬Å"balance inquiry,â⬠ââ¬Å"withdrawalâ⬠and ââ¬Å"depositâ⬠) as individual classes. These classes possess specific attributes needed for executing the transactions they represent. Classes: ATM screen keypad cash dispenser deposit slot account bank database balance inquiry withdrawal deposit The UML enables us to model, via class diagrams, the classes in the ATM system and their interrelationships. Each class is modeled as a rectangle with three compartments. The top one contains the name of the class centered horizontally in boldface. The middle compartment contains the classââ¬â¢s attributes. The bottom compartment contains the classââ¬â¢s operations. The UML allows the suppression of class attributes and operations in this manner to create more readable diagrams, when appropriate. Class diagrams also show the relationships between the classes of the system. The solid line that connects the two classes represents an association between classes. The numbers near each end of the line are multiplicity values, which indicate how many objects of each class participate in the association. An association can be named. The word Executes above the line connecting classes ATM and Withdrawal in Fig. 12. 7 indicates the name of that association. This part of the diagram reads ââ¬Å"one object of class ATM executes zero or one objects of class Withdrawal. â⬠Association names are directional, as indicated by the filled arrowhead. The word currentTransaction at the Withdrawal end of the association line is a role name, identifying the role the Withdrawal object plays in its relationship with the ATM. A role name adds meaning to an association between classes by identifying the role a class plays in the context of an association. A class can play several roles in the same system. Role names in class diagrams are often omitted when the meaning of an association is clear without them. Solid diamonds attached to the ATM classââ¬â¢s association lines indicate that ATM has a composition relationship with classes Screen, Keypad, CashDispenser and DepositSlot. Composition implies a whole/part relationship. The class that has the composition symbol (the solid diamond) on its end of the association line is the whole (in this case, ATM), and the classes on the other end of the association lines are the parts. Composition relationships have the following properties: Only one class in the relationship can represent the whole The parts in the composition relationship exist only as long as the whole does, and the whole is responsible for the creation and destruction of its parts. A part may belong to only one whole at a time, although it may be removed and attached to another whole, which then assumes responsibility for the part. If a has-a relationship does not satisfy one or more of these criteria, the UML specifies that hollow diamonds be attached to the ends of association lines to indicate aggregationââ¬âa weaker form of composition. Class ATM has a one-to-one relationship with class BankDatabaseââ¬âone ATM object authenticates users against one BankDatabase object. The bankââ¬â¢s database contains information about many accountsââ¬âone BankDatabase object participates in a composition relationship with zero or more Account objects. The multiplicity value 0.. * at the Account end of the association between class BankDatabase and class Account indicates that zero or more objects of class Account take part in the association. Class BankDatabase has a one-to-many relationship with class Accountââ¬âthe BankDatabase contains many Accounts. Class Account has a many-to-one relationship with class BankDatabaseââ¬âthere can be many Accounts stored in the BankDatabase. At any given time 0 or 1 Withdrawal objects can exist. If the user is performing a withdrawal, ââ¬Å"one object of class Withdrawal accesses/modifies an account balance through one object of class BankDatabase. â⬠All other parts of the system must interact with the database to retrieve or update account information. Classes have attributes (data) and operations (behaviors). Class attributes are implemented in Java programs as fields, and class operations are implemented as methods. In this section, we determine many of the attributes needed in the ATM system. Look for descriptive words and phrases in the requirements document. For each such word and phrase we find that plays a significant role in the ATM system, we create an attribute and assign it to one or more of the classes identified earlier. We also create attributes to represent any additional data that a class may need, as such needs become clear. Next the list the words or phrases from the requirements document that describe each class. For real problems in industry, there is no guarantee that requirements documents will be precise enough for the object-oriented systems designer to determine all the attributes or even all the classes. The need for additional classes, attributes and behaviors may become clear as the design process proceeds. Attributes represent an objectââ¬â¢s state. We identify some key states that our objects may occupy and discuss how objects change state in response to various events occurring in the system. We also discuss the workflow, or activities, that objects perform in the ATM system, and we present the activities of BalanceInquiry and Withdrawal transaction objects. An operation is a service that objects of a class provide to clients (users) of the class.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.