Question: Design and implement an ADT in JAVA that represents a credit card. it should include the customer name, the account number, credit limit, the reward

Design and implement an ADT in JAVA that represents a credit card. it should include the customer name, the account number, credit limit, the reward points and the account balance. The initialization operation should set the data to client-supplied values. The credit limit will be initializes to $5000 and reward points to 0. Next, write a method to validate the card number using the Luhn Algorithm and implement it as a part of initialization process. If the number is invalid, throw a custom exception with the message "Invalid Account Number".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!