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]
1 year 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]1 year 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
Nick Company has two products: A and B. The company uses activity-based costing. The estimated total cost and expected activity
Anvisha [2.4K]

Answer:

b. $105.00

Explanation:

The computation of the activity rate under the activity-based costing system  is shown below:

For Activity 3,

The activity rate is

= Estimated cost ÷ Estimated activity

= $52,500 ÷ 500

= $105

We simply divided the estimated cost by the estimated activity to get the activity rate

All other information which is given is not considered. Hence, ignored it

5 0
2 years ago
Speed World Cycles sells high-performance motorcycles and motocross racers. One of Speed World’s most popular models is the Kazo
Verdich [7]

Answer:

Speed World Cycles

 

a.                                        Average Cost       FIFO              LIFO

Cost of goods sold           $20,100           $19,900       $20,300

Ending inventory              $20,100          $20,300       $19,900

b-1. FIFO will result in Speed World Cycles reporting the highest net income for the current year, because of the reduced cost of goods sold.

b-2. LIFO minimizes the income taxes owed by Speed World Cycles for the year, because it reduces the income before taxes.

b-3. Yes.  However, the cost flow assumptions self-correct in later years, by which time it is not allowed to be jumping from one cost flow assumption to another.

Explanation:

a) Data and Calculations:

Purchase Date    Units Purchased   Unit Cost     Total Cost

July 1                             2                    $ 4,950        $ 9,900

July 22                          3                       5,000          15,000

Aug. 3                           3                        5,100          15,300

Total                             8                                       $ 40,200

July 28 Sold                4                          

September 30            4 (8 - 4)

Average cost = $40,200/8 = $5,025

a-1. Cost of goods sold = $20,100 (4 * $5,025)

Ending inventory = $20,100 (4 * $5,025)

a-2. FIFO:

Ending inventory = $20,300 (3 * $5,100 + 1 * $5,000)

Cost of goods sold = Cost of goods available minus cost of ending inventory

= $40,200 - $20,300

= $19,900

a-3 LIFO:

Cost of goods sold = $20,300 (3 * $5,100 + 1 * $5,000)

Ending inventory = Cost of goods available minus cost of goods sold

= = $40,200 - $20,300

= $19,900

6 0
1 year ago
Ollie and Molly Overton have just taken out a 30-year straight term loan on their new "starter home" in Bellflower. This means t
vivado [14]

Answer:

A. They will make payments of interest only, with the principal due on the loan due date in 30 years.

Explanation:

In this scenario, Ollie and Molly Overton have just taken out a 30-year straight term loan on their new "starter home" in Bellflower.

A straight term loan is also known as a straight term mortgage or an interest only loan. It can be defined as a type of loan in which the borrower pays only interest during the term of the loan, while the entire principal amount is to be paid for with the final interest payment at the maturity date (loan due date).

This ultimately implies that, Ollie and Molly Overton will make payments of interest only, with the principal due on the loan due date in 30 years.

7 0
1 year ago
Automated Data Processing (ADP) provides computer software and services to a host of companies, including automobile dealerships
koban [17]

Answer:

The answer is c) Physical-asset specificity

Explanation:

The asset specificity is defined as the degree in the investments made to support a need to have a higher value than they would have if they are redistributed for any other purpose. They are non-redistributable physical and human investments that are specialized and exclusive for a task. In the example of the exercise, employee training is a specific investment of assets, since it is more likely that your investment will have the same profitability in the management of software and hardware provided by ADP.

5 0
2 years ago
Leslie is charged with determining which small projects should be funded. Along with this assignment, she has been granted the u
Andru [333]

Answer:

The answer is: Leslie should fund projects A and C

Explanation:

In order to determine if a project should be accepted, the first thing Leslie has to do is determine the projects´ Net Present Value (NPV). If the NPV is 0 or more, then the projects could be funded.  

The formula to calculate NPV is:

             NPV = ∑{p/( 1+r)t} - C

  • p = net cash flows from the period
  • r = discount rate (8.5% in this case)
  • t = number of periods
  • c = capital invested

<u>Project A:</u>

p = $4000;$4000;$4000

r = 8.5%

t = 3

c = $7,500

The NPV for Project A is $2,716.09

<u>Project B:</u>

p = $3000;$4000;$3000

r = 8.5%

t = 3

c = $8,000

The NPV for Project B is $511.52

<u>Project C:</u>

p = $0;$2,500

r = 8.5%

t = 2

c = $2,000

The NPV for Project C is $123.64

Once you calculate the NPVs from projects A,B and C you must determine how to distribute the $15,000 available. All three projects have positive NPVs, so they are profitable. But you can´t fund projects A and B since their combined costs ($7,500 + $8,000 = $15,500) exceeds $15,000. Leslie should invest in project A since its NPV is higher ($2,716.09 ˃ $511.52). She should also fund project C since its NPV is positive ($123.64) and the capital needed is smaller (only $2,000).

                     

7 0
1 year ago
Other questions:
  • checking account A charges a monthly service fee of $23 and a wire transfer fee of $7.50, while checking account B charges a mon
    12·2 answers
  • Which is the correct order for the steps of the policy cycle? 1. a problem is identified and moved to the government's to-do lis
    8·1 answer
  • On December 31 of the current year, the unadjusted trial balance of a company using the percent of receivables method to estimat
    6·1 answer
  • You are planning to email to two lists. The first list has 5,000 names. The second list has 3,900 names. There are 700 names tha
    7·1 answer
  • Velvety Pancake House, Inc., a U.S. firm, and Wallaby Waffles, Ltd., an Australian firm, enter into a contract that has a forum-
    15·1 answer
  • Mary's 25th birthday is today, and she hopes to retire on her 65th birthday. She has determined that she will need to have $3,00
    14·1 answer
  • Shelby is considering whether to drop a product line from her business. Some administrative costs are being allocated to the pro
    8·1 answer
  • Suppose that the consumer price index in Eastlandia rises from 150 to 159 over the past year, and that the city sets its car reg
    12·1 answer
  • A revenue management (RM) system for an airline seeks to minimize each customer's ticket price of travel on the airline's flight
    9·1 answer
  • Sue Helms Appliances wants to establish an assembly line to manufacture its new​ product, the Micro Popcorn Popper. The goal is
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!