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

  Create class has three pieces of information as data members

Create a class called Date in C++ that includes three pieces of information as data members: month (type int), day (type int) and yaer (type int).

  Write a scanf statement to read in one number (int

1) Write a scanf statement to read in one number (int), and another statement to print out that number.

  Properly store the number from variable value

1. Statement will properly store the number from variable  value  into the output file object AnsFile?

  Const int num_years

How do you get this program to get both player input and then display results(As described on bottom) #include  const int NUM_YEARS=15;//The number of years const int NAME_SIZE=32;//The max size of the player name string

  Draw the heap

Eric Rowe Starting with an empty minheap, draw the heap after each the completion of the following operations  and repeat for a maxheap (replace removeMin() with removeMax()). Upload your drawings here. Hand drawn is fine:

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Write a function to arrange 10 numbers stored in an arraye

Writ a funtion to arrange 10 numbers stored in an array forom the largest to the smallest and pass the results to main program.

  Grocery store program

This program draws upon several concepts that were covered in CptS 121 and should serve as a good refresher for CptS 122. Our store, Cougar Mart, maintains its inventory in a text file. Not being very tech savvy, the owner of Cougar Mart needs you to..

  Demonstrate the construction and output of an array

In fluid mechanics, the Reynolds number (Re) is a dimensionless quantity that is used to help predict similar flow patterns in different fluid flow situations. For example, Reynolds numbers can be computed for different velocities of fluid flow over ..

  Repeat these questions by writing functions

Repeat these questions by writing functions that receive the arrays as constant reference parameters and return the appropriate values through the function name (via return statement). The function header could look like:

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

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