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]
3 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]3 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
On January 1, 2020, Oriole Company had Accounts Receivable $137,400, Notes Receivable $24,000, and Allowance for Doubtful Accoun
antoniya [11.8K]

Answer:

Oriole Company

Journal entries:

Jan. 5

Debit Accounts Receivable (Sheldon Company) $20,000

Credit Sales Revenue $20,000

To record sale of merchandise, terms n/15.

Jan. 20

Debit Notes Receivable (Sheldon Company)  $20,000

Credit Accounts Receivable (Sheldon Company) $20,000

To record acceptance of 3-month, 8% note

Feb 18

Debit Notes Receivable (Patwary Company) $9,000

Credit Sales Revenue $9,000

To record sale of merchandise for a 6-month, 9% note

April 20

Debit Cash Account $20,400

Credit Notes Receivable (Sheldon Company)  $20,000

Credit Interest on Notes Receivable $400

To record full settlement on account

April 30

Debit Cash Account $24,720

Credit Notes Receivable (Willingham Company) $24,000

Credit Interest on Notes Receivable $720

To record full settlement on account.

May 25

Debit Notes Receivable (Potter Inc.) $5,200

Credit Accounts Receivable (Potter Inc.) $5,200

To record acceptance of a 3-mont, 7% note.

Aug 18

Debit Cash Account $9,405

Credit Notes Receivable (Patwary Company) $9,000

Interest on Notes Receivable $405

To record full settlement on account.

Aug 25

Debit Accounts Receivable $5,291

Credit Notes Receivable (Potter Inc.) $5,200

Credit Interest on Notes Receivable $91

Sept. 1

Debit Notes Receivable (Stanbrough Company) $13,100

Credit Sales Revenue $13,100

To record sale of merchandise with a 6-month 10% notes receivable.

Dec. 31

Debit Depreciation Expense - Building $

Credit Accumulated Depreciation - Building $

To record depreciation expense for the year.

Debit Depreciation Expense - Equipment $

Credit Accumulated Depreciation - Equipment $

To record depreciation expense for the year.

Explanation:

Journal entries are prepared to record business transactions in the accounting books.  They show which account is to be debited and which is to be credited in the ledger.

Note that the book values of building and equipment were not included in this question, hence no figures were added to the adjusting journal entries for depreciation expenses.

7 0
3 years ago
Selene, a new recruit at Yellow Systems Inc., was encouraged to join the Hispanic Help Group (HHP) to discuss the challenges and
il63 [147K]

Answer:employee support group.

Explanation:employee support group are voluntary, employee-led associations where team members join together in light of common interests, backgrounds, or demographics.

A group of employees that join together in the workplace based on shared interests, backgrounds, or life experiences. Employee resource groups help provide support for both career and personal development.

5 0
4 years ago
Which of the following statements is false?
serious [3.7K]

Answer:

ERP systems use the same data as functional information systems.

Explanation:

At its most fundamental level, ERP software integrates these different capacities into one complete framework to streamline procedures and data over the whole organization. The focal element of all ERP frameworks is a shared database that supports multiple capacities utilized by various business units.

3 0
3 years ago
Kubin company’s relevant range of production is 20,000 to 23,000 units. when it produces and sells 21,500 units, its average cos
Afina-wow [57]
<span>The cost per unit is derived from the variable costs and fixed costs incurred by a production process, divided by the number of units produced. Hypothetically lets say variable costs for Kubin company's production is $50,000 and their fixed costs are $25,000. $50,000 variable costs + $25,000 fixed costs / 21,500 units = $3.49/unit.</span>
6 0
4 years ago
Trevor Guerney is a manager who believes that those who are to be affected by a change must be involved in the change. Consequen
ollegr [7]

Answer:

Explanation:

Trevor's team has positive leader-member relations

3 0
3 years ago
Other questions:
  • Problem 3-1B Identifying adjusting entries with explanations P1 For each of the following journal entries 1 through 12, enter th
    14·1 answer
  • You and your new Australian bride Matilda, are applying for a loan and are required to submit a balance sheet with your net wort
    11·1 answer
  • Woodridge Corporation manufactures numerous products, one of which is called Alpha-32. The company has provided the following da
    12·1 answer
  • You have decided that you want to be a millionaire when you retire in 44 years. If you can earn an annual return of 11.38 percen
    15·1 answer
  • During the maturity stage of the product life cycle, profit declines primarily because: Multiple Choice a) there is fierce price
    8·1 answer
  • $5000 is put into an empty savings account with a nominal interest rate of 5%. No other contributions are made to the account. w
    10·1 answer
  • A company recently announced that it would be going public. The usual suspects, Morgan Stanley, JPMorgan Chase, and Goldman Sach
    9·1 answer
  • Garcia Corporation purchased a truck by issuing an $80,000, 4-year, zero-interest-bearing note to Equinox Inc. The market rate o
    5·1 answer
  • Balance sheet is a statement of what?​
    13·1 answer
  • A combination of high crude oil prices and government subsidies for ethanol have led to a sharp increase in the demand for corn
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!