Regarding Switch conditional statement
<p>I have the below piece of code that I have developed ..</p>

<pre><code>public byte determineCardType(final IInput inputData) {
    byte cardType = UNKNOWN_CARD;
    try {
        if (isWagRewardsLoyaltyCard(inputData))
            cardType = WAG_LOYALTY_CARD_TYPE;
        else if (isDRCard(inputData))   //checking that card scanned and swiped is a DR Card
            cardType = DR_CARD_TYPE;      
        else if (isWagRewardsPartnerCard(inputData))
            cardType = AARP_CARD_TYPE;
        return cardType;
    } catch (Exception e) {
        return UNKNOWN_CARD;
    }
}
</code></pre>

<p>please advise me can the above code can be adjusted in switch loop, if yes then please advise, Thanks in advance.</p>

<p>the other  code that is linked to it...</p>

<pre><code>if((aarpCardSupport.isAARPCard(input))||(determineCardType(input)==DR_CARD_TYPE)) {
    return true;
} else if((isDRCard(input))&amp;&amp;(isDRLoayltyEnabled())) { //would return 1 for DR card only when isDRLoayltyEnabled returns true 
    return true;
}       
return false ;
</code></pre>
