Question: i completed my two file my . cpp and my . h file i just need my main file on task 1 , 2 ,

i completed my two file my .cpp and my .h file i just need my main file on task 1,2,3 i got the hours and amount of people but not the problem solving where it convert i look through my code but doesnt seem any code command that can assist me here are three files and also output of what my proffesor want
hrsToDays1.cpp
#include
#include "NumDays.h"
using namespace std;
int main()
{
//*****Definitions: Local Variables and Constants
const int NUM =5;
int numEmp;
double hrsworked;
NumDays emp1[NUM];
NumDays sumEmployees;
//*****Program Statements
cout "Project ""U3-01h"" prepared by "
"" endl endl;
//TASK 1: prompt for employee hours and display the days
//...code goes here
cout "How many employee will be processed?";
cin >> numEmp;
for (int i =0; i numEmp; ++i){
cout "Enter hours worked by Employee#" i +1":";
cin >> hrsworked;
}
//TASK 2: report total days worked by all employees
//...code goes here
//TASK 3: use overloaded + and - operators and display results
//...code goes here ignore it
return 0;
}
NumDays.h
#ifndef NUMDAYS0_H
#define NUMDAYS0_H
class NumDays
{
private:
//do not modify private data members
double hours;
double days;
static double totHrs;
public:
//all class member functions are inline
//except for overloaded operators + and -,
//and the static function getTotDays()
NumDays()
{
hours =0; days =0;
}
void sethours(double h)
{
hours = h;
setDays(hours /8);
totHrs += hours;
}
double getHours() const
{
return hours;
}
void setDays(double d)
{
days = d;
}
double getDays() const
{
return days;
}
static double geTotDays();
NumDays operator+(NumDays& right);
};
#endif
NumDays1.cpp
// Implementation file for the NumDays class
#include "NumDays.h"
#include
using namespace std;
double NumDays::totHrs =0;
double NumDays::geTotDays()
{
return totHrs /8;
}
NumDays NumDays::operator+(NumDays& right)
{
NumDays temp;
temp.sethours(hours + right.getHours());
temp.setDays(days + right.getDays());
return temp;
}(ICIUsers\Shafie Sheikh\OneDrive - Tarrant Coun...
Project U3-01h prepared by =2.5=1=3=1.5=1=9
i completed my two file my . cpp and my . h file

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 Accounting Questions!