1. The design team at Janes Technologies has created the
prototype for the InfoSuper bank ATM system. Now, the InfoSuper bank wants the
team to model the static structure of the system. For this, the team needs to
derive classes and relationships from the use cases of the ATM machine and create
the corresponding class diagram. Help the team at Janes Technologies to perform
this task.
Solution
To create the required class diagram, you need to perform the following tasks:
1. Identify the classes with their attributes and methods.
2. Identify the relationships between the classes.
Identifying the Classes with Their Attributes and Methods
The following classes can be created for the ATM system:
• ATM Card: Maintains the details of the ATM card, such as pin and card id. It performs the actions of accepting PIN from the user, validating PIN based on the information stored in the database, and updating PIN on user demand.
• ATM: Maintains the details of the ATM machine, such as its location, bank branch, and available cash. It performs the actions of making a transaction from the ATM, such as accepting the card, reading the card, accepting PIN. withdrawing cash, and printing transaction summary.
• Account: Maintains the details of an account, such as the account number, and balance. It performs the actions of retrieving the account details and checking and updating account balance.
• Current Account: Maintains the details of the current account. Apart from the details mentioned in the Account class, it also includes an additional attribute for maintaining the overdraft limit for the current account.
• Saving Account: Maintains the details of the savings account. Apart from the actions mentioned in the Account class, it also calculates the rate of interest for the savings account type.
• Bank Customer: Maintains the details of the bank customer, such as customer name, phone number, and email address. It performs the actions of retrieving and updating the customer details.
• Address: Maintains the details of the address of the bank customer, such as house number, city, state, country, and zip code. It performs the actions of retrieving and updating the address details.
Identifying the Relationships Between the Classes
The following relationships can exist between the classes of the system:
• Each ATM card is associated with an account. Therefore, the ATM Card class has one-to-one association relationship with the Account class.
• ATM verifies whether an ATM card is valid or not. Therefore, the ATM class has a directed association relationship with the ATM Card class.
• A bank customer uses ATM for money transactions. Therefore, the Bank Customer has a directed association relationship with the ATM class.
• An account can be of the type, current or savings. The accounts have some common as well as different attributes. Therefore, there are two classes. Current Account and Savings Account, which generalize to form the Account class.
• A customer can have multiple bank accounts. In addition, one account can be associated with multiple account holders. Therefore, the Bank Customer class has a many-to-many association relationship with the Account class.
• A bank customer can have one permanent address. Therefore, the Bank Customer class has a one-to-one composition relationship with the Address class
Solution
To create the required class diagram, you need to perform the following tasks:
1. Identify the classes with their attributes and methods.
2. Identify the relationships between the classes.
Identifying the Classes with Their Attributes and Methods
The following classes can be created for the ATM system:
• ATM Card: Maintains the details of the ATM card, such as pin and card id. It performs the actions of accepting PIN from the user, validating PIN based on the information stored in the database, and updating PIN on user demand.
• ATM: Maintains the details of the ATM machine, such as its location, bank branch, and available cash. It performs the actions of making a transaction from the ATM, such as accepting the card, reading the card, accepting PIN. withdrawing cash, and printing transaction summary.
• Account: Maintains the details of an account, such as the account number, and balance. It performs the actions of retrieving the account details and checking and updating account balance.
• Current Account: Maintains the details of the current account. Apart from the details mentioned in the Account class, it also includes an additional attribute for maintaining the overdraft limit for the current account.
• Saving Account: Maintains the details of the savings account. Apart from the actions mentioned in the Account class, it also calculates the rate of interest for the savings account type.
• Bank Customer: Maintains the details of the bank customer, such as customer name, phone number, and email address. It performs the actions of retrieving and updating the customer details.
• Address: Maintains the details of the address of the bank customer, such as house number, city, state, country, and zip code. It performs the actions of retrieving and updating the address details.
Identifying the Relationships Between the Classes
The following relationships can exist between the classes of the system:
• Each ATM card is associated with an account. Therefore, the ATM Card class has one-to-one association relationship with the Account class.
• ATM verifies whether an ATM card is valid or not. Therefore, the ATM class has a directed association relationship with the ATM Card class.
• A bank customer uses ATM for money transactions. Therefore, the Bank Customer has a directed association relationship with the ATM class.
• An account can be of the type, current or savings. The accounts have some common as well as different attributes. Therefore, there are two classes. Current Account and Savings Account, which generalize to form the Account class.
• A customer can have multiple bank accounts. In addition, one account can be associated with multiple account holders. Therefore, the Bank Customer class has a many-to-many association relationship with the Account class.
• A bank customer can have one permanent address. Therefore, the Bank Customer class has a one-to-one composition relationship with the Address class
No comments:
Post a Comment