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, 22.06.2019 11:50
You have written, as part of a school assignment, a research paper on the solar system. you want to share this paper on your school website. on which type of server will you upload it?
Answers: 1
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
question
Computers and Technology, 25.06.2019 01:00
Why is outfitting a workplace with video games in a technology development company consiered a strategic use of money
Answers: 1
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
question
Biology, 22.05.2021 09:30
question
Mathematics, 22.05.2021 09:30
question
Advanced Placement (AP), 22.05.2021 09:30
question
Mathematics, 22.05.2021 09:30
Questions on the website: 13722363