Reference no: EM13164880
Start with the code below. The functions in Employee class are not yet defined, they need to be. This is also true with WorkGroup, but new functions need to be added as well. There needs to be an overloaded "==" operator defined (determine if duplicate workgroups exist). Since the WorkGroup class uses dynamic memory, there needs to be an overloaded assignment operator, a copy constructor and a destructor.
For the Employee class make sure that no person is underage or too old (less than 16 or greater than 80). Do nothing for the set function if the person's age is out of range.
The addEmpl function should add a new employee to the list if there is room in the array. If successfully added, the function returns a true. If not, no change is made to the array and the function returns a false.
In the WorkGroup class, the "workers" value keeps track of how many people are in the group, while "max" is the size of the array.
#include <iostream>
#include <string>
using namespace std;
class Employee
{
public:
void set(string f, string l, int a, double wp)
{
}
string getFN()
{
}
string getLN()
{
}
int getA()
{
}
double getWP()
{
}
private:
string fname, lname;
int age;
double wklyPay;
};
class WorkGroup
{
public:
WorkGroup()
{
}
WorkGroup(int howMany)
{
}
bool addEmpl(string f, string l, int a, double wp)
{
}
void displayAll()
{
}
private:
Employee *ea;
int workers, max;
};
int main()
{
// there needs to be testing code here
return 0;
}
What is the actual amount of magnesium oxide produced
: what is the actual amount of magnesium oxide produced when excess carbon dioxide reacts with 42.8 grams of magnesium metal?
|
State what volumes are the two equivalence points
: The di basic compund B(pkb1=4.00),pkb2=8.00 was titrated with 1.00 M HCl. the intial solution of B was 0.100M and had a volume of 100.0mL. A) At what volumes are the two equivalence points?
|
World trade organization and international monetary fund
: These two acronyms for the "World Trade Organization" and "International Monetary Fund" bear the most weight in many discussions of what globalism and cooperation between the first and third worlds looks like in our contemporary society.
|
How many moles of c atoms are in the toothpaste
: A toothpaste contains 0.24 % by mass sodium fluoride, NaF and 0.30 % by mass of triclosan, C12H7Cl3O2. The mass of one tube of toothpaste is 119 g.
|
For the employee class make
: For the Employee class make sure that no person is underage or too old (less than 16 or greater than 80). Do nothing for the set function if the person's age is out of range.
|
How many total hydrogen atoms are in this solution
: A solution of ammonia and water contains 4.50×1025 water molecules and 5.30×1024 ammonia molecules. How many total hydrogen atoms are in this solution?
|
Public policy
: What does McChesney list as the core reason that media systems have long been shaped, and their determined, by public policy?
|
What is the total mass of chloroform in the second sample
: A sample of chloroform is found to contain 10.5 g of carbon, 93.1 g of chlorine, and 0.88 g of hydrogen. If a second sample of chloroform is found to contain 20.8 g of carbon, what is the total mass of chloroform in the second sample?
|
Advantages of the database approach
: What are the advantages of the database approach over the traditional approach to database management? What is a data center, and why are they becoming increasingly important
|