Question: C++, please! #include #include using namespace std; double calcLikenessScore(string seq1, string seq2) { int n=seq1.length(); //length of seq1 int m=seq2.length(); //length of seq2 if(n !=

 C++, please! #include #include using namespace std; double calcLikenessScore(string seq1, string

 C++, please!  #include  #include  using namespace std; double calcLikenessScore(string seq1, string seq2) { int n=seq1.length(); //length of seq1 int m=seq2.length(); //length of seq2 if(n != m) //if lengths of both the strings are not equal then we return -1 return -1; int match_cards = 0; //variable to store the matching cards int bonus = 0; //variable to store the bonus for(int i=0;i  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): o seq1 (string) - The Player's Sequence (length greater than or equal to Golden Sequence) o 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. Example: Expected output from a longer Player's Sequence and the Golden Sequence seq1 seq2 likeness_score S7H8SJD9H8CJD9 0 S7H8SJD9H8CJD9 1.67 S7H8SJD9H8CJD9 H8C6D60 0 S7H8SJD9H8CJD9 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. Paste only your function in the answer box! Do not paste main or #includes, just the function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!