subject
Computers and Technology, 05.05.2020 22:23 Geo777

You are to create a new Exception for improper format of credit card number for an online web store. This Exception class will be a subclass, inherited from the existing Exception class. Note that each credit card company has their own standards and format, so you may want a different Exception for each company (I leave that choice up to you). Research what are the formats and rules for each of the following credit cards: Visa, Master Card, Discover, American Express. Write a Java code method that checks a provided credit card number. It will receive two parameters, the credit card account number and the security code (that is the 3 or 4 digit code on the back of the card). The Exception should be thrown if the credit card provided does not match any of those companies. Also write an Exception Handler for the Exception. This will be catch block in the same method. The Handler will ask for the credit card number to be re-entered (in case it was entered wrong). If the number still doesn’t match, then print an error message and reject the credit card number. Wrap the above method in a Java class that has a null and empty constructor and this method. Note that this MUST be separate from the Exception class that you created in the first paragraph, because this code is USING the class created.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Write an algorithm to check if a number is even or odd and show with flow chart step by step
Answers: 2
question
Computers and Technology, 24.06.2019 21:30
Aobject is used for displaying the results of a question based on stored data. a. query b. report c. table d. form
Answers: 2
You know the right answer?
You are to create a new Exception for improper format of credit card number for an online web store....
Questions
question
Mathematics, 16.12.2020 21:10
question
Social Studies, 16.12.2020 21:10
Questions on the website: 13722360