Question: C++, please! #include #include using namespace std; // Declaring the function as double double calcLikenessScore(string seq1, string seq2){ // Length of seq1 int n =

C++, please!
#include
#include
using namespace std;
// Declaring the function as double
double calcLikenessScore(string seq1, string seq2){
// Length of seq1
int n = seq1.length();
// Length of seq2
int m = seq2.length();
// If lengths of both the strings are not equal then we return -1
if(n != m)
return -1;
// Variable to store the matching cards
int match_cards = 0;
// Variable to store the bonus
int bonus = 0;
for(int i=0;i {
// If the suit of both the sequences is equal
if(seq1[i] == seq2[i])
{
// Matching cards is incremented by 1
match_cards++;
// If the rank of both sequences is also equal
if(seq1[i+1] == seq2[i+1])
{
// Bonus is incremented by 1.
bonus++;
}
}
}
// Total cards are length/2.
int total_cards = n/2;
// Calculating
double likeness_score = double(match_cards)/double(total_cards) + bonus; likeness_score
return likeness_score;
}
int main() {
cout
cout
cout
cout
cout
return 0;
}
Write a function called bestLikenessScore() that is going to find the best Likeness Score between all the subsequences of a sequence (whose length is greater than or equal to the Golden Sequence) and the Golden Sequence. Function Specifications: Name: bestLikenessScore() Parameters (Please Follow the same Order): seq1 (string) - The Player's Sequence (length greater than or equal to Golden Sequence) gold_seq (string) - The Golden Sequence Return Value: Best Likeness Score - best_likeness_score (double) Length of seq1 should be greater than or equal to gold_seq for the function to calculate the Best Likeness Score. Compare the sub-sequences from the player's sequence to the Golden Sequence to find the Best Likeness Score among all the sub-sequences. Use the previous calcLikenessScore() function from Question 4 to find the Likeness Score once the sub-sequence is obtained. The function should not print anything, . . 0 Example: Expected output from a Longer Player's Sequence and the Golden Sequence seq1 seq2 likeness_score S7H8SJD9H8CJD9 S7H8SJD9H8CJD9 1.67 S7H8SJD9H8CJD9 H8C6D60 S7H8SJD9H8CJD9 0 S7H8SJD9H8CJD9 2 The function should calculate the Likeness Score between all the sub-sequences and the Golden Sequence and should return only the Best Likeness Score as indicated. In the example above, the last subsequence has the highest score, 2, and therefore 2 should be the return value. Write a function called bestLikenessScore() that is going to find the best Likeness Score between all the subsequences of a sequence (whose length is greater than or equal to the Golden Sequence) and the Golden Sequence. Function Specifications: Name: bestLikenessScore() Parameters (Please Follow the same Order): seq1 (string) - The Player's Sequence (length greater than or equal to Golden Sequence) gold_seq (string) - The Golden Sequence Return Value: Best Likeness Score - best_likeness_score (double) Length of seq1 should be greater than or equal to gold_seq for the function to calculate the Best Likeness Score. Compare the sub-sequences from the player's sequence to the Golden Sequence to find the Best Likeness Score among all the sub-sequences. Use the previous calcLikenessScore() function from Question 4 to find the Likeness Score once the sub-sequence is obtained. The function should not print anything, . . 0 Example: Expected output from a Longer Player's Sequence and the Golden Sequence seq1 seq2 likeness_score S7H8SJD9H8CJD9 S7H8SJD9H8CJD9 1.67 S7H8SJD9H8CJD9 H8C6D60 S7H8SJD9H8CJD9 0 S7H8SJD9H8CJD9 2 The function should calculate the Likeness Score between all the sub-sequences and the Golden Sequence and should return only the Best Likeness Score as indicated. In the example above, the last subsequence has the highest score, 2, and therefore 2 should be the return value