Card

public class Card { private static String name = "Johnny Cash"; // Card holdersname private static int cardNumber = 123456789; // Card holders number private static int accountNumber = 978945; // Account number private static int pinNumber = 1234; // Pin Number private static int messageKey = 832923932; // Secret Message Key Encrypted private static int messageResult = 13439; // Secret Message Key Decrypted // Swipe method, this method takes in an ATM object and returns the cards data if the ATM // is considered a valid one or returns null if the ATM is found to be invalid. public static ATM.Data swipe(ATM anATM) { int result = anATM.applyDecryption(messageKey); if(result == messageResult) { return new ATM.Data(cardNumber, accountNumber, name, pinNumber); } return null; } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.