Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete in C please. In this program, you will design a simple user interface that manages your finances in a bank account. The user is

image text in transcribedimage text in transcribedimage text in transcribedComplete in C please.

In this program, you will design a simple user interface that manages your finances in a bank account. The user is given the option to wait and allow interest to accrue in the bank account for any number of years, or to add funds. The program will need to keep a tally of the funds (in dollars) in the user's bank account, the current year, and the current interest rate. All three values should start at zero. Program Structure Your program should have one main outer loop that runs indefinitely until the user exits the program. At the start of every loop, display the current year, the current funds in the bank account, and the current interest rate. Prompt for a command from the user. The following commands are to be implemented (and must be case-insensitive): 'W': the "wait" command. The program prompts the user for the number of years to wait, then updates the new funds in the bank account and the current year appropriately. o Error condition 1: The value entered is not an integer. Display an error message and clear the input. Then try to read another integer o Error condition 2: the number of years entered is less than 1. Display an error message and try to read another integer T: "the "invest" command. The program prompts the user to enter the number of each type of coin (quarters, dimes, nickels, and pennies) to invest. It calculates the amount in dollars, adds it to the total, then prompts the user for the new interest rate. Having obtained these values, it then allows the total to collect interest for exactly one year before returning to the main prompt. o Error condition 1: any of the values inputted have a bad format. Display an error message, clear the input, and read the line again. o Error condition 2: any coin count is negative: display an error message and prompt for the number of coins again o Error condition 3: the interest rate is

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

Students also viewed these Databases questions