CreditCardNumberValidation.java - To change this license...

Info icon This preview shows pages 1–2. Sign up to view the full content.

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package week5; /** * Author: yourNameHere * Due Date: dueDateHere * Description: Utilizes the Luhn check to validate a credit * card number */ public class CreditCardNumberValidation { public static void main(String[] args) { // prompt user for credit card number that is a long integer } // end method main() /** Return true if the card number is valid */ public static boolean isValid(long number) { return true; // a dummy value } /** Return the result of step 2 */ public static int sumOfDoublesEvenPlace(long number) { return 1; // a dummy value } /** Return this number if it is a single digit, otherwise
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '17
  • Numerical digit, Credit card, Summation, Long integer

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern