To practice the use of a vector and the vector functions

Assignment Help Computer Engineering
Reference no: EM132177372

Vectors and Searching Purpose: To practice the use of a vector and the vector functions: Specifications: This program will allow the user to see a list of teams, add a team to the list, or search for a team using an ID.

1. Structure Definition First define struct TeamS with an integer field to hold an ID, and an array of strings with three elements to hold the names of the team members.

In the main function, declare an empty vector of TeamV and also the following arrays: const int ID [NUM_TEAMS] ={ 123, 321, 456, 789}; const string MEMBERS [NUM_TEAMS] [NUM_MEMBERS ] = { {"Mike", "Joe", "John"}, {"Christina", "Kevin", "Jim"}, {"Thomas", "Kim", "Emily"}, {"July", "Jason", "Jason"} };

2. Creating the vector- Call a function with the following prototype and pass in the empty vector and the arrays: void Initialize (vector & TeamV, const int id[], const string m[][NUM_MEMBERS], int arraySize); The function should place into the vector the elements of the arrays.

For example, the first element of the vector will have team id: 123 and members: Sarah, Joe, and John.

The second element of the vector will have team id: 321 and members: Chris, Kevin, and James, and so on. 3. The print function (10 points) Back in main, call a function with the following prototype to show that your vector has been populated with the team information: void printList (const vector & TeamV); The function simply prints out the content of the vector.

 

Reference no: EM132177372

Questions Cloud

Define a structure named employee : When the user selects an employee ID in the list box, the employee's salary should appear in the lblSalary control.
Monetary policy further to deal with the crisis : Once the federal funds rate target reached almost zero at the end of 2008, traditional open market operations were no longer able to ease monetary policy
Tasks of a police officer rarely call : Many police officers positions require the applicant to have a college degree even though the tasks of a police officer rarely call upon college course material
List the different methods that could be used for collecting : List the different methods that could be used for collecting requirements for the above case study. List at least 4 different methods.
To practice the use of a vector and the vector functions : To practice the use of a vector and the vector functions: Specifications: This program will allow the user to see a list of teams, add a team to the list.
Will there be any rural-urban migration as things stand : Suppose the real rural wage is $1.7 per day. Urban modern/formal sector employment can be obtained with a 0.25 probability and pays $5 per day.
Companies that require a traditional workforce : Will the increased interest in entrepreneurship cause difficulties for companies that require a traditional workforce?
Calculate the optimal price that the manufacturer : Production involves a monopoly manufacturer, with a marginal cost of $40, selling to a monopoly downstream retailer, whose only cost is the price paid to the ma
Discuss what are the new innovation today in this area : Virtual Machines: Discuss what are the new innovation today in this area and what effect this area have on the computer field.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Combine the session presentation and application layer

What are advantage of combining the session presentation and application layer in OSI model into one single application layer in the internet m

  Explore the different methods of calculating subnets

Research some of the options these various methods provide, and create your own "cheat sheet" to help pre-pare you for subnetting on the CompTIA Networkþ exam.

  How many times a user specified word appears in the files

Display the name of input files and corresponding number of occurrences of the specified word.

  Briefly describe what mppullin and mppushout are used for

Briefly describe what MpPullIn and MpPushOut are use for. Chorus supports both RPC and an asynchronous send. What is the essential difference between these two?

  How many secret keys are needed if everyone trusts president

How many secret keys are needed if everyone trusts the president of the club? If a member needs to send a message to another member.

  Create a rfp which interested vendors could respond

Assume that you are leading a project that will implement a new course registration system for your university. Create a request for proposal (RFP) to which interested vendors and consultants could respond.

  How quickly are analytics being adopted

What analytics do leading pro teams and leagues use for basketball, baseball, football, and soccer? How quickly are analytics being adopted? Who is leading?

  Return the minimal number of district borders

Circles Country is a country that contains several circular-shaped districts. Some districts may be situated inside other districts, but their borders

  Write a program for converting us measurement values

Write a program for converting US measurement values to their corresponding metric measurement.

  Who will generate the error message

Somewhere in middle of the United States are two Internet routers with routing tables. If so, who will generate the error message, and what might it look like?

  Explain two specific products from different vendors

At this point, you have been introduced to various security tools. You are to take one of the five identified categories of tools and identify two specific products from different vendors.

  Write java programs to simulate the management

CS3810: Write java programs to simulate the management of customer queues in a grocery store. Assume that there are two cashier counters in the store.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd