Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java PROGRAMING Create a My Currency class as specifies by the UML diagram below, and write a driver program to test it Your class should

image text in transcribed

Java PROGRAMING Create a My Currency class as specifies by the UML diagram below, and write a driver program to test it Your class should behave as follows the two String should formal! with two decimals and add a S x should a Ways be a double with at most two decimals no more. Not just rounded on output, but rounded on input as well So in the non-default constructor and you will need to round the value sent to nearest two decimals for example double num.= 3 14499999; My Currency. X in should be 3.14. NOT 3.14499999 Math, round/double) will return the nearest integer value to the double value sent Why? Using a double value for currency sometimes produces more man two decimals especially when figuring percentages for interest etc Even if rounded to two decimals the value used in calculations will be the actual value not the rounded value This may look Ike calculations with currencies are off a bit So. to make sure all adds up. we use values actually net just rounded for output the constructor and matador that take a Siring parameter should allow a leading S. if it is there, strip it off before your try-catch. Now. a rile a program that uses your new My Currency class as follows Track an investment input from the user an, initial investment amount which should ce a minimum of $1,000.00, and an annual interest rate (You may use your method if you wish). Output (to a file) a report that shrews for each month from 0 to 45 {4 years) the interest earned that month and the current value of the if, vestment, interest should be compounded each month That means tie interest earned in any month is added to the value, and the next month interest calculated in this new amount Sample output (only showing first 6 months, you will have 48 in you' file): Loan Value Table. Starting principle: APR 4.00%

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

Find dy/dx by implicit differentiation. y cos x = x 2 + y 2

Answered: 1 week ago