• Implementation: I have utilized Chain of responsibility and Strategy pattern to solve this problem. To describe about strategy pattern, based on the input filename is entered, appropriate strategy is selected, and suitable file-reader object is created, and first concrete handler is called. In case of match, concrete handler returns the string with the correct card-type, otherwise the successor is invoked to process the request.
• Testing: For testing, I have hard-coded the directory path (where input files are present) instead of taking input from terminal. Each test reads the output file which has been recently created and compares the card-type with the expected result to see if the test passed.

