subject

Design and implement an ADT named Credit Card that represents a credit card. The data of the ADT should include Java variables for the customer name, the account number, the next due date, the reward points, and the account balance. The initialization operation should set the data to client-supplied values. Include operations for a credit card charge, a cash advance, a payment, the addition of interest to the balance, and the display of the statistics of the account. Be sure to include a main class which creates an object from your Credit Card class. Do not worry too much about the correctness of the methods, your method headers and whether they are invoked correctly from client code are what really matter in this exercise (20 points).Your ADT must include the following:a- A variable to represent the name on the credit card (A String).b- A variable to represent the credit card account number (A long).c- A variable to represent the next due date (A String).d- A variable to represent reward points (An int).e- A variable to represent a balance (A double).f- A constructor which initializes a CreditCard object with a client-supplied name. g- A void return-type method named charge, which accepts a new amount as input and adds that new amount to the credit card’s balance. h- A void return-type method named cashAdvance, which accepts a new cash advance amount as input and adds that new cash advance amount to the credit card’s balance. i- A void return-type method makePayment, which accepts a new payment amount and subtracts that new payment amount from the credit card’s balance. j- A void return-type method named addInterest, which accepts a new interest amount and adds that new interest amount to the credit card’s balance. k- A toString() method override, which displays the statistics of the account. Remember, to encapsulate the data in your ADT by giving the variables private visibility.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Asalesman at a high end computer security firm want to sell you a proactive cover for your passport, which contains an rfid tag inside storing your sensitive information. the salesperson's solution cost only $79.99 and protects your passport from being read via radio waves while it is in your pocket. explain how you can achieve the same thing under $3.00
Answers: 3
question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
You know the right answer?
Design and implement an ADT named Credit Card that represents a credit card. The data of the ADT sho...
Questions
Questions on the website: 13722361