Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment you are to design and write a banking application that computes interest compounded over time or the future value of an item

For this assignment you are to design and write a banking application that computes interest compounded over time or the future value of an item that will appreciate over time.

Please make sure that you program output matches the output sample exactly. When the program launches it provides the user with a program description and two options to chose from: Interest and Future value. The user may enter either of these options and it shouldnt matter if upper- or lowercase is used.

If the user chooses the interest option then you will prompt them for a bank name, the starting deposit amount, the number of years, the interest rate and the yearly deposit amount. The resulting screen is a table layout and you will need to use printf() to align the columns properly. When completed you will ask if the customer would like to do a table for another bank and repeat the process if so.

If the user chooses the Future value option then the program will ask them for the items current value, the number of years that will pass before purchasing the item and the inflation rate. The output will show what the future value of the item will be.

Unlike other programs you have written, this program must check for valid input. In no case should your program crash if invalid input is used. For this reason, you will need to implement methods for getting a valid integer, double, yeso, or main menu option. For the integer and double input you will need to use the hasNextDouble() and hasNextInt() methods. For the others you will need to use equalsIgnoreCase().

Methods to implement:

1. public static void run(), this method declares the Scanner object and has a while loop that terminates only when the user answers that there are no more customers. Within the loop you must show the description, get the users option, call either the getInterest() or getFuturePrice() method and then prompt for more customers.

2. public static void description(), this method displays a description of the program.

3. public static String getYesOrNo(Scanner kb,String prompt), This method prints the prompt and loops until it receives a yes or no input by the user. It returns the result.

4. public static String getOption(Scanner kb), This method prints the menu Choose one of and then loops until the user chooses a valid option. It returns the result.

5. public static void getInterest(Scanner kb), This is the method that performs the logic for the Interest menu option.

6. public static void printTable(double amount, int periods, double rate, double deposit, String name), Use this method for printing the table output for the Interest menu option

7. public static double interest(double amount, double rate), This method only computes the interest accrued for given amount and rate and returns it. That is it. It does not print anything to the screen.

8. public static int getValidInt(Scanner kb, String prompt), Prompts the user with the given prompt and loops until an integer is input, returns the integer.

9. public static double getValidDouble(Scanner kb, String prompt), Prompts the user with the given prompt and loops until a double is input, returns the double.

10. public static void getFutureValue(Scanner kb), This is the method that performs the logic for the Future value menu option.

image text in transcribed

image text in transcribed

Thank you for any answers provided for this question!

Using this software you can see how money increases over time given particular so that the values could be changed to conpue a ditfezea intezes at Choose one of the following options Enzer your option--1 Enzer he atartina anount to decoast: 10000 Enzer intereat rate:1.T Enter yeazly doposlt oust:1000 umnauy of rearly gzowth for the bank: lla Targo Dank nterat Rate rearly pepoait: 1000.0 a Balanoa uo you have another bank to conpaze:jea no Enter the starting snount to deposit: 800 Enter nunber ot Enzer Intereat rat0:0.95 Enter yearly deposit unt:5

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_2

Step: 3

blur-text-image_3

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

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

What are the types of forms of communication ?

Answered: 1 week ago

Question

Explain the process of MBO

Answered: 1 week ago