For the employee class make

Assignment Help C/C++ Programming
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;
}

Reference no: EM13164880

Questions Cloud

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

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write main function to compute stress-strain in steel rod

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads.

  C program that compare the time required

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Squares, triangles, circles and ellipses

write a program which will answer a pair of questions for squares, triangles, circles and ellipses. A square is defined by its lower left corner ( S L L x , S L L y ), and the length of one side  S W .

  Skills required by personnel working in information security

What skills are required by personnel working in information security? Write down some job titles in the field and come up with some required qualifications and some desirable qualifications.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Create a website that would allow users to enter and submit

Create a Website that would allow users to enter and submit survey

  Write program function prompt user for number of elements

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.

  Write a program in c of fibonacci series

Write a program in c of fibonaci series with and without using fibo func, both

  A linked list of your song structure in cd

The CD object should have a data member that is a linked list of your song structure that you have in CD.  The CD class needs a function that allows it to add a song to the object, that function would then append the song to that instance of the link..

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

  File system with login authentication

Implement a simple file system with login authentication and access control - Construct a hash/salt/shadow based user/password creation system.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd