1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sveta [45]
2 years ago
9

This program will store roster and rating information for a soccer team. coaches rate players during tryouts to ensure a balance

d team. (1) prompt the user to input five pairs of numbers: a player's jersey number (0 - 99) and the player's rating (1 - 9). store the jersey numbers in one int vector and the ratings in another int vector. output these vectors (i.e., output the roster). (3 pts) ex:
Business
1 answer:
Vedmedyk [2.9K]2 years ago
4 0

Answer:

Explanation:

#include <iostream>

#include <vector>

using namespace std;

int main() {

   vector<int> jerseyNumber;

   vector<int> rating;

   int temp;

   for (int i = 1; i <= 5; i++) {

       cout << "Enter player " << i

            << "'s jersey number: ";

       cin >> temp;

       jerseyNumber.push_back(temp);

       cout << "Enter player " << i

            << "'s rating: ";

       cin >> temp;

       rating.push_back(temp);

       cout << endl;

   }

   cout << "ROSTER" << endl;

   for (int i = 0; i < 5; i++)

       cout << "Player " << i + 1 << " -- "

            << "Jersey number: " << jerseyNumber.at(i)

            << ", Rating: " << rating.at(i) << endl;

   char option;

   '

   while (true) {

       cout << "MENU" << endl;

       cout << "a - Add player" << endl;

       cout << "d - Remove player" << endl;

       cout << "u - Update player rating" << endl;

       cout << "r - Output players above a rating"

            << endl;

       cout << "o - Output roster" << endl;

       cout << "q - Quit" << endl << endl;

       cout << "Choose an option: ";

       cin >> option;

       switch (option) {

           case 'a':

           case 'A':

               cout << "Enter a new player's"

                    << "jersey number: ";

               cin >> temp;

               jerseyNumber.push_back(temp);

               cout << "Enter the player's rating: ";

               cin >> temp;

               rating.push_back(temp);

               break;

           case 'd':

           case 'D':

               cout << "Enter a jersey number: ";

               cin >> temp;

               int i;

               for (i = 0; i < jerseyNumber.size();

                    i++) {

                   if (jerseyNumber.at(i) == temp) {

                       jerseyNumber.erase(

                               jerseyNumber.begin() + i);

                       rating.erase(rating.begin() + i);

                       break;

                   }

               }

               break;

           case 'u':

           case 'U':

               cout << "Enter a jersey number: ";

               cin >> temp;

               for (int i = 0; i < jerseyNumber.size();

                    i++) {

                   if (jerseyNumber.at(i) == temp) {

                       cout << "Enter a new rating "

                            << "for player: ";

                       cin >> temp;

                       rating.at(i) = temp;

                       break;

                   }

               }

               break;

           case 'r':

           case 'R':

               cout << "Enter a rating: ";

               cin >> temp;

               cout << "\nABOVE " << temp << endl;

               for (int i = 0; i < jerseyNumber.size();

                    i++)

                   if (rating.at(i) > temp)

                       cout << "Player " << i + 1

                            << " -- "

                            << "Jersey number: "

                            << jerseyNumber.at(i)

                            << ", Rating: "

                            << rating.at(i) << endl;

               break;

           case 'o':

           case 'O':

               cout << "ROSTER" << endl;

               for (int i = 0; i < jerseyNumber.size();

                    i++)

                   cout << "Player " << i + 1 << " -- "

                        << "Jersey number: "

                        << jerseyNumber.at(i) << ", Rating: "

                        << rating.at(i) << endl;

               break;

           case 'q':

               return 0;

           default:

               cout << "Invalid menu option."

                    << " Try again." << endl;

       }

   }

}

You might be interested in
You are thinking of purchasing a house. The house costs $350,000. You have $50,000 in cash that you can use as a down payment on
jeyben [28]

Answer:

$63,852

Explanation:

The computation is shown below:

a) PV of payments is

= $23,500 × (1.07^30 - 1) ÷ (0.07 × 1.07^30)

= $2,91,612

b) The Loan PV of payments is $3,00,000

c) And, the Balloon payment required is

= (Borrowed amount - loan PV payments) × (1 + rate of interest)^number of years

= ($300,000 - $291,612) × 1.07^30

= $63,852

5 0
3 years ago
Quizlet MODULE 1: STRATEGIC HUMAN RESOURCE MANAGEMENT (SHRM) (Wright, 2008) 1. List and describe the components of Porter’s Stra
PSYCHO15rus [73]

Answer:

Competitive Advantage  by  creating value

Value:

reduce cost Strategy; low prices

Differentiation Strategy: Creating a uniques product diffrent from your competitors

2Core Capabilities: it has do with creating competitive advantage, strategic resources to meet aims and objectives

3.Valuable, Rare, Inimitable, Organized

4.- Value of Human Capital: very key in contributing to competitive advantage

-  Human Capital must be distinct:

5.o Strategic Knowledge Workers: they have unique skills, get more pay

o Core Employees: they have skills to perform certain task.they can be replaced with another employer

o Supporting Labor: They have general skills

o Complementary/Alliance: They are like contractors or allies

see the explanation below for further answers to 6,7,8,9

Explanation:

1.  List and describe the components of Porter’s Strategy typology

Competitive Advantage  by  creating value

Value:

reduce cost Strategy; low prices

Differentiation Strategy: Creating a uniques product diffrent from your competitors

2. Explain the concept of "core capabilities"

Core Capabilities: it has do with creating competitive advantage, strategic resources to meet aims and objectives

3. Identify the criteria for a core capability (or resource) to become a source of sustained competitive advantage for an organization

Valuable, Rare, Inimitable, Organized

4. Identify the two dimensions along which human capital differs according to the human capital architecture.

- Value of Human Capital: very key in contributing to competitive advantage

-  Human Capital must be distinct:

5. List and describe the four types of workers identified by the human capital architecture model.

o Strategic Knowledge Workers: they have unique skills, get more pay

o Core Employees: they have skills to perform certain task.they can be replaced with another employer

o Supporting Labor: They have general skills

o Complementary/Alliance: They are like contractors or allies

7.Match the four types of workers to their correct location along the human capital architecture

o Strategic Knowledge Workers: high unique, high value

o Core Employees: low unique, high value

o Supporting Labor: low unique, low value

o Complementary: high unique, low value

8. Summarize the components and principles of the two generic HR strategies.

Control vs. Commitment Oriented Work System:

- High Performance Work System:

9.  Explain how the components of a high performance work system (HPWS) should fit both with one another and with other systems in the organization

o when a component changes it effects a change in the other

o Horizontal fit: make certain all HR practices,management , work design,  and technologies complement one another

3 0
3 years ago
Google has implemented employment policies like increasing the use of women interviewers for female job applicants and expanding
Sholpan [36]
Specialization. The characteristic of bureaucracy that Google is attempting to address this changes is the formal rules since it is stated on the first part that Google has "implemented employment policies" with regards to hiring women and the maternity benefits. These are the standard operating procedure that everyone in the hierarchy formally follows and plays a big role in the decision-making process.
7 0
3 years ago
Match the taxes to the entities on which they are assessed
nlexa [21]

Answer:

question isn't clear. any answers???

6 0
2 years ago
What line on a production possibilities curve shows the amounts of goods produced?
Lesechka [4]
The line on a production possibilities curve that shows the amounts of goods produced is called production possibilities frontier. 
6 0
3 years ago
Read 2 more answers
Other questions:
  • The labor force includes rev: 05_30_2018 Multiple Choice employed workers but excludes persons who are officially unemployed. pe
    11·1 answer
  • Adamis the owner/operator of a flower shop. Last year he earned $250,000 in total revenue. His explicit costs were $175,000 paid
    6·1 answer
  • "when the federal reserve wishes to ______ interest rates, it _________ the amounts of funds at commercial banks." reduce; reduc
    13·1 answer
  • The promise of a reward motivates me to accept additional task
    10·1 answer
  • A container of bolts, currently located in Houston, TX, needs to be delivered to a facility in Sioux Falls, SD. The standard gro
    15·1 answer
  • For each of the following errors, considered individually, indicate whether the error would cause the adjusted trial balance tot
    14·1 answer
  • The economy begins in equilibrium at point E, representing the real interest rate r 1 at which saving S 1 equals desired investm
    15·1 answer
  • Klingon Cruisers, Inc., purchased new cloaking machinery five years ago for $15 million. The machinery can be sold to the Romula
    8·1 answer
  • How can a reduction in taxation be used to influence aggregate demand​
    12·1 answer
  • Naomi weighed 50 patients for a medical study using a scale that measures to the nearest whole pound. She then calculated the me
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!