Question: Using the your code for genotype as a starting place, create a function string genotype(char m1, char m2, char p1, char p2) that returns a

Using the your code for genotype as a starting place, create a function string genotype(char m1, char m2, char p1, char p2) that returns a string corresponding to the most likely genotype for offspring. So if YY is the most likely genotype, the function returns YY. Your function should return an appropriate error string if there is any invalid input. 1. Write pseudocode to do this. Make sure you understand the code before you start (you may have worked with it last week). Check your answer with one of the lab teachers before moving on, and get your lab report signed. 2. Translate your pseudocode from 1 into C++ code. Add a main function that calls the function appropriately. Copy-paste your code into your lab report. Run your code with several outputs to be sure its right before moving on. 3. Write psudocode for a new function double probability_genotype(char m1, char m2, char p1, char p2, string geno) In addition to the parental alleles, this function takes in a string geno; YY, Yy, or yy. The function should return the probability of the offspring of these two parents having the genotype geno, and -1 if there is invalid input. 4. Translate your pseudocode from 3 into C++ code. Add a main function that calls the function appropriately. Copy-paste your code into your lab report. Run your code with several outputs to be sure its right before moving on.

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!