Question

In: Computer Science

Assume that you are writing an application that will calculate the amount of interest earned for...

Assume that you are writing an application that will calculate the amount of interest earned for a bank account. a) Identify the potential classes in this problem domain. b) Refine the list to include only the necessary class or classes for this problem. c) Identify the responsibilities of the class or classes. d) Design the UML diagram.

Solutions

Expert Solution

Let’s determine possible class members for each of the above.

The bank class represents a physical bank. It has a location and a unique id. This bank also manages several accounts. **There’s an association!** What type of association is this? Is a bank entirely composed of accounts (composition)? Or are accounts ‘part of’ a bank (aggregation)? It looks like aggregation. It can’t be composition because that would mean that both classes live and die together. That’s not quite right because you can have a bank without accounts and you can have accounts without a bank. We’ll add a method called getAccounts().

The ATM class represents a physical ATM. Right off the bat, we can come up with three methods for the ATM: withdraw(), deposit(), checkBalance(). Each of these methods takes the card number as input. In terms of attributes, an ATM has a location and is managed by a specific bank.

The customer class represents a real customer. This customer has a name, address, date of birth (dob), card number, and pin. For this person to be considered a customer, they must have an account. **There’s another association!** This isn’t aggregation or composition, it’s just a bi-directional association (drawn using a blank line no arrows).

The account class represents a bank account. Common attributes of bank accounts include account number, balance, etc. You can deposit() withdraw() money from the account. In addition, banks might offer two types of accounts: a checking account and a savings account. These two can thus be considered child classes of the account class and can inherit from it too. We’ll denote this by using a solid black line with an unfilled arrow going into the account class.


Related Solutions

Find the compound amount for the deposit and the amount of interest earned. $230 at 5.2%...
Find the compound amount for the deposit and the amount of interest earned. $230 at 5.2% compounded semiannually for 17 years The compounded amount after 17 years is $____?. The amount of interest earned is $_____?
Determine the amount of interest that will be earned on each of the following investments: (Round...
Determine the amount of interest that will be earned on each of the following investments: (Round answers to 2 decimal places, e.g. 15.25.) (i) (n) Investment Interest Rate Number of Periods Type of Interest Amount of Interest a. $160 5% 1 Simple enter a dollar amount rounded to 2 decimal places b. $700 9% 3 Simple enter a dollar amount rounded to 2 decimal places c. $700 7% 2 Compound enter a dollar amount rounded to 2 decimal places
Determine the amount of the Earned Income Credit in each of the following cases. Assume that...
Determine the amount of the Earned Income Credit in each of the following cases. Assume that the person or persons are eligible to take the credit. Calculate the credit using the formulas. A single person with earned income of $7,554 and no qualifying children. A single person with earned income of $22,500 and two qualifying children. A married couple filing jointly with earned income of $34,190 and one qualifying child.
Assume you are to borrow money, the loan amount, at an annual interest rate to be...
Assume you are to borrow money, the loan amount, at an annual interest rate to be paid in equal installments each period. Installment Loan Schedule Loan Amount $25,000 Annual Interest Rate 9.90% Periods per year 12 Years to payback 5 See Table B.3 in book. Factor 47.17454194 FACTOR = [1 - (1 / ((1 + R)^n)]/ R Equal Payments $529.95 let R = period interest rate let n = number of periods to payback loan Number of periods: 60 Reduction...
You will be writing a small bank application. There will be two applications to this project...
You will be writing a small bank application. There will be two applications to this project – a client and a teller / administrative application with different functionalities between the two. As their names suggest, the client application will be tailored for customers of the bank, and the other for the employees of the bank. For your client side application, a client should be able to “log into” the program by providing a social security number. The program should only...
Mr.D invests $1000 in a bank account. Six months later, the amount in his bank account is $1049.23. Find the amount of interest earned in those six months. Find the (semiannual) effective rate of interest earned in those six months
Mr.D invests $1000 in a bank account. Six months later, the amount in his bank account is $1049.23. Find the amount of interest earned in those six months. Find the (semiannual) effective rate of interest earned in those six months
An individual invested $1,000 for one year and earned $45 in interest. What is the percentage of interest earned?
An individual invested $1,000 for one year and earned $45 in interest. What is the percentage of interest earned?A. 4.25%B. 4.5%C. neither A or B
At writing, 1 Euro is equivalent to 0.89 GBP (i.e., British pounds). Assume that the interest...
At writing, 1 Euro is equivalent to 0.89 GBP (i.e., British pounds). Assume that the interest rate over one (annual) timestep in Britain is rGB = 1:5%, and in Europe, it is rE = 2:0%. Operate in CRR notation with u = 1:15, and d = 1=u throughout this question, and specify which currency you are using in all answers. Assume that your domestic currency is GBP. (i) Calculate the risk neutral probability for an exchange rate option. Let each...
At writing, 1 Euro is equivalent to 0.89 GBP (i.e., British pounds). Assume that the interest...
At writing, 1 Euro is equivalent to 0.89 GBP (i.e., British pounds). Assume that the interest rate over one (annual) timestep in Britain is rGB = 1:5%, and in Europe, it is rE = 2:0%. Operate in CRR notation with u = 1:15, and d = 1=u throughout this question, and specify which currency you are using in all answers. Now, instead assume your domestic currency is Euros. (i) Calculate the risk neutral probability for an exchange rate option. Let...
​(Compound interest with​ non-annual periods)  Calculate the amount of money that will be in each of...
​(Compound interest with​ non-annual periods)  Calculate the amount of money that will be in each of the following accounts at the end of the given deposit​ period: Account Holder Amount Deposited Annual Interest Rate Compounding Periods Per Year (M) Compounding Periods (Years) Ted Logan $1,100 12% 4 6 Vern Coles 95,000 12 6 3 Teena Elliott 9,000 12 1 5 Wade Robinson 120,000 8 2 4 Eunice Chang 28,000 18 3 5 Kelli Craven 16,000 10 12 5 PLEASE round...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT