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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 10:30, tommyaberman
Would a ps4 wired controller work on an xbox one
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, carter1809
Choose the answers that best complete each sentence. on average, are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, Amrinderkhattra
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
image
Computers and Technology, 24.06.2019 02:10, sIatt
Consider the usual algorithm to convert an infix expression to a postfix expression. suppose that you have read 10 input characters during a conversion and that the stack now contains these symbols: (5 points) | | | + | | ( | bottom |_*_| now, suppose that you read and process the 11th symbol of the input. draw the stack for the case where the 11th symbol is
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 in other subjects:

Konu
Mathematics, 18.02.2021 01:50
Konu
Mathematics, 18.02.2021 01:50
Konu
Mathematics, 18.02.2021 01:50
Konu
Health, 18.02.2021 01:50