26-AUG-2020: Cooked up for data structures fundamentals 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
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
Store the names of each user who enters candidate information into the system
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
Rudimentary menu-based navigation
Your program should have at least two "modes", only the first of which requires input:
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 repl.it environment and post a link to the file including your main() method in the project tracker tab of our master work spreadsheet.
Sample program output
This program implements the most rudimentary functionality as brain food for your own program
Step 0: Plan functions, flow chart logic
- Choose a team you'd like to build. Which roles do you need to fill?
- What criteria are you going to gather about each candidate to make the mapping?
- 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?
- On paper or digitally (perhaps with diagrams.net) diagram the core components required to carry out the program's essential functions only
- 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
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.