create a tool to help somebody like ethan hunt in Mission Impossible I (IMDB listing) select the ideal crew for his sneaky business
data structures > team optimizer project

Team Optimizer: Fundamentals projecet

Get a grasp of C++ language fundamentals and the essential operations on our two favorite data structures: vector and map. Code as closely as you can to the specs, but don't stress; work at an assertive pace, but don't get worn down


Project specifications
Sample output
Suggested steps
Keep Coding! Extension exercises

bookProject specification


Create a console-based tool in C++ which captures information about candidate (users) and, based on crude analysis of that input, maps chosen candidates to team roles, and displays the results

required organs

Candidate list

Store the names of each user who enters candidate information into the system

Role:Candidate mapping

Choose a job, project, mission, etc. that seems interesting to you that requires at least three memebers. Define those members in roles, each of which becomes a key in a map data structure. Arrange the final team by associating a candidate with each role in the map

required interface

Rudimentary menu-based navigation

Your program should have at least two "modes", only the first of which requires input:

  1. Candidate screening: Ask the user your screening questions. When all questions have been answered, prompt the user that input is complete. Reset the prompt to simulate gathering information about another user. Include a structure for ending candidate screening.
  2. Suggested role-candidate mapping display: At the user request--most likely when the screening is over--compute the optimal assignments for your team's roles and display the final mapping to the console.

Candidate screening questions

Ask each candidate for at least three pieces of information used in assigning them to a role in the team, one of which is their name.

Complete candidate listing

For this introductory program, a simple output of role-candidate name connections is all that is needed. A much more useful output would include any scoring information used by your program to make assignments to each role, but this is not required.


Include comments above each method describing its key functionality. Include comments above or a the end of each unclear/important line of code.

You should write all the code for your program, copying nothing from any other resource. If you use somebody else's code closely--i.e. using its essential structure but changing variable names--include a citation in your comments.


Get your code working in your environment and post a link to the file including your main() method in the project tracker tab of our master work spreadsheet.

arrow_upward top

Sample program output

This program implements the most rudimentary functionality as brain food for your own program

Suggested Steps

Step 0: Plan functions, flow chart logic

  1. Choose a team you'd like to build. Which roles do you need to fill?
  2. What criteria are you going to gather about each candidate to make the mapping?
  3. How are you going to make assignments to your roles from the candidate list? What is the absolute simplest way you can do this? What is a more complex approach?
  4. On paper or digitally (perhaps with diagram the core components required to carry out the program's essential functions only
  5. Declare an appropriate set of global variables of appropriate types for containing the essential program information

Step 1: Declare globals and define functions

Create global variables for your candidate list and your final role-candidate map

Using Stroustrup and other non-stack-overflow resources, declare functions with thoughtful signatures to carry out your program's key tasks.

With the function declarations in place, write their guts

Extension ideas

Allow team leader adjustment of role-mappings

Build a console-based interface for mode 2 of your program such that the team leader can view the current status of the role-candidate mappings and then choose to manipulate those Key-value pairs individually. You might present the candidate list with index values displayed so the user could, say, request to map role 1 to candidate at index 3.

Allow team leader to choose the assignment mechanism

Create more than one method for assigning a candidate to a role and allow the user to try them out and see the results.

Use object-oriented design for candidate qualifications

In our class sample, we used standard library containers for working with all our data. Dust off your object-oriented design skills and create a Candidate class whose members represent an individual candidate's responses to the screening questions.

You might then create a map instead of a vector for storing candidate information, the keys still being the candidate names, but the values being your custom Candidate class

Page created in 2020 and can be freely reproduced according to the site's copyleft use agreement.