Java - Me pueden ayudar con este programa

 
Vista:

Me pueden ayudar con este programa

Publicado por Ramon (1 intervención) el 14/03/2017 23:05:57
el programa dice a si:

Credit Card
In this exercise, you will write a class to represent a credit card. The class details are as follows:
1. Static Variables
a. baseRate – The minimum interest rate that the card can have. This should be a constant that is hard coded.
b. lastAccountNumber – The last account number assigned to a customer. Account numbers should be assigned sequentially.
2. Instance Variables
a. accountholder – The name of the person who owns the card.
b. accountNumber – A unique 7-digit identifier number.
c. creditScore – The account holder’s credit score.
d. rate – The annual interest rate charged to the card.
e. balance – The current balance on the card.
f. creditLimit – The card holder’s credit limit.
3. Methods
a. Constructor – Should only take the account holder’s name and a credit score. The next account number available should be assigned. The balance will be 0 as nothing has been charged yet. The rate and credit limit will be determined by the credit score. Use the following table to set the rate and credit limit.

Credit Score Rate Limit
0-300 baseRate + 10% $1000
300-500 baseRate + 7% $3000
500-700 baseRate + 4% $7000
700+ baseRate + 1% $15000

b. makePurchase – Takes a purchase amount as a parameter and updates the current balance. If the amount + balance > creditLimit, deny the transaction.
c. makePayment – Takes a payment amount as a parameter and updates the current balance. If the payment is greater than the balance, set the balance to zero and print an appropriate message. If the payment is less than 10% of the balance, apply the payment and raise the account holder’s rate by 1%. If the balance is paid off entirely, raise the creditScore by 10. If the increased creditScore changes where the account holder falls in the above table, change the rate and limit as appropriate.
d. raiseRate – Raises the account holder’s rate by a given percentage.
e. raiseLimit – Raises the account holder’s limit by a given dollar amount.
f. calculateBalance – Calculates the balance on a monthly basis. Remember that the rate is yearly, so the formula for calculating the balance monthly is balance + (balance * (rate / 12)).
g. toString – Print the account holder’s name, account number obscured with stars (ex: 1234567 would display as ****567), balance, and limit.



To test your class, write a driver program to track an account holder over six months.
• Each month, allow the account holder to make as many purchases as he wishes.
• At the end of each month, if the balance is greater than 0, ask the user if he would like to make a payment.
• Apply the payment if he makes one.
• If a payment is not made during any given month when there is a balance on the card, raise the rate by 2%.
• Finally, calculate the new balance at the end of each month.

ayudenme es un trabajo de hoy para hoy
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
-1
Responder