Questions
C++ 18.27 LAB*: Program: Soccer team roster (Vectors) This program will store roster and rating information...

C++ 18.27 LAB*: Program: Soccer team roster (Vectors)

This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balanced 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:

Enter player 1's jersey number:
84
Enter player 1's rating:
7

Enter player 2's jersey number:
23
Enter player 2's rating:
4

Enter player 3's jersey number:
4
Enter player 3's rating:
5

Enter player 4's jersey number:
30
Enter player 4's rating:
2

Enter player 5's jersey number:
66
Enter player 5's rating:
9

ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
...

(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing. (2 pts)

Ex:

MENU
a - Add player
d - Remove player
u - Update player rating
r - Output players above a rating
o - Output roster
q - Quit

Choose an option:

(3) Implement the "Output roster" menu option. (1 pt)

Ex:

ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
...

(4) Implement the "Add player" menu option. Prompt the user for a new player's jersey number and rating. Append the values to the two vectors. (1 pt)

Ex:

Enter a new player's jersey number:
49
Enter the player's rating:
8

(5) Implement the "Delete player" menu option. Prompt the user for a player's jersey number. Remove the player from the roster (delete the jersey number and rating). (2 pts)

Ex:

Enter a jersey number:
4

(6) Implement the "Update player rating" menu option. Prompt the user for a player's jersey number. Prompt again for a new rating for the player, and then change that player's rating. (1 pt)

Ex:

Enter a jersey number:
23
Enter a new rating for player:
6

(7) Implement the "Output players above a rating" menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value. (2 pts)

Ex:

Enter a rating:
5

ABOVE 5
Player 1 -- Jersey number: 84, Rating: 7
...

In: Computer Science

Please code this in C In this project, we shall simulate the operations of an ATM...

Please code this in C

In this project, we shall simulate the operations of an ATM machine.

Suppose you’re in charge of this simulation and here is a scenario of what is required to do:

The customer will be assigned a random number for his/her balance.

First, the customer is prompted to enter his personal identification number pin (for this case study, we test only if this pin is formed by 4 digits! otherwise, a message like “Invalid PIN, try again . . .” will be displayed) and the user is re-prompted to enter the pin. The customer is given three chances to enter his pin. If he/she fails during the three trials you display a message like “Sorry you can’t continue, contact your bank for assistance!”

If the pin is correct (formed by 4 digits), then the system will ask the customer for the receipt ( 1 for YES and 2 for NO ) and a menu will be displayed containing five possible options to choose from: Fast Cash, Deposit, Withdraw, Balance and Get Card Back.

Here is the explanation of each of the 5 options:

Get Card Back: Display the message “Goodbye! “and exit the program.

Fast Cash: Let the customer choosing the amount of cash from a menu similar to the following:

Press:

1 --> $20.00                $40.00 <-- 2

3 --> $80.00                $100.00 <-- 4

Withdraw: Prompt the user for the amount of money he/she would like to withdraw and make the sure that he/she has enough money for that!

Deposit: Prompt the customer for the amount of deposit.

Balance: Just display the amount of money the customer has.

Don’t forget to print the receipt if the customer wants one.

Sample execution: bolded text represents the user entry

Virtual Bank at West

                              WELCOME

Enter Pin: 245

                        Invalid PIN, Re-enter Pin: 5487

(clear screen )

                        Receipt y or Y -> Yes             No <- n or N  

                        Enter choice: N          

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

                                    Enter your choice: 4

                                    (Clear screen)

                        Your Balance is : $124.3

1 -> Another Transaction                    Get Card Back <- 2   

Enter your choice: 1

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

                                                Enter your choice: 2

(Clear screen )

Enter amount (enter 0 to cancel): 300.00

Sorry not enough balance

Enter amount (enter 0 to cancel): 30.00

Take your cash…

(Clear screen)

Your Balance is: $124.32

1 -> Another Transaction                    Get Card Back <- 2   

Enter your choice: 1

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

Enter your choice: 8

Invalid Entry

(Clear screen)

CHOOSE FROM THE FOLLOWING

                                    1 -> Fast Cash             Withdraw      <- 2

                                    3 -> Deposit                Check Balance <- 4

                                    5 -> Get Card Back

Enter your choice: 5

(Clear screen)

THANK FOR USING OUR VIRTUAL BANK SYSTEM

GOODBYE. . .

In: Computer Science

Question 17 A​ country's Energy Information Administration monitors all nuclear power plants operating in that country....

Question 17

A​ country's Energy Information Administration monitors all nuclear power plants operating in that country. The table below lists the number of active nuclear power plants operating in each of a sample of 10 states.

State Number of Power Plants
1 5
2 5
3 9
4 8
5 4
6 4
7 2
8 3
9 13
10 3

Eliminate the the smallest and largest values from the data set. Then, find the​ variance of this data set. (Round to three decimal places as​ needed.)

Question 18

A​ country's Energy Information Administration monitors all nuclear power plants operating in that country. The table below lists the number of active nuclear power plants operating in each of a sample of 10 states.

State Number of Power Plants
1 5
2 5
3 9
4 8
5 4
6 4
7 2
8 3
9 13
10 3

Eliminate the the smallest and largest values from the data set. Then, find the​ standard​ deviation of this data set. (Round to three decimal places as​ needed.)

In: Statistics and Probability

4. Environment Recycling, Inc. must clean up a large automobile tire dump under a state environmental...

4. Environment Recycling, Inc. must clean up a large automobile tire dump under a state environmental cleanup contract. Some of the activities can be crashed. The tasks, durations (in days), costs, predecessor relationships, the crash times, and costs associated with performing the activities at their original (normal) times and for the crash times are shown as follows:

Activity

Immediate Predecessor

Normal Time (days)

Normal Cost ($)

Crash Time

Crash Cost ($)

A

--

6

1,000

5

1,200

B

--

4

800

2

2,000

C

A, B

3

600

2

900

D

B

2

1,500

1

2,000

E

C, D

6

900

4

1,200

F

E

3

1,300

1

1,400

G

E

4

900

4

900

H

G

4

500

2

900

a. Find the total project completion time. (Show all work including finding the critical path).

b. Find the lowest cost solution if the state wants to complete the project two days early. State which activities need to be crashed and calculate the crashing cost for the total project.

In: Operations Management

"A producer of various feed additives for cattle conducts a study of the number of days...

"A producer of various feed additives for cattle conducts a study of the number of days of feedlot time required to bring beef cattle to market weight. Eighteen steers of essentially identi- cal age and weight are purchased and brought to a feedlot. Each steer is fed a diet with a specific combination of protein content, antibiotic concentration, and percentage of feed supplement. The data are as follows:

STEER   PROTEIN ANIBIO  SUPPLEM TIME
1       10      1       3       88
2       10      1       5       82
3       10      1       7       81
4       10      2       3       82
5       10      2       5       83
6       10      2       7       75
7       15      1       3       80
8       15      1       5       80
9       15      1       7       75
10      15      2       3       77
11      15      2       5       76
12      15      2       7       72
13      20      1       3       79
14      20      1       5       74
15      20      1       7       75
16      20      2       3       74
17      20      2       5       70
18      20      2       7       69

2. Write the LS regression equation and interpret each of the (partial) slope parameter estimates, i.e., βˆ 1, βˆ 2 and βˆ 3.

3. For steer #3, Calculate the predicted feedlot time and the residual.

4. Write the residual standard deviation and interpret.

In: Statistics and Probability

1.If you invest $5,867 today and in years 1, 2 and 3 in an account that...

1.If you invest $5,867 today and in years 1, 2 and 3 in an account that earns 4.71% APR (compounded annually), how much will you have in the account in 16 years?

2.You plan on purchasing a new car in 11 months. The cost of the car in 11 months will be $25,813. How much would you have to invest today to exactly pay for the new car if you investments earn 3.74% APR (compounded monthly)?

3.

You want to save an amount today that will pay for your future annual food bills that will start next year, and go for 29 years.

The current annual cost of your food bill is $8,110, but the cost is rising at 3% per year.

How much would you have to invest today, to fully pay for your future annual food bills if your investments earn 6.30% APR nominal (annual compounding).

In: Finance

Rhombus, Rectangle, Square or None? (-3,-1), (-3,2), (1,1), (1,-2)

Rhombus, Rectangle, Square or None?
(-3,-1), (-3,2), (1,1), (1,-2)


In: Math

Let Xn is a simple random walk (p = 1/2) on {0, 1, · · ·...

Let Xn is a simple random walk (p = 1/2) on {0, 1, · · · , 100} with absorbing boundaries. Suppose X0 = 50. Let T = min{j : Xj = 0 or N}. Let Fn denote the information contained in X1, · · · , Xn.

(1) Verify that Xn is a martingale.

(2) Find P(XT = 100).

(3) Let Mn = X2 n − n. Verify that Mn is also a martingale.

(4) It is known that Mn and T satisfy the assumptions of Optimal Sampling Theorem and hence E(MT ) = E(M0). Use this fact to find out E(T).

In: Statistics and Probability

A 1 liter vessel is filled with 1 mol of bromine gas and 2 moles of...

A 1 liter vessel is filled with 1 mol of bromine gas and 2 moles of hydrogen gas to form hydrogen bromide gas at 448 degrees celsius. the reaction has an equilibrium constant of 53.5. what is the equilibrium molar concentration of all species?

In: Chemistry

A stock is expected to pay the following dividends: $1 in 1 year, $1.5 in 2...

A stock is expected to pay the following dividends: $1 in 1 year, $1.5 in 2 years, and $1.8 in 3 years, followed by growth in the dividend of 7% per year forever after that point. The stock's required return is 14%. The stock's current price (Price at year 0) should be $____________.

A stock is expected to pay the following dividends: $1.3 four years from now, $1.5 five years from now, and $1.8 six years from now, followed by growth in the dividend of 5% per year forever after that point. There will be no dividends prior to year 4. The stock's required return is 13%. The stock's current price (Price at year 0) should be $____________.

A stock will pay no dividends for the next 3 years. Four years from now, the stock is expected to pay its first dividend in the amount of $2.4. It is expected to pay a dividend of $2.8 exactly five years from now. The dividend is expected to grow at a rate of 8% per year forever after that point. The required return on the stock is 14%. The stock's estimated price per share exactly TWO years from now, P2 , should be $______.

If you could do them all, you would be a life saver! Thank you.

In: Finance