Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 users 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/202412.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 thats 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 users 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions