For this lab you will write a Java program that checks credit card strings to see if they are valid. Your program should first prompt the user to enter a string of numbers as a credit card number, or enter a blank line to quit the program. If the user doesn't quit, your program should ensure that this string is exactly 16 characters in length. If the user enters a string that is not 16 characters in length, your program should print an error message and ask again for a valid string.

Answer :

Answer:

The source code file has been attached to this response for better readability. Please download the file and go through it.

Explanation:

The code in the file has comments in it explaining every segment of the code. Kindly go through the comments.

Hope this helps!

${teks-lihat-gambar} stigawithfun

Other Questions