Question: This is the solution but it doesn't seem to run any help PS: If you get it to work please screen shot the out put.Also

 This is the solution but it doesn't seem to run any

This is the solution but it doesn't seem to run any help

PS: If you get it to work please screen shot the out put.Also Please read the question to understand the code

double expectation(string letter_grade[], int cost[], double prob[], bool F); void printInfo(string letter_grade[], int cost[], double prob[], double e);

//our main function int main ( void ) {

//for order we declare variables at the top of the program. int classes; //so these are going to be arrays string letter_grade[5] = {"A", "B", "C", "D", "F"}; int cost[5] = {0,0,0,0,0}; double prob[5] = {0.0,0.0,0.0,0.0,0.0}; char F_input; bool F = false; double e = 0.0;

//so that we collect all the information needed //for all letter grades. for (int i = 0; i

//ask the user for number of courses cout 15){ cout 1.0){ cout

}

//this function will calculate the expectation of this scenario //and output the expectation. double expectation(string letter_grade[], int cost[], double prob[], bool F){ double expectation = 0.0; if (F == true){ cost[4] = 0; for(int i =0 ; i

void printInfo(string letter_grade[], int cost[], double prob[], double e){ cout Sometimes we need an extra push to work diligently. One such parenting tech- nique is positive reinforcement based on grades. One suggestion is giving money based on grades one receives in a semester or year. We will see whether or not a program is actually a true incentive for doing well in school. Your goal for this project is to create a program which receives the following information: number of courses (between 5 and 15 would be appropriate to pre vent run time errors), dollar amounts for each letter grade, and the probability for completing each letter grade. Appropriate error messages should occur for the given prompts. The following outputs should occur: a) Quantity of Each Letter Grade AIUTni iven for Combination c) Expected Probability for entire problem Your code should include methods for handling nonnegative dollar amounts for grades: parents can opt to give no money or ask for money in return should a D or Fbe received. Parents should also be able to suggest if an F is received, no money at all is given Provide outputs for the following: a) 5 classes. Cash: 10 for A, 3 for B, 1 for C, 0 for D/F. Probabilities: 1/3 1/4, 1/5, 1/6, 1/20. Do both the case where you can still earn money despite an F and the case where you cannot earn money if you received an F, but you can despite a D b) 12 classes. Cash: 20 for A, 5 for B, 2 for C, 0 for D, -10 for F. Probabili ties: 1/2, 1/4, 1/5, 1/25, 1/100 If a student were able to calculate these probabilities on their own, would there be actual incentive to obtain all A's? Does the amount of classes or the dollar amounts greatly affect the incentive? Based on these questions, should such an incentive method actually be used? Explain your conclusions

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!