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 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".

Public Answer

HIGY3M The First Answerer