Snap!
Implement the class Snap to play the classic card game according to the following rules
The application should generate a shuffled deck of 52 cards and display them in shuffled order.
The rank of each consecutive pair of cards is compared and the message “SNAP!!!” is displayed when a match is found (i.e., for 52 cards, 51 comparisons are made).
After all comparisons are made, the application reports the number of snaps found.
Extend the Snap class to check for supersnaps (where the cards are of the same colour as well as the same rank). Add new methods to the Card class to help you as required.
The message “SUPERSNAP!!!” should be displayed when a snap with similarly coloured cards is found.
The final output should report both the number of supersnaps and the number of snaps.