Java代写 Credit Cards

Credit Cards

Problem Description:

 In this question, you will write a class to represent a credit card. The class details are as follows:

  1. Static Variables
    1. baseRate – The minimum interest rate that the card can have. This should be a constant that is hard coded.
    2. lastAccountNumber – The last account number assigned to a customer. Account numbers should be assigned sequentially.
  2. Instance Variables
    1. accountholder – The name of the person who owns the card.
    2. accountNumber – A unique 7-digit identifier number.
    3. creditScore – The account holder’s credit score.
    4. rate – The annual interest rate charged to the card.
    5. balance – The current balance on the card.
    6. creditLimit – The card holder’s credit limit.
  3. Methods
    1. 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 ScoreRateLimit
0-300baseRate + 10%$1000
300-500baseRate + 7%$3000
500-700baseRate + 4%$7000
700+baseRate + 1%$15000

 

    1. makePurchase – Takes a purchase amount as a parameter and updates the current balance. If the amount + balance > creditLimit, deny the transaction.
    2. 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.
    3. raiseRate – Raises the account holder’s rate by a given percentage.
    4. raiseLimit – Raises the account holder’s limit by a given dollar amount.
    5. 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)).
    6. 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.

Create a separate package for Task1 and include it in the IT7374_Assignment1_yourStudentID folder.


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:dmxyzl003 工作时间:全年无休-早上8点到凌晨3点


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

发表评论