Question: //can anyone help me make this its not fully done but i got some stuff so far. /* * @file h44.h * @author Your name

//can anyone help me make this its not fully done but i got some stuff so far.

//can anyone help me make this its not fully done but i

/*

* @file h44.h

* @author Your name goes here

* @version what day and meeting time

*/

#ifndef H44_H_

#define H44_H_

#include

/////// Declare all of your classes here ////////////////

class Worker

{

public:

//virtual inline destructor

virtual ~Worker(){}

Worker(const std::string& name, double rate);

std::string getName() const;

double getRate() const;

//abstract function

virtual std::string payInfo(int hours) const = 0;

//in SalariedWorker

virtual std::string payInfo(int hours);

private:

std::string name;

double rate;

};

#endif

-----------------------------------------------

/** @file h44.cpp @author your name here @version what day and meeting time */ #include #include #include #include // Add additional headers here using namespace std;

string STUDENT = " "; // Add your Canvas/occ-email ID

#include "h44.h"

// Add your implementation here

string SalariedWorker::payInfo(int hours) { return ""; }

Your Turn: Virtual Workers of the World, Arise! Upload the starter code to your workspace. For this assignment, you will need to create an abstract base class Worker. Every worker has a name and an hourly rate (along with the appropriate accessor methods). The Worker class should have a pure virtual payInfo(int hours) function that returns the worker's name and computed salary as a formatted string. You'll also need to create two derived concrete classes Hourlyworker and Salaried- Worker. An hourly worker gets paid the hourly wage for the actual number of hours worked for the first 40 hours and time and a half for any hours over that. The salaried (aka "exempt) worker gets paid the hourly wage for 40 hours, no matter what the actu- al number of hours is. The test program that I've written tests your classes by creating four Worker pointers and then pointing each to a different derived class. It then calls the payInfo() function for each worker, using different hours (less than and more than 40 hours) Here's some sample output: Sam (Hourly, $ 20.00) worked 20 hours. Pay: 400.00 Tom (Salaried, $ 30.00) worked 20 hours. Pay: $ 1200.00

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!