The description you have given is basically check-list of functionality that needs to be implemented.
My suggestion is to break each task down into smaller and smaller bits and that you can work your way through and check of as you do them. This will give you a nice roadmap, and also give you good feels as you check of each task, which will provide you with much needed encouragement.
If a task is too much, try to break it down into smaller tasks that you can easily check off.
The description is pretty much already in the order that the code needs to be written in, so just work your way through the list.
If you run into a specific problem that you are struggling to solve, post a new question on Stack Overflow that follows the How to ask a good question guide
Here is the description broken up into separate reasonably manageable tasks:
- Create a credit account class that has the following properties:
- a description
- principal balance,
- an APR
- a minimum monthly payment percentage (usually between 1% and 3%)
- a minimum monthly payment amount
- Has a constructor
- Set each property to their initial values
- Has getters and setters for each property
- Has a
toString
method - Has a method to make a purchase
- increases the principal by a certain amount
- Has a method to make a payment
- decrease the principle by a certain amount
- Has a method to calculate the monthly interest amount
- principal balance * APR/12
- Has a method to calculate the minimum monthly payment
- principal balance * minimum monthly payment rate or, the minimum monthly payment amount, whichever is greater or the principle balance if it is lower than the calculated minimum payment amount
- Hint: If storing the rates as percentages, remember to divide by 100 to get the decimal value (ex. 2% means to multiply by .02).
- Create an application that maintain a list of credit cards
- create an array of credit card objects
- for each card in the list
- present the user with the principal, interest, and minimum payment amount for the month.
- Add a method to the credit card class to calculate the number of months it would take to pay off the card
- if only the minimum monthly payment was paid each month.
- Remember that this method should not change the current information for the card in any way, it is just a calculation.
solved Write a class for a simple credit card account