Hints: For each class, it is required to implement constructors, setters, getters, toString() method, and any other necessary method If the user tries to do an operation that could violate the state...


Hints:<br>For each class, it is required to implement constructors, setters, getters, toString() method,<br>and any other necessary method<br>If the user tries to do an operation that could violate the state of objects, the operation<br>should be ignored and the application should display an error message (e.g. creating an<br>account for the same holder twice, etc.)<br>Checking equality of any 2 objects should be done via the equals() method<br>There is a class that will do the main job of the bank as follows:<br>It has a collection to store the accounts and another one to store the transactions<br>It has static methods, one for each operation happens frequently<br>For each operation, a message should be displayed to the user to explain the status of<br>the operation (i.e. if it was successful or not)<br>Testing:<br>After implementing the required classes, design and implement a testing class to test them as<br>follows:<br>Create at least 3 bank accounts and do some transactions on them<br>Try to violate the state of the objects and show that your code prevents all violations<br>Show that the other operations that happen frequently are working fine<br>At the end, the required data should be stored into a text file and this file should be saved<br>automatically inside the folder contains your Java project<br>

Extracted text: Hints: For each class, it is required to implement constructors, setters, getters, toString() method, and any other necessary method If the user tries to do an operation that could violate the state of objects, the operation should be ignored and the application should display an error message (e.g. creating an account for the same holder twice, etc.) Checking equality of any 2 objects should be done via the equals() method There is a class that will do the main job of the bank as follows: It has a collection to store the accounts and another one to store the transactions It has static methods, one for each operation happens frequently For each operation, a message should be displayed to the user to explain the status of the operation (i.e. if it was successful or not) Testing: After implementing the required classes, design and implement a testing class to test them as follows: Create at least 3 bank accounts and do some transactions on them Try to violate the state of the objects and show that your code prevents all violations Show that the other operations that happen frequently are working fine At the end, the required data should be stored into a text file and this file should be saved automatically inside the folder contains your Java project
Overview:<br>A new bank wants to make a simple application to keep track of all accounts and transactions.<br>In this TMA, it is required to help the bank manager implement the required application.<br>Requirements:<br>After a quick meeting with the bank manager, you got the following information:<br>It is required to store all bank accounts in one collection and all the transactions happened<br>in another collection.<br>Each account has a unique account number, a holder and balance. There is a specific prefix<br>(common for all accounts) that should be added to the holder's civil id to create the unique<br>account number. In addition, it is not allowed for a holder to have more than one account.<br>Furthermore, only three transactions are allowed on any account: deposit, withdrawal and<br>transfer money to another account.<br>Each holder has a unique civil ID (national id), a name and other attributes (add at least 2<br>attributes from your choice).<br>For each transaction, it is required to store the account(s) affected, amount of money, date,<br>and if they are successful. There are 3 types of transactions: deposit, withdrawal and<br>transfer.<br>Moreover, you have been informed that the following operations happen frequently:<br>Creating a new account<br>• Deposit money into a specified account<br>Withdrawal money from a specified account<br>Transfer money between two specified accounts<br>Printing details of the transaction where the maximum amount of money has been<br>transferred between 2 accounts<br>• Saving all accounts and transactions into a text file.<br>For accounts, they should be sorted in ascending order (according to the civil id)<br>Analysis:<br>There are common attributes and methods between the three types of transactions. What<br>is the best choice for designing and writing their codes? Explain your answer.<br>Draw a simple class diagram showing only relationships between the classes.<br>Implementation:<br>After analysing the given requirements, implement the required application:<br>with Object Oriented Programming style<br>following the rules of good programming style (e.g. adding comments, etc.)<br>using only the material covered in M251 (and its prerequisites)<br>

Extracted text: Overview: A new bank wants to make a simple application to keep track of all accounts and transactions. In this TMA, it is required to help the bank manager implement the required application. Requirements: After a quick meeting with the bank manager, you got the following information: It is required to store all bank accounts in one collection and all the transactions happened in another collection. Each account has a unique account number, a holder and balance. There is a specific prefix (common for all accounts) that should be added to the holder's civil id to create the unique account number. In addition, it is not allowed for a holder to have more than one account. Furthermore, only three transactions are allowed on any account: deposit, withdrawal and transfer money to another account. Each holder has a unique civil ID (national id), a name and other attributes (add at least 2 attributes from your choice). For each transaction, it is required to store the account(s) affected, amount of money, date, and if they are successful. There are 3 types of transactions: deposit, withdrawal and transfer. Moreover, you have been informed that the following operations happen frequently: Creating a new account • Deposit money into a specified account Withdrawal money from a specified account Transfer money between two specified accounts Printing details of the transaction where the maximum amount of money has been transferred between 2 accounts • Saving all accounts and transactions into a text file. For accounts, they should be sorted in ascending order (according to the civil id) Analysis: There are common attributes and methods between the three types of transactions. What is the best choice for designing and writing their codes? Explain your answer. Draw a simple class diagram showing only relationships between the classes. Implementation: After analysing the given requirements, implement the required application: with Object Oriented Programming style following the rules of good programming style (e.g. adding comments, etc.) using only the material covered in M251 (and its prerequisites)
Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here