Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Questions about code. I have bolded the lines I have a question on, and my questions are italisized and bolded. Please explain as best

 C++ Questions about code. I have bolded the lines I have a question on, and my questions are italisized and bolded. Please explain as best as you can, maybe use other examples. #include #include //why doesn't it work as just '#include? #include using namespace std; class PayRaise { public: PayRaise(char * = " " , float = 0.0, float = 0.0); ~PayRaise();  void printData(); //what exactly is printData? Where does it come from? What's it doing?  void calcBonus(float); private: char name[20]; float oldpay, raiseper, raiseamount, newpay; }; PayRaise::PayRaise(char *n, float o, float rp) // what's the two colons? { strcpy(name, n); oldpay = o; raiseper = rp; raiseamount = oldpay*raiseper/100; //I don't really get this bolded part. Please explain what you can newpay = oldpay + raiseamount;  } PayRaise::~PayRaise() { cout<<"the name of "<2)<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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What lessons in OD contracting does this case represent?

Answered: 1 week ago

Question

Does the code suggest how long data is kept and who has access?

Answered: 1 week ago