Do not work on: validation, for example: Maximum deposit amounts CD deposit rules Maximum withdrawal amounts...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Do not work on: validation, for example: Maximum deposit amounts CD deposit rules Maximum withdrawal amounts CD withdrawal rules ^^^ Do not work on the above ^^^ Make sure to test that an account's balance can't go below 0. Suggestions: Start with a single type of account and a separate class to store them, as in the lab. When you get to the second account type, you may realize there is a lot of duplication. You can put that duplication into a single class and have a test file to test the common behaviors. You can still have test files for the individual account types too to test anything specific to that account type. You will be building a bank software system. All input will come in through a series of commands (List of Strings). When you have completed every command in the list, you will output certain data and state of the system (List of Strings). There is no user input or output (no scanner, no sysout). The input will come in through a List of Strings as a parameter to a public facing method. The output will return from that public facing method as a List of Strings. All commands are case insensitive. All invalid commands should be stored to be output later. The system will support 3 types of bank accounts: Checking Savings Certificate of deposit (CD) Each account can be created with a unique identifier and an annual percentage rate (APR). For a checking and savings account, APR is calculated monthly. For a CD, APR is calculated 4 times per month. Create Command Rules The creation command will be in the form of: create Account type must either be: Checking Savings CD Any other type makes the command invalid. ID must be a unique 8-digit number. If any other account exists with the ID specified, the command is invalid. APR must be in the form of a percentage, e.g. 0.06%, and can range from 0 to 10. All checking and savings accounts are opened with a balance of $0. All CDs must specify an additional value in the command: create cd The minimum amount to create a CD is $1000. The maximum amount a CD can be created with is $10000. The system can have any number of accounts and any number of each type of account. Example correct commands: Create checking 12345678 0.01 Create savings 98765432 0.6 Create cd 12345678 1.2 2000 Deposit Command Rules Money can be deposited into a checking or savings account with the command: deposit Example correct command: Deposit 12345678 500 Savings accounts have a maximum deposit amount of $2500 per command. Checking accounts have a maximum deposit amount of $1000 per command. CDs cannot be deposited into. Withdrawal Command Rules Money can be withdrawn from a checking or savings account with the command: withdraw There is no such thing as overdraft in this system. If the $ amount provided is more than the amount in the account, the account goes down to $0. This is valid. Example correct command: Withdraw 12345678 300 Savings accounts have a maximum withdrawal amount of $1000 per command. Savings accounts have a maximum of 1 withdrawal per month. Checking accounts have a maximum withdrawal amount of $400 per command. CDs have special withdrawal rules. No money can be withdrawn from a CD until 12 months have passed since it was created. When 12 months have passed, only a full withdrawal may happen. The same command is used as above, but if the specified is less than the total balance in the CD, the command is invalid. If 12 months have not passed, the command is invalid. If 12 months have passed and the is over the balance in the CD, this is acceptable, and the balance should go to $0. Transfer Command Rules Money can be transferred between checking and savings (not CD) accounts with the command: Transfer Money should be withdrawn from the account with the and be deposited into the account with the . Only the amount actually withdrawn should be deposited. Example correct command: Transfer 12345678 98765432 500 All deposit and withdrawal rules for all accounts still apply. Pass Time Command Rules The last command is to pass the time. Time will only be passed in iterations of months, between 1 and 60. For each month that passes, there are several system behaviors that must be processed. The pass time command: pass Example correct command: Pass 1 Pass 12 For every month that passes (in order): If an account's balance is $0, close the account (as if it never existed). If an account's balance is below $100, deduct $25 from the account (minimum balance fee). Calculate and accrue every account's APR. APR Calculation APR calculation (monthly): 1. Convert the APR from percentage to decimal by dividing by 100. For example an APR of 0.6% will be 0.60 / 100 = 0.006 2. 3. Now divide that number by 12. So 0.006/12 = 0.0005 Next, multiply the balance in the account by the number from the previous step. Let's say an account has a balance of $5000. 5000 x 0.0005 = 2.5. The new balance is $5002.50. For a CD, do step 3 above 4 times per month. Output Requirements Remember that output is in the form of a List of Strings. For each open bank account: Add to the output List the current state of the account: Add to the output List all transactional commands that have ever affected the account (except pass time) in the order that they happened for that account. Truncate balance to 2 decimal points, ie 100.2345436 should be 100.23, 100.256354 should be 100.25. Truncate APR down to 2 decimal points as well, ie 0.06, or if the APR is a whole number add the decimal points, so APR of 3 should be 3.00. Helpful code: DecimalFormat decimal Format = new DecimalFormat("0.00"); decimalFormat.setRounding Mode (Rounding Mode.FLOOR); After adding all bank account information: For each invalid command that was caught, add to the output List the command. Add to the output List all invalid commands in the order they were read. Each invalid command is added separately. Do not work on: validation, for example: Maximum deposit amounts CD deposit rules Maximum withdrawal amounts CD withdrawal rules ^^^ Do not work on the above ^^^ Make sure to test that an account's balance can't go below 0. Suggestions: Start with a single type of account and a separate class to store them, as in the lab. When you get to the second account type, you may realize there is a lot of duplication. You can put that duplication into a single class and have a test file to test the common behaviors. You can still have test files for the individual account types too to test anything specific to that account type. You will be building a bank software system. All input will come in through a series of commands (List of Strings). When you have completed every command in the list, you will output certain data and state of the system (List of Strings). There is no user input or output (no scanner, no sysout). The input will come in through a List of Strings as a parameter to a public facing method. The output will return from that public facing method as a List of Strings. All commands are case insensitive. All invalid commands should be stored to be output later. The system will support 3 types of bank accounts: Checking Savings Certificate of deposit (CD) Each account can be created with a unique identifier and an annual percentage rate (APR). For a checking and savings account, APR is calculated monthly. For a CD, APR is calculated 4 times per month. Create Command Rules The creation command will be in the form of: create Account type must either be: Checking Savings CD Any other type makes the command invalid. ID must be a unique 8-digit number. If any other account exists with the ID specified, the command is invalid. APR must be in the form of a percentage, e.g. 0.06%, and can range from 0 to 10. All checking and savings accounts are opened with a balance of $0. All CDs must specify an additional value in the command: create cd The minimum amount to create a CD is $1000. The maximum amount a CD can be created with is $10000. The system can have any number of accounts and any number of each type of account. Example correct commands: Create checking 12345678 0.01 Create savings 98765432 0.6 Create cd 12345678 1.2 2000 Deposit Command Rules Money can be deposited into a checking or savings account with the command: deposit Example correct command: Deposit 12345678 500 Savings accounts have a maximum deposit amount of $2500 per command. Checking accounts have a maximum deposit amount of $1000 per command. CDs cannot be deposited into. Withdrawal Command Rules Money can be withdrawn from a checking or savings account with the command: withdraw There is no such thing as overdraft in this system. If the $ amount provided is more than the amount in the account, the account goes down to $0. This is valid. Example correct command: Withdraw 12345678 300 Savings accounts have a maximum withdrawal amount of $1000 per command. Savings accounts have a maximum of 1 withdrawal per month. Checking accounts have a maximum withdrawal amount of $400 per command. CDs have special withdrawal rules. No money can be withdrawn from a CD until 12 months have passed since it was created. When 12 months have passed, only a full withdrawal may happen. The same command is used as above, but if the specified is less than the total balance in the CD, the command is invalid. If 12 months have not passed, the command is invalid. If 12 months have passed and the is over the balance in the CD, this is acceptable, and the balance should go to $0. Transfer Command Rules Money can be transferred between checking and savings (not CD) accounts with the command: Transfer Money should be withdrawn from the account with the and be deposited into the account with the . Only the amount actually withdrawn should be deposited. Example correct command: Transfer 12345678 98765432 500 All deposit and withdrawal rules for all accounts still apply. Pass Time Command Rules The last command is to pass the time. Time will only be passed in iterations of months, between 1 and 60. For each month that passes, there are several system behaviors that must be processed. The pass time command: pass Example correct command: Pass 1 Pass 12 For every month that passes (in order): If an account's balance is $0, close the account (as if it never existed). If an account's balance is below $100, deduct $25 from the account (minimum balance fee). Calculate and accrue every account's APR. APR Calculation APR calculation (monthly): 1. Convert the APR from percentage to decimal by dividing by 100. For example an APR of 0.6% will be 0.60 / 100 = 0.006 2. 3. Now divide that number by 12. So 0.006/12 = 0.0005 Next, multiply the balance in the account by the number from the previous step. Let's say an account has a balance of $5000. 5000 x 0.0005 = 2.5. The new balance is $5002.50. For a CD, do step 3 above 4 times per month. Output Requirements Remember that output is in the form of a List of Strings. For each open bank account: Add to the output List the current state of the account: Add to the output List all transactional commands that have ever affected the account (except pass time) in the order that they happened for that account. Truncate balance to 2 decimal points, ie 100.2345436 should be 100.23, 100.256354 should be 100.25. Truncate APR down to 2 decimal points as well, ie 0.06, or if the APR is a whole number add the decimal points, so APR of 3 should be 3.00. Helpful code: DecimalFormat decimal Format = new DecimalFormat("0.00"); decimalFormat.setRounding Mode (Rounding Mode.FLOOR); After adding all bank account information: For each invalid command that was caught, add to the output List the command. Add to the output List all invalid commands in the order they were read. Each invalid command is added separately.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
A work center has the following jobs. There are 7 hours in each productive day. It is currently the start of day 1 3 7 . The due days are all when the jobs are due by the end of the day, they are...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
?Claim: A of adults would erase all of their personalinformation online if they could. A software firm survey of 511randomly selected adults showed that 36 ?% of them would erase allof their pe...
-
Write out the details of the proof of the "if" part of Theorem 1.7: if A is nonsingular, then the linear system Ax = b has a unique solution for every b. Theorem 1.7 A linear system Ax = b has a...
-
Consider the following cash flows: Year Cash Flow 0 -$ 29,400 1 14,300 ces 2 3 14,600 11,000 a. What is the profitability index for the cash flows if the relevant discount rate is 8 percent? Note: Do...
-
The 2015 annual report of The Procter & Gamble Company (P&G) TA 2, 3, 4 is available at www.pginvestor.com. After reviewing P&Gs annual report, respond to the following questions: a. What percentage...
-
The football coach at a Midwestern university was given a 5-year employment contract that paid $225,000 the first year, and increased at an 8% uniform rate in each subsequent year. At the end of the...
-
Intercontinental Hotels Group v. Utah Labor Commission 1. What was the legal issue in this case? What did the court decide? 2. The employer in this case did absolutely nothing wrong. So, how can they...
-
This is the code followed by the questions :) // Execute in strict mode to prevent some common mistakes "use strict"; /** * Make diary data item * @param type Type of item to create, either "text" or...
-
QUESTION 10 The time it takes customer service representatives from UMobile communication company to assist a customer with adding a new phone line to an existing account is uniformly distributed...
-
Data for Hermann Corporation are shown below: Selling price Variable expenses Contribution margin Per Unit $ 95 Percent of Sales 100% 57 $38 60 40% Fixed expenses are $79,000 per month and the...
-
Why Change Programs Don't Produce Change" then review the summary of the three C's of change (commitment, coordination, and competency)? How do innovation, technology, and the concept of "going...
-
The Boxwood Company sells blankets for $60 each. The following was taken from the inventory records during May. The company had no beginning inventory on May 1. Date Blankets Units Cost May 3...
-
5. Julio Martnez recibe un lote de 100 discos de clutch. El historial de la empresa muestra que el 10% de discos recibidos es defectuoso. Saquemos al azar 2 discos uno a uno de dicho lote (sin...
-
Jack and Jill are role playing as doctor and nurse with their new set of toys they received on their birthday. Jack will test Jill's knee reflex with his hammer. Jill sits very straight in her little...
-
A zoo wishes to construct an aquarium in the shape of a rectangular prism such that the length is twice the width, with the height being 5m shorter than the length. If the aquarium must have a volume...
-
Choose two matrices A and B with dimension 2 x 2. Calculate det A, det B, and det (AB). Repeat this process until you are able to discover how these three determinants are related. Summarize your...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
Patty Bayan is a single taxpayer living at 543 Space Drive, Houston, TX 77099. Her Social Security number is 466-33-1234. For 2012, Patty has no dependents, and her W-2 from her job at a local...
-
Deborah purchases a new $30,000 car in 2012 to use exclusively in her business. If Deborah does not elect to expense or take bonus depreciation in 2012 and holds the car until it is fully...
-
Using the work already done in creating the Spanning Tree One Step function, write a full, simplified version of the complete undirected spanning tree algorithm, without the options, which takes the...
-
Consider two connected components of an undirected graph \(G\), and suppose each has no cycles. Let \(G^{\prime}\) be a new graph whose vertex set is the union of the vertex sets of the two...
-
Is it possible to construct an undirected tree whose eight vertices have degrees \(1,2,3,3,1,1,3\), and 2 , respectively? Why, or why not?
Study smarter with the SolutionInn App