Write a program in Java which should accept the following information from the user after prompting an appropriate message:
- amount of monthly investment (must be positive so you should validate it)
- annual rate of return (must be between 1% and 10% so you should validate it)
Then it should find how long will it take for your investment to become $1M when the interest is calculated and paid monthly.