dimanche 6 novembre 2016

Else if statement not working

 total = sumOfDoubleEvenPlace(cardNumber) + sumOfOddPlace(cardNumber);

       if(isValid(total)) // if this true 
       {
       if ((getSize(cardNumber) >= 13) && (getSize(cardNumber) <= 16 ))
       {
       System.out.println("");
       System.out.println("Your " + type_of_card + "Credit Card has been checked and valitated");
       System.out.println("The length of your card number is :" + getSize(cardNumber));
       System.out.println("The first " + quv + "the numbers of you card are" + getPrefix(cardNumber, quv));
       // if successful this will end the program
       }
       else if (){
           System.out.println("Your Credit Card type is invalid. ");
       }
       else if () {
           System.out.println("The length of your card number is : " + getSize(cardNumber) + ". it should be between 13 and 16 digits");
       }

       else 
       System.out.println("Your Credit Card is invalid.");

}

Why isn't my if else statements not working? and also my sumOfDoubleEvenPlace, OddPlace and isValid??? I've created a method for each but still does not change anything

Aucun commentaire:

Enregistrer un commentaire