Question: QUICK ANSWER*** please modify this code so it matches what the prompt is asking for #include #include #include using namespace std; class PayRaise { public:

QUICK ANSWER*** please modify this code so it matches what the prompt is asking for

#include #include #include

using namespace std;

class PayRaise { public: PayRaise(char * = " " , float = 0.0, float = 0.0); ~PayRaise(); void printData(); void calcBonus(float);

private: char name[20]; float oldpay, raiseper, raiseamount, newpay;

};

PayRaise::PayRaise(char *n, float o, float rp) { strcpy(name, n); oldpay = o; raiseper = rp; raiseamount = oldpay*raiseper/100; newpay = oldpay + raiseamount;

}

PayRaise::~PayRaise() { cout

void PayRaise::printData() { cout

}

void PayRaise::calcBonus(float bonusamount) {

oldpay += bonusamount; raiseamount = oldpay*raiseper/100; newpay = oldpay+ raiseamount;

}

int main() {

PayRaise p ("Corby Bryan", 50000, 10); p.printData();

cout>bonus;

p.calcBonus(bonus); p.printData(); cout

return 0;

}

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!