Questions
((by C++ ))Write a program that will reverse the content of a Queue using the following...

((by C++ ))Write a program that will reverse the content of a Queue using the following standard queue operations.

  • enqueue(x) : Add an item x to rear of queue.
  • dequeue() : Remove an item from front of queue.
  • empty() : Checks if a queue is empty or not.

For reversing the queue one approach could be to store the elements of the queue in a temporary data structure in a manner such that if we re-insert the elements in the queue they would get inserted in reverse order. So now our task is to choose such data-structure which can serve the purpose. According to the approach, the data-structure should have the property of ‘LIFO’ as the last element to be inserted in the data structure should be the first element of the reversed queue. Using the new data structure to store the elements of the queue temporarily should:

  • Pop the elements from the queue and insert into the new data structure. (first element of the data structure is last element of the queue)
  • Pop the elements of the data structure to insert back into the queue. (The last element of the data structure is the first one to be inserted into the queue)

Input Format

The program should accept N series of integer values where 1 < N < 10 separated by a space and stored in a queue. If the input N integer exceeds the allowed number of input the program should display an error message.

Example Input

Enter N Integer values: 1 2 3 4 5 6 7 8 9 10

Output Format

The program should display the reverser order of the queue elements in a single line separated by a space. (Note: that only queue standards operations can be used to display the queue elements).

Example Output

Reverse Queue: 10 9 8 7 6 5 4 3 2 1

In: Computer Science

Problem 19-12 EPS; nonconvertible preferred stock; treasury shares; shares sold; stock dividend; options [LO19-4, 19-5, 19-6,...

Problem 19-12 EPS; nonconvertible preferred stock; treasury shares; shares sold; stock dividend; options [LO19-4, 19-5, 19-6, 19-7, 19-8, 19-10]

On December 31, 2017, Dow Steel Corporation had 600,000 shares of common stock and 300,000 shares of 8%, noncumulative, nonconvertible preferred stock issued and outstanding. Dow issued a 4% common stock dividend on May 15 and paid cash dividends of $400,000 and $75,000 to common and preferred shareholders, respectively, on December 15, 2018.

On February 28, 2018, Dow sold 60,000 common shares. In keeping with its long-term share repurchase plan, 2,000 shares were retired on July 1. Dow's net income for the year ended December 31, 2018, was $2,100,000. The income tax rate is 40%.

As part of an incentive compensation plan, Dow granted incentive stock options to division managers at December 31 of the current and each of the previous two years. Each option permits its holder to buy one share of common stock at an exercise price equal to market value at the date of grant and can be exercised one year from that date. Information concerning the number of options granted and common share prices follows:

Date Granted Options Granted Share Price
(adjusted for the stock dividend)
December 31, 2016 8,000 $ 24
December 31, 2017 3,000 $ 33
December 31, 2018 6,500 $ 32


The market price of the common stock averaged $32 per share during 2018.

Required:
Compute Dow's earnings per share for the year ended December 31, 2018. (Enter your answers in thousands.)

In: Accounting

Suppose an automatic password cracking program takes an average of 10 minutes to crack one password...

Suppose an automatic password cracking program takes an average of 10 minutes to crack one password that has 10,000 possible combinations. (This means it would take 20 minutes if there were 20,000 possible passwords and 30 minutes if there were 30,000 possible passwords).

a) 3 pts What is the maximum length of time the program would need to be able to crack a password of 8-character length made of only one number and seven lower-case letters?

b) 6 pts What is the maximum amount of time the program would need to be able to crack a password of 12-character length that includes at least one capital, at least one number, and at least one special symbol chosen from @,#, $ ?

In: Statistics and Probability

Create a C# console application (do not create a .NET CORE project) and name the project....

Create a C# console application (do not create a .NET CORE project) and name the project. Generate two random integers, each between 1 and 50, that you will be adding together to test the user's ability to perform the addition operator. Display the numbers in the console, such as:

            7 + 22 = ?

Once the user provides their answer, check to see if it is correct and if not, tell them sorry, please try again. If their answer is correct, congratulate them on getting the right answer.

In: Computer Science

QUESTION (please show your work so that I may understand how to do the problem) thanks...

QUESTION (please show your work so that I may understand how to do the problem) thanks Before you can calculate your test statistic, you’ll have to calculate the SEM. Use the formula in the book/lecture to calculate the SEM. Put your value below. Remember that you will need to calculate the population standard deviation first (remember to use n rather than n-1 for the population standard deviation calculation). Round your response out to two decimal places, if you give more than two decimal places Canvas may count your answer as wrong Pat is the manager of a real estate group that is part of a larger real estate company. Here are the total number of home sales from 2018 for all the agents at the entire company. 4, 5, 10, 4, 6, 7, 9, 11, 3, 4, 8, 9, 2, 4, 3, 12, 4, 5, 6, 3, 8, 9, 8, 7, 10, 4, 5, 7, 8, 6. Pat wants to know if her own real estate group, which has 4 agents (the sample, in this case), has sold more homes than the rest of the company (the population). Your job is to tell me if these four agents (agents A, B, C, and D) differ in number of home sales from the population (the entire company). Remember that you need to calculate the population standard deviation first! Agent Number of Homes Sold in 2018 A 6 B 7 C 8 D 10

1- State the null hypothesis

Group of answer choices

a-H0: The sample drawn from the population reflects the population, or M = µ

b-H0: The sample drawn from the population reflects the population, or M ≠ µ

2- State the alternative hypothesis

Group of answer choices

a-H1: The sample drawn from the population does not reflect the population, or M ≠ µ

b-H1: The sample drawn from the population reflects the population, or M = µ

3- Determine the best statistical test to use

Group of answer choices

a-Critical value test

b-Z score test

c-Correlational test

d-one-sample Z test

4-Before you can calculate your test statistic, you’ll have to calculate the SEM. Use the formula in the book/lecture to calculate the SEM. Put your value below. Remember that you will need to calculate the population standard deviation first (remember to use n rather than n-1 for the population standard deviation calculation). Round your response out to two decimal places, if you give more than two decimal places Canvas may count your answer as wrong.

5-Now, Compute the test statistic (Use the formulas in the book / lecture to calculate the correct statistic). Which of the following is the correct value?

Group of answer choices

a-z = 0.171

b-z =1.06

c-z = 3.505

d-z = 1.04

6- The value needed to reject the null hypothesis is ___________.

Group of answer choices

a-1.64

b-1.96

c-3.25

d-2.10

7-Does the obtained value exceed the critical value (that is, is the obtained value larger than the critical value)?

Group of answer choices

a-No

b-Yes

8- Based on your answer to the previous question, the decision is to ____________

Group of answer choices

a-Reject the null hypothesis

b-Fail to reject the null hypothesis

In: Math

You have been asked to forecast the additional funds needed (AFN) for Houston, Hargrove, & Worthington...

You have been asked to forecast the additional funds needed (AFN) for Houston, Hargrove, & Worthington (HHW), which is planning its operation for the coming year. The firm is operating at full capacity. Data for use in the forecast are shown below. However, the CEO is concerned about the impact of a change in the payout ratio from the 10% that was used in the past to 50%, which the firm's investment bankers have recommended. Based on the AFN equation, by how much would the AFN for the coming year change if HHW increased the payout from 10% to the new and higher level? All dollars are in millions.

Last year's sales = S0

$300.0

Last year's accounts payable

$50.0

Sales growth rate = g

40%

Last year's notes payable

$15.0

Last year's total assets = A0*

$500.0

Last year's accruals

$20.0

Last year's profit margin = PM

20.0%

Initial payout ratio

10.0%

Which answer choice is correct?

a.

$31.9

b.

$33.6

c.

$35.3

d.

$37.0

e.

$38.9

In: Finance

Lavinia is 35 years old. She is married to Sebastian who is a year younger than...

Lavinia is 35 years old. She is married to Sebastian who is a year younger than Lavinia. Lavinia and Sebastian are thrilled to have two daughters. One is nine years old. The other is seven.

Lavinia and Sebastian were originally hoping to add a son to their family, but they had mostly given up hope because they hadn’t had any luck conceiving again after their youngest daughter was born. And, they had stopped trying when Sebastian lost his job because money is a bit tight.

Lavinia has recently discovered that she is pregnant. She and Sebastian are excited that she might be carrying the son they have wanted in their family, but they are also stressed at the thought of having another mouth to feed.

When Lavinia met with her physician, she explained that she and her husband still desperately want a boy. Indeed, she expressed that she wants to continue the pregnancy only if the physician can do tests and determine that the fetus she is carrying is male. She has made clear that she wants to terminate her pregnancy and that she will be requesting an abortion if the fetus is not male. She has made equally clear that she wants to terminate the pregnancy and that she will be requesting an abortion if her physician won’t do the tests to identify the sex of the fetus.

Explore the ethics of sex selection involving abortion in contrast to sex selection involving preimplantation genetic diagnosis (PGD) you are welcome to do this by considering whether it would make a difference, in the case study, if Lavinia were asking her physician to identify and implant only a male fetus to begin her pregnancy.

In: Biology

14. Suppose that short- term municipal bonds currently offer yields of 4%, while comparable taxable bonds...

14. Suppose that short- term municipal bonds currently offer yields of 4%, while comparable taxable bonds pay 5%. Which gives you the higher after- tax yield if your tax bracket is: ( LO 2- 1)

a. Zero

b. 10%

c. 20%

d. 30%

19. Consider the three stocks in the following table. Pt represents price at time t, and Q t represents shares outstanding at time t. Stock C splits two- for- one in the last period. ( LO 2- 2)

P0

Q0

P1

Q1

P2

Q2

A

90

100

95

100

95

100

B

50

200

45

200

45

200

C

100

200

110

200

55

400

a. Calculate the rate of return on a price- weighted index of the three stocks for the first period ( t = 0 to t = 1).

b. What must happen to the divisor for the price- weighted index in year 2?

c. Calculate the rate of return of the price- weighted index for the second period ( t= 1 to t=2)

20. Using the data in the previous problem, calculate the first- period rates of return on the following indexes of the three stocks: ( LO 2- 2)

a. A market value– weighted index

b. An equally weighted index

32. Find the after-tax return to a corporation that buys a share of preferred stock at $40, sells it at year-end at $40, and receives a $4 year-end dividend. The firm is in the 30% tax bracket. (LO 2-1)

CFA Problems
1. Preferred stock yields often are lower than yields on bonds of the same quality because of: ( LO 2- 1)

a. Marketability

b. Risk

c. Taxation

d. Call protection

In: Finance

Complete the analysis of variance table for the following data. Treat it as a two       way...

Complete the analysis of variance table for the following data. Treat it as a two

      way Block Design.  (Use α = 0.05). In each cell there are 2 observations, except for  

      the last cell, which has only one observation.

DATA

            Source A

Means

I

II

III

Source B Level 1

20    18

12    14

9    11

14

Source B Level 2

12    10

10      8

8

9.6

Means

15

11

9.33

Grand Mean = 12

ANOVA TABLE

Sources

D.F.

S.S.

M.S.

F

Source A

Source B

Error

TOTAL

State the Alternate Hypothesis  Ha  for both sources of variability.

Source A   Ha:                                             Source B    Ha:

How many degrees of freedom for A? …….        What is the Critical Point for A?............  

How many degrees of freedom for B? …….        What is the Critical Point for B?............

Do you reject Ho for Source A?  ……..                  Do you reject Ho for Source B?  ……..

So, is Source A statistically significant? …………..      And Source B? ………………..

In: Statistics and Probability

Daniel Purcel was diagnosed with type 1 diabetes mellitus when he was 12 years old. He...

Daniel Purcel was diagnosed with type 1 diabetes mellitus when he was 12 years old. He is now a nursing student. He has managed to control his diabetes throughout school. However, when he began his clinicals, his regular schedule of meals and insulin injections was completely disrupted. One morning, Daniel completely forgot to take his insulin. At 7am he drank orange juice and ate two doughnuts. At 8am he drank more juice because he was very thirsty. He mentioned to a fellow student that he felt confused, weak, and that his heart was racing. At 9:06 am, he fell unconscious. He was transferred immediately to the emergency room, where the following information was obtained:

Blood pressure: 90/40
Pulse: 130, regular, strong
Respirations: 32, regular rhythm, deep, labored (“Kussmaul”) Plasma glucose: 560 mg/dL (normal fasting 70-110 mg/dL) Plasma HCO3-: 8 mEq/L (normal 24 mEq/L)
Plasma ketones: ++ (normal none)
Arterial PO2: 112 mmHg (normal 100 mmHg)
Arterial PCO2: 20 mmHg (normal 40 mmHg)
Arterial pH: 7.22

The physician determined that Daniel was in diabetic ketoacidosis. He was given an intravenous infusion of isotonic saline and insulin. Later, after his blood glucose had decreased to 175 mg/dL, glucose was added to the infusion. Daniel stayed in the hospital overnight. By the next morning, his blood glucose, electrolytes, and blood gas values were normal.

Questions:

18.Which acid-base disorder did Daniel have? What caused it? Why did he present with Kussmaul respirations? Explain these all in the context of the laboratory test results.

19.How did Daniel’s failure to take insulin cause this acid-base disorder?

20.Explain Daniel’s thirst, low blood pressure, tachycardia, confusion, and weakness.

21.Explain the basis for the treatments provided (saline, insulin, and glucose).

In: Anatomy and Physiology