I am so stuck.

Could someone please show me how to create this? Our instructor gave us this lab to do, but he teaches us how to do them after the due date. I really have no idea how to do it. PLEASE AND THANK YOU!

Write a program which implements a banking system. In your program you should be asking the followings from the user:


A. What type of bank account.
B. Amount of deposit.
C. Duration of deposit.

If bank account is of type 'Checking' an interest rate of 5% per year is given.
If banks account is of type 'Saving' an interest rate of 10% per year is given.

Interest rate are applicable only when the duration equal to or more than one year and deposit amount is more than $ 1,000. For deposit less than one year or for deposit less than $1,000, no interest is paid. You need to calculate the interest amount.

Please make sure you cover all the requirements and test your program for all possible cases. The cases should be:

Checking with deposit for less than a year with deposit greater than 1000.
Checking with deposit for more than a year and deposit greater than 1000.
Saving with deposit for less than a year and deposit amount greater than 1000.
Saving with deposit for more than a year deposit amount greater than 1000.
All above 4 cases with deposit less than 1000.
If the user enters a account type which is not either 'Checking' or 'Saving' exit from the program with an error message.
Okay, but how do I apply interest? What is the rest of the code? He has not showed us any of that? What does else mean?
if (account == 'C')
interest = amount * .05;

else if (account =='S')
interest = amount * .1;

else
cerr <<"Wrong account! Try again.";

if (duration >= 12 || amount >= 1000 )

apply interest

else

do not apply interest
I tried to copy and paste that... it would not do anything.
you are right keskiverto. Is my bad for not doing it in an way that he could understood without giving all the code.

deleted.
Last edited on
Copy-paste without comprehension is not safe. If the teacher really did give homework first, then he must assume that you are able to read from other sources, like http://www.cplusplus.com/doc/tutorial/
Topic archived. No new replies allowed.