Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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.

has Project Private: max saff per project int project. ID: int Project name: string Public Project (int p id, string p name, int max staff Company Private: stafflist: vectorkStaff> project list Project public Company() management void Staff Private: Name: string ID:int Public: Safflint ID, string name)

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;
   }