Program Details The user will enter a date with their beginning checking account balance followed by...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Program Details The user will enter a date with their beginning checking account balance followed by the dates and values of debits and credits made to the account. The program will calculate the average end-of-day balance for the 30-day period starting from the beginning balance date. The user's first entry will be in the format m/d/yyyy numeric_balance Assume that the input will be in the correct format. Each subsequent entry will be in the format debit_or_credit_indicator m/d/yyyy value The debit or credit indicator will be either d for debit, c for credit, or q to quit e.g. d 1/12/2024 12.36 Assume that all input will be in the correct format and assume that all dates entered are valid dates. All entries must be made in chronological order. If an entry is made out of chronological order, the program should exit and provide an error message in the following format. Entries must be provided in chronological order. Out-of-order-entry-date entered after previous-entry-date The program will accept entries until the user inputs an entry date that's more than 30 days after the beginning balance date, or the user enters q for the debit/credit indicator, or the user enters a date that is out of chronological order. The program will output the date range and the average daily checking balance for that date range. If the user's last transaction date is fewer than 30 days after the beginning balance date, the average daily balance will be computed for the number of days from the beginning balance date through the last input transaction date. If a debit is made with insufficient funds, complete the transaction (subtract the amount from the balance) and assess a $15 overdraft fee. Output a message to the user in the following format informing them of the overdraft date and fee assessed. Overdraft on m/d/yyyy. $15 overdraft fee assessed. Note: Your program will need to account for the number of days in the month. Note: For February, you'll need to determine if the year is a leap year. If a year is divisible by 400, it's a leap year Else, if it's divisible by 100, it's not a leap year Else, if it's divisible by 4, it's a leap year Else, it's not a leap year Example input/output pairs Example Input: 12/1/2023 500 d 12/11/2023 200 d 12/23/2023 100 c 12/28/2023 200 d 12/31/2023 250 Example Output: 30-day average balance (12/1/2023-12/30/2023): $360.00 Example Input: 1/28/2024 100 d 1/28/2024 10 d 2/1/2024 10 d 2/1/2024 30 c 2/17/2024 300.53 d 3/1/2024 8 Example Output: 30-day average balance (1/28/2024-2/26/2024): $155.51 Example Input: 2/16/2024 52 c 2/20/2024 100 c 3/1/2024 15 d 3/11/2024 150 d 3/13/2024 20 c 3/17/2024 100 Example Output: Overdraft on 3/13/2024. $15 overdraft fee assessed. 30-day average balance (2/16/2024-3/16/2024): $112.00 Example Input: 12/20/2023 75 c 12/28/2023 150 d 12/31/2023 222.17 c 1/3/2024 50.18 9 Example Output: 15-day average balance (12/20/2023-1/3/2024): $89.10 Example Input: 11/28/2023 110 d 11/29/2023 10 d 12/1/2023 27.03 d 12/4/2023 13.11 d 12/3/2023 4.19 c 12/6/2023 73.24 d 12/15/2023 9.08 9 Example Output: Entries must be provided in chronological order. 12/3/2023 entered after 12/4/2023 Additional Specifications All output should be directed to the standard output device using cout. - All input should be accepted from the standard input device using cin. Do not prompt for input. All of your source code for the program must be contained in a single file named program1.cc Submit your program1.cc file to the assignment in Blackboard. The only header files that may be included in your code are iostream and iomanip. Files that include other headers will not be eligible for correctness points. Example Input: 12/1/2023 500 d 12/11/2023 200 d 12/23/2023 100 c 12/28/2023 200 d 12/31/2023 250 Example Output: 30-day average balance (12/1/2023-12/30/2023): $360.00 Program Details The user will enter a date with their beginning checking account balance followed by the dates and values of debits and credits made to the account. The program will calculate the average end-of-day balance for the 30-day period starting from the beginning balance date. The user's first entry will be in the format m/d/yyyy numeric_balance Assume that the input will be in the correct format. Each subsequent entry will be in the format debit_or_credit_indicator m/d/yyyy value The debit or credit indicator will be either d for debit, c for credit, or q to quit e.g. d 1/12/2024 12.36 Assume that all input will be in the correct format and assume that all dates entered are valid dates. All entries must be made in chronological order. If an entry is made out of chronological order, the program should exit and provide an error message in the following format. Entries must be provided in chronological order. Out-of-order-entry-date entered after previous-entry-date The program will accept entries until the user inputs an entry date that's more than 30 days after the beginning balance date, or the user enters q for the debit/credit indicator, or the user enters a date that is out of chronological order. The program will output the date range and the average daily checking balance for that date range. If the user's last transaction date is fewer than 30 days after the beginning balance date, the average daily balance will be computed for the number of days from the beginning balance date through the last input transaction date. If a debit is made with insufficient funds, complete the transaction (subtract the amount from the balance) and assess a $15 overdraft fee. Output a message to the user in the following format informing them of the overdraft date and fee assessed. Overdraft on m/d/yyyy. $15 overdraft fee assessed. Note: Your program will need to account for the number of days in the month. Note: For February, you'll need to determine if the year is a leap year. If a year is divisible by 400, it's a leap year Else, if it's divisible by 100, it's not a leap year Else, if it's divisible by 4, it's a leap year Else, it's not a leap year Example input/output pairs Example Input: 12/1/2023 500 d 12/11/2023 200 d 12/23/2023 100 c 12/28/2023 200 d 12/31/2023 250 Example Output: 30-day average balance (12/1/2023-12/30/2023): $360.00 Example Input: 1/28/2024 100 d 1/28/2024 10 d 2/1/2024 10 d 2/1/2024 30 c 2/17/2024 300.53 d 3/1/2024 8 Example Output: 30-day average balance (1/28/2024-2/26/2024): $155.51 Example Input: 2/16/2024 52 c 2/20/2024 100 c 3/1/2024 15 d 3/11/2024 150 d 3/13/2024 20 c 3/17/2024 100 Example Output: Overdraft on 3/13/2024. $15 overdraft fee assessed. 30-day average balance (2/16/2024-3/16/2024): $112.00 Example Input: 12/20/2023 75 c 12/28/2023 150 d 12/31/2023 222.17 c 1/3/2024 50.18 9 Example Output: 15-day average balance (12/20/2023-1/3/2024): $89.10 Example Input: 11/28/2023 110 d 11/29/2023 10 d 12/1/2023 27.03 d 12/4/2023 13.11 d 12/3/2023 4.19 c 12/6/2023 73.24 d 12/15/2023 9.08 9 Example Output: Entries must be provided in chronological order. 12/3/2023 entered after 12/4/2023 Additional Specifications All output should be directed to the standard output device using cout. - All input should be accepted from the standard input device using cin. Do not prompt for input. All of your source code for the program must be contained in a single file named program1.cc Submit your program1.cc file to the assignment in Blackboard. The only header files that may be included in your code are iostream and iomanip. Files that include other headers will not be eligible for correctness points. Example Input: 12/1/2023 500 d 12/11/2023 200 d 12/23/2023 100 c 12/28/2023 200 d 12/31/2023 250 Example Output: 30-day average balance (12/1/2023-12/30/2023): $360.00
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 algorithms questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
4. Papo and Pepe are two barbers from a small barbershop. Theyhave their two court chairs plus two waiting chairs. The followingresults were found: P0 = 1/16 P1 = 4/16 P2 = 6/16 P3 = 4/16 a. What is...
-
Presented below are the computed amounts of ratios for the Village of Riverside example appearing in the chapter. * Population and property values are disclosed in the statistical section of the...
-
What is the relationship between the CML and the Markowitz efficient frontier?
-
Why must amphibians live in moist habitats?
-
Dillip Corp., a wholesaler of office equipment, issued $45,000,000 of 10-year, 10% callable bonds on March 1, 2012, with interest payable on March 1 and September 1. The fiscal year of the company is...
-
A 500 g lump of clay is dropped onto a 1.0 kg cart moving at 60 cm/s. The clay is moving at 30 cm/s just before landing on the cart. What is the speed of the cart and clay after the collision?
-
Pam Corporation purchased 75 percent of the outstanding voting stock of Sun Corporation for $4,800,000 on January 1, 2016. Sun's stockholders' equity on this date consisted of the following (in...
-
Blum's algorithm is invoked with k=28 on the following numbers, which means we want to find the 28th smallest element. What is k after one level of recursion? 004 032 140 124 056 041 161 116 128 148...
-
\As a general rule it has been laid down that when property is given absolutely to command, recommended or entreated, or wished, to dispose of that property in favour of another, the recommendation,...
-
What are the current tax issues being reported in the press and are there any major changes that might be coming up in the future?
-
What is the meaning of cost-volume-benefit examination in administrative navigation?
-
The following list relates to investments. Please match the explanations with various terms explaining accounting for investments. NOTE - some of the answers may be used more than once or not at all....
-
Ricarldo's father asks him to go to the drug store to buy a bottle of Panadol. Ricarldo had a long day at school, is tired, and does not want to leave the house. Sensing this, his father offers to...
-
Show that the area of ngion R enclased by simple clased cunie is given a A = (xdy-yola) - fady= -Syda. Hence evaluate of ellipse %3D the n- a casp, y = bsinp. %3D X = a Cas. area
-
Refer to the data in QS 10-1. Based on financial considerations alone, should Helix accept this order at the special price? Explain.
-
Charlie's Green Lawn Care is a cash basis taxpayer. Charlie Adame, the sole proprietor, is considering delaying some of his December 2012 customer billings for lawn care into the next year. In...
-
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...
-
Jason and Mary are married taxpayers in 2012. They are both under age 65 and in good health. For this tax year, they have a total of $41,000 in wages and $500 in interest income. Jason and Mary's...
-
A standard gold bar stored at Fort Knox, Kentucky, is 7.00 inches long, 3.63 inches wide, and 1.75 inches tall. Gold has a density of \(19,300 \mathrm{~kg} / \mathrm{m}^{3}\). What is the mass of...
-
A typical timber wolf has a mass of \(40 \mathrm{~kg}\), a typical jackrabbit a mass of \(2.5 \mathrm{~kg}\). Given the scaling law presented in the passage, we'd expect the specific metabolic rate...
-
Air enclosed in a cylinder has density \(ho=1.4 \mathrm{~kg} / \mathrm{m}^{3}\). a. What will be the density of the air if the length of the cylinder is doubled while the radius is unchanged? b. What...
Study smarter with the SolutionInn App