-The program attached complies correctly I just need the program to be separated into functions and files and match the sample output below when it runs.
AssignmentUsing main.cpp downloadas a starting point, write a program that inputs two simplified poker hands and determines which (if either) of the hands is the winner, according to the following rules:
If the two hands have different types (3-of-kind, straight, pair, high-card), the hand with the better type (i.e., appears earlier in this list) wins.If they have the same type, the higher significant card wins.If the hands have the same type and significant card, there is no winner (a tie).Note that the only significant factors are four types of hand and what is the significant card (high card or card in a pair/triple). In real poker, a tie in the criteria above would be resolved by comparing the non-pair or next-highest card. You may do this if you wish, but it is not required.Additional Assignment RequirementsYour program must be decomposed into functions and files. You should not have more than one function that does the same thing. For example, there should be one function (with three reference parameters) that inputs a hand. This function can be used twice (passing different cards as parameters) in order to input the two hands.You may only use concepts and language features presented in class so far (i.e., chapters 1-6 + lecture/demo on separate compilation).
Please make sure that the files are named properly (especially the source code files (e.g., main.cpp, tools.cpp, tools.h, cards.h, and cards.cpp).
SAMPLE OUTPUTEnter the 1st hand.Card 1: 10Card 2: 10Card 3: 10
Enter the 2nd hand.Card 1: 4Card 2: 5Card 3: 6three tens beats a six-high straight.
Do you want to go again (y/n)? y
Enter the 1st hand.Card 1: 13Card 2: 12Card 3: 11
Enter the 2nd hand.Card 1: 1Card 2: 2Card 3: 3a king-high straight beats a three-high straight.