Question: Lab Description This lab will be on methods, amrays (1D and 2D), and on repetition (using loops In this lab, you will have to complete

 Lab Description This lab will be on methods, amrays (1D and
2D), and on repetition (using loops In this lab, you will have

Lab Description This lab will be on methods, amrays (1D and 2D), and on repetition (using loops In this lab, you will have to complete two activities. Here is what you have to do: Activity 1.60 points) Methed Luhn, Y card number is valid or fake. This is a widely used algorithm that checks that you enter a valild aredit card number when you are trying to make a purchase to Creaive Probiem Solving by VA Sprault Using the original number, double the value of every other digit, starting with the leftmost one, as shown below. Then add the values of the the digits together-see below). The identiication number is valid if the sum is divisible by 10e the sum has to be a multiple of 10) dges together (d a doubled value now has two add Example of execuion of the algorithm 0569. Lets see how to check Fist, you are going to double every other number, starting with the first number (here, it is number 8) And you obtain: Now we add all of these numbers +2 5 3+2 2+6+2 5 3+1+1+0+5 3 9 56 56 is not a mutiple of 10. so the credt card number was a fake To complete this activity, you will have to this lab: 21 Implement the method luhnCheck in the fle CompLab2 java and add relevant code in the main method to test it and credit card number Activity 2.40 points] Method service. You record your dlients biling infomation as their names and credt card information, and you store stomers. In this activity, imagine that you have a business that charges clients for some n in a 2-dim aray (one row per client, 2 pieces of card number). You then proceed to charging your dients but it may happen that some credit card numbers are evalid they were wrongly inputed for instance You want to make sure to keep track of the credi so you proceed by checking each credt card number for valdity and you wil write all emoneous information (credit card number along with name of client or name of business) to the For this method, you have to 1/ Write the pseudocode of it in the word document that you will submit along with the java le of this lab; and 21 Implement it in the ile CompLab2 java and add relevant code in the main method to test it

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!