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 03:00
Which action describes an aspect of technological design?
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
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
question
Biology, 17.06.2021 18:00
question
Physics, 17.06.2021 18:00
question
Biology, 17.06.2021 18:00
question
Chemistry, 17.06.2021 18:00
question
Physics, 17.06.2021 18:00
question
Mathematics, 17.06.2021 18:00
Questions on the website: 13722361