Question: C++ programming language Notes: Accessing vector/list entries should be done using iterators , in a generic way, i.e.: for ( auto it = team.begin(); it

 C++ programming language Notes: Accessing vector/list entries should be done using

C++ programming language

Notes:

  • Accessing vector/list entries should be done using iterators, in a generic way, i.e.:

for ( auto it = team.begin(); it != team.end(); ++it ) { /* your code */ }

  • You should use generic functions from the library e.g., rotate (in part b), etc.

Exercise 2: You are assigning tasks to your team. There are four tasks to be rotated among team members. Tasks are: fetching water, collecting firewood, cooking, and cleaning up. You are to add an option (#6) to the program in part (a) that prompts the user for the desired number of working days and prints a schedule of daily duties for the team. The "Task" class is provided to you with the following data and function members: 1. Three data members: id, name, duration, - as described above. 2. A constructor with arguments (id, name and duration) 3. Getter functions for all data members. 4. An operator overload function for extraction

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!