answer.
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
Chocolates R' Us, Inc is owned equally by Desi and his wife Lucy, each of whom hold 550 shares in the company. Lucy plans to red
soldi70 [24.7K]

Answer:

Chocolates R' Us, Inc.

Family hostility cannot be used as an argument to void the family attribution rules.

Lucy is still legally married to Desi.  What the husband, Desi, therefore, owes, she owes equally despite their separation and her intention to reduce her ownership in their joint company.

Explanation:

Family Attribution Rules:  Section 318 of the Internal Revenue Code says an individual shall be considered as owning the stock owned, directly or indirectly, by or for his spouse and his children, grandchildren, and parents, including legally adopted children.

3 0
2 years ago
The Nature’s Sunshine natural supplement company decided to use Oracle’s CRM system to manage its many customers. Identify all o
Minchanka [31]

Answer:

The Correct options are A and B

Explanation:

CRM system is the kind of system, which is defined as the system which stores or accumulates the customer account data in common or a single database and then make the data available through the company or business via intranet, internet and other links of network.

So, the components which it involve regarding the system are that this system is the data warehouses and the databases and it is a tool which is sophisticated analytical one.

6 0
2 years ago
Dairy Days Ice Cream sells ice cream cones for​ $5 per customer. Variable costs are​ $2 per cone. Fixed costs are​ $2100 per mon
qwelly [4]

Answer:

0.6 or 60%

Explanation:

The contribution margin ratio is calculated by the formula below.

Contribution margin ratio = <u>contribution margin</u>

     sales revenue

= For Dairy D's

Contribution margin per unit = sales - variable expenses

=$5-$2

= $3 per unit

Contribution margin = <u>Contribution  margin per unit</u>

    sale price per unit

   =3/5

   =0.6 or 60%

4 0
2 years ago
Gleason sells a single product at $14 per unit. The firm's most recent income statement revealed unit sales of 80,000, variable
Oliga [24]

Answer:

Instructions are below.

Explanation:

Giving the following information:

Selling price= $14

Units sold= 80,00

Total variable cost= $800,000

Total fixed costs= $560,000

New selling price= $11

First, we need to calculate the unitary variable cost:

Unitary variable cost= 800,000/80,000= $10

Now, we can calculate the actual break-even point in units using the following formula:

Break-even point in units= fixed costs/ contribution margin per unit

Break-even point in units= 560,000 / (14 - 10)

Break-even point in units= 140,000 units

Finally, we determine the new break-even point in units using the selling price of $11.

Break-even point in units= 560,000 / (11 - 10)

Break-even point in units= 560,000 units

8 0
2 years ago
g in which one of the following instances is it not advantageous to concentrate a company's activities in a few locations when a
umka21 [38]

Answer:

<u>a case where acquiring a local business may be the quickest, least risky, and most cost-efficient means of hurdling entry barriers.</u>

Explanation:

In such circumstances, it is best that the international corporation acts decisively by seeking hard to expand to various locations since this gives then an advantage of operating under an already known business name.

The fact that this method of entry is quickest, least risky, and most cost-efficient means of hurdling entry barriers,<u> it should give then more reasons to expand to other locations.</u>

4 0
2 years ago
Other questions:
  • A teacher sets up a machine that beeps at random intervals; research has demonstrated that, if students check "yes" or "no" in a
    15·1 answer
  • You find that the bid and ask prices for a stock are $10.25 and $10.30, respectively. If you purchase or sell the stock, you mus
    13·1 answer
  • You’ve dreaded it for a while, but now you feel prepared. In 30 minutes you’ll have to terminate Tim, a 12-year employee who is
    13·1 answer
  • Ryan's dad needs to drive bigger company vehicles in order to get promoted. What does he need?
    6·1 answer
  • Summer Foods is a public corporation that is experiencing difficulty growing its vegetable products during an especially dry sum
    12·1 answer
  • A social sciences researcher wants to know about the amount of money that couples without children spend on leisure travel. Her
    12·1 answer
  • Vargas Corporation is working on its direct labor budget for the next two months. Each unit of output requires 0.77 direct labor
    10·1 answer
  • Ward Doering Auto Sales is considering offering a special service contract that will cover the total cost of any service work re
    11·1 answer
  • Skippers Landing sells boats and provides mooring facilities for its customers. Skippers Landing sells the boats for $60,000 eac
    14·1 answer
  • Rusty Hardware makes only cash sales. It began 2021 with a credit balance of $33,400 in the refund liability account. Sales duri
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!