Question: C++ For the given class code given below, create the associated class definition. Our test cases already have the code below, we just need the

C++

For the given class code given below, create the associated class definition.

Our test cases already have the code below, we just need the correct definition (the information placed in a .h file).

Quarterback::Quarterback(){ pass_completes = 0; pass_attempts = 0; total_yards = 0; touchdowns = 0; intercepts = 0; } void Quarterback::setName(string new_name){ name=new_name; } string Quarterback::getName(){ return name; } void Quarterback::setComp(int x){ pass_completes=x; } int Quarterback::getComp(){ return pass_completes; } void Quarterback::setAtt(int x){ pass_attempts=x; } int Quarterback::getAtt(){ return pass_attempts; } void Quarterback::setYards(int x){ total_yards=x; } int Quarterback::getYards(){ return total_yards; } void Quarterback::setTD(int x){ touchdowns=x; } int Quarterback::getTD(){ return touchdowns; } void Quarterback::setPick(int x){ intercepts=x; } int Quarterback::getPick(){ return intercepts; } 
 
void Quarterback::PassCompleted(int x){ pass_completes+=x; total_yards = total_yards+x; PassAttempted(); } void Quarterback::PassAttempted(){ pass_attempts+=1; }

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!