Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, Nicki3729
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, HannahVance99
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, mem81
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
image
Computers and Technology, 23.06.2019 07:50, kmart4062
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
Do you know the correct answer?
Design and implement an ADT named Credit Card that represents a credit card. The data of the ADT sho...

Questions in other subjects: