CBIS 4210 Project 3

For Project 3, you will write, compile, and run a program that accepts user input and performs various functions. You will have 2 total files when finished: Investment, and Retire.  

At the top of each of your files, include the following lines of comments:

// ClassName.java
// by Your Name
// Project 3 - Due Date

Save all project files in a folder on your floppy called A:\4210\proj3\proj3_xxx\ (where xxx are your first, middle, & last initials).

Investment, Retire:

  • An Investment class that has a default constructor as well as a constructor that takes three parameters: interest Rate specified in percent, a monthly investment amount, and a number of years. A method called run() should run a simulation that adds the monthly amount invested and computes interest monthly (interestRate/12) over the specified number of years. Methods for get and set for each of the parameters, as well as getBalance() to retrieve the final investment value should be provided. Provide full javadoc documentation for the class, each field, and each method.
  • A Retire program that creates a default Investment and displays the numbers, then asks the user for their current age, an interest rate, a monthly investment amount, and a number of years to create their own Investment. The program should show the total value at the end of the number of years, along with the person's age, then ask if they would like to compute their retirement using different values, and if so, do it all again. A sample run is shown below:

  • Options: Format the $ to show in $X,XXX,XXX.XX format. One way: test to see if >1 million, print x/1 million, then a comma, then x/1000, etc.

Due: Tuesday, October 5, at the beginning of class.

[Back to Calendar]