write a C++ program to represent the relationships between classes company, staf
ID: 3775259 • Letter: W
Question
write a C++ program to represent the relationships between classes company, staff and projects as shown above. suppose that the company consists of unknown members of a staff and project (a project is a group of Staff members work on a specific task).
Note:
1. use vectors for both staff list and Project list in company class.
2. array static and dynamic is not acceptable.
3. management function will let you add staff members, add projects and add staff members to the project list.
Explanation / Answer
Please find the answer...
#include<bits/stdc++.h>
#define endl ' '
using namespace std;
class Project
{
int mspp;
int pid;
string pname;
public:
Project(int pid,string pname,int mspp)
{
}
};
class Staff
{
private:
int id;
string name;
public:
Staff(int id,string name)
{
}
};
class Company
{
private:
vector<Staff> StaffList;
vector<Project> ProjectList;
public:
Company(){}
void management()
{}
};
int main()
{
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.