Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need helpwith my homework please! I am confused with the assignment, which is to design a UML diagram of the java banking applications design with
Need helpwith my homework please! I am confused with the assignment, which is to design a UML diagram of the java banking applications design with the implementations and implementation of the changes part of the homework. It uses with my java applicationbelow. which is already fully functional and compiles. Java language only please, need the UML diagram of the whole design to show what is happening and the implementations that are being made to the banking application.
You must follow all principles of obiect-orientated design including: a. Encapsulation (data encapsulation is defined by the classes and exhibited by objects) b. Modeled on real-world (classes and objects are mapped to real-world concepts) c. Re-use (use of inheritance and association) d. Separation of the user interface from core functionality Your code should be maintainable i.e. consider how easy is it to implement future changes. All Java classes must be declared as public e.g. public class ChangeMaker { public static void main(String args) { All decimal values must be displayed in two decimal points e.g. 13.23 instead of 13.2356735677. Please refer to section 3.10 of your Textbook on how to do that The code submitted must be defect-free i.e., it must compile and function according to the requirements The Assignment You are required to submit the following: 1. A UML class diagram that shows all the classes and their relationship with each other. You must use UML notation when creating the diagram. The diagram must accurately represent the existing banking application and any changes that you are making including any new classes. (20 points) 2. Following changes to the banking application: (80 points) a. Change the Bank and Account classes to add support for currencies other than US dollars. The bank will read and store a file containing foreign exchange rates. All new accounts (Saving and Checking) will support currencies other than US dollars. The account will be able to return the balance in account currency as well as US dollars. b. Add additional menu items to display account information and to calculate amounts for buying and selling foreign currencies. 0. Extra Credit\" Make necessary changes to your application to ensure that Bank's data is saved on disk when the application quits and is loaded back from disk when the application starts. (20 points) ** You will only get extra credit if your application: i) Saves all its data when it exists ii) After loading the data continues to function normally iii) Handles all errors and problems associated with saving and loading the data Implementation of the Changes 1 - Foreign Exchange (Forex) file When your program loads it will read a currency exchange file (exchange-rate . csv) and store its contents. If the file is not found or not read, then the program will display a warning message: **Currency file could not be loaded, Currency Conversion Service and Foreign Currency accounts are not available ** 1 - Open Checking Account - Open Saving Account - List Accounts 4 - View Statement 5 - Account Information 6 - Deposit Funds - Withdraw Funds 8 - Foreign Exchange 9 - Close an Account 10 - Exit Enter choice: [1-10]: The currency exchange file has been formatted as comma-separated values (CSV). Each line in the file represents a currency and has three parts/fields separated by a comma ", ": Currency Code: Three-digit ISO code for currency e.g. USD for dollar Name: Name of the currency Exchange Rate: Exchange rate to USD. To convert a foreign currency to USD you will multiply the foreign currency amount by the exchange rate. To convert USD to a foreign currency you will divide the USD value by the exchange rate. Exmaple: The Canadian Dollar (CAD) is listed in exchange-rate . csv the file as: CAD, Canadian dollar, 0. 7317 Therefore, to convert Canadian dollars to USD, you will multiply the amount by 0 . 7317. To convert USD to Canadian Dollars you will divide the amount by 0. 7317. The exchange-rate.csv file is attached with this document.2 - Currency Conversion The menu of your bank will change to include a currency conversion option (7): l Open a Checking account 2 Open Saving Account 3 List Accounts 4 7 Account Statement 5 Show Account Information 6 Deposit funds 7 7 Withdraw funds 8 9 l Currency Conversion Close an account 0 7 Exit If option 10 is selected, your program will ask for the following information (the values in black are only for example): The currency you are selling': CAD The amount you are selling : xxx The currency you are buying : USD Output The exchange rate is xxx and you will get USD xxx Rules: - One of the currencies must be USD, if it is not then print an error message. - If the exchange rate is not found, then print an error message. - To convert a foreign currency to USD you will multiply the amount by the exchange rate. - To convert U SD to Foreign currency you will divide the amount by the exchange rate 3 OpenAccount When opening any account (Checking or Saving), the bank will offer the account to be opened in a currency of the user's choice. The bank will only offer currency choice if the exchange rate le has been successfully loaded. If the exchange rate has not been loaded then the bank will not ask the user for the currency and will assume USD as currency. ODmJO'XU'ILUNH 9 Open a Checking account Open Saving Account List Accounts Show Account Information Account Statement Deposi: funds Withdraw funds Close an account lO Currency Conversion ll 7 Exit If option 1 or 2 is selected and if the exchange-rate file has been loaded then the following additional question will be asked when opening any type of account. Account Currency: CAD If the currency selected by the user is not available, then print an error message and ask for the currency to be re-entered. 4 - List Accounts When listing accounts (option 3), the account's currency, the balance in the currency, and the balance in USD will be displayed: Enter account number: 1001(this is an example value) Output:Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started