Object Oriented Programming Assignment Help

Hello,

I am new to this website and was wondering if I could get some help with an assignment for a class. This is the assignment:

-This is a database of employees and managers.
-Base class EMPLOYEE has these private data members: NAME, SALARY, YEAR_HIRED.
-Each of these should be a an array of size 10.
-Derived class MANAGER has one private data member STAFF of size 5.
-Declare one instance of EMPLOYEE and 2 instances of MANAGER.
-Assign employees #1- 5 to Manager1 and employees #6-10 to Manager2.
-Employees have name, salary, year_hired. Managers have name, salary, year_hired, staff.

Main program should initialize 10 employees and allow user to output employee records and make changes. User should also be able to list all employees on staff of a given manager as a report.

Class should be in header file.


Can someone assist me with this?
Last edited on
Anyone?
What do you have so far? We won't do your homework for you, but if you make a good effort at starting the project, we will answer questions that you might have.
This is what I have so far:



#include <iostream>
using namespace std;

class employee

{
private:
double salary[10];
double year_hired[10];
string name[10];

public:
string getname()
{return name;}

double getsalary()
{return salary;}

double getyear()
{return year_hired;}

void putname (string n);




};


class manager: public employee

{
private:
string staff[5];

};



int main()

{
double emplsalary;
int emplyr;
string emplname, mangname;

employee EMPL1;
manager MANAGE1, MANAGE2;


cout<<"Enter employee name"<<endl;
cin>>emplname;
EMPL1.emplname;
MANAGE1.staff[0]=emplname;




return 0;
}
Topic archived. No new replies allowed.