Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

getApr() should prompt for and input a percentage as, for example, 3.5 for 3.5%. It should return the percentage as a double , as, for

getApr() should prompt for and input a percentage as, for example, 3.5 for 3.5%. It should return the percentage as a double, as, for example, .035 for input of 3.5. The method should print an error message and exit the program if the percentage is negative or 0.

getInvestment() should prompt for and input an investment amount as a double and return it. If the amount is negative or 0, the method should print an error message and exit the program.

printAsMoney(double value) should format the argument as currency using a DecimalFormat and print it, staying on the same line.

compound(double value, double apr) should return a double, (1+apr) * value

What are some examples of how these methods would be used in java

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions