Questions
Write Java code for each of the following problem a. Two players, a and b, try...

Write Java code for each of the following problem

a. Two players, a and b, try to guess the cost of an item. Whoever gets closest to the price without going over is the winner. Return the value of the best bid. If both players guessed too high, return -1.
example:
closestGuess(97, 91, 100) → 97
closestGuess(3, 51, 50) → 3
closestGuess(12, 11, 10) → -1

b. Given a non-empty string, return true if at least half of the characters in the string are the lowercase letter z.
example:
zMajority("az") → true
zMajority("zabzc") → false
zMajority("w") → false

c. Given 4 numbers, return the value of the second largest number. Note that if two or more numbers are tied for largest, then the second largest value is also the largest value.
example:
secondLargest(1, 2, 3, 4) → 3
secondLargest(3, 2, 1, 4) → 3
secondLargest(5, 7, 5, 9) → 7

In: Computer Science

7. An index of movie quality in a movie theatre says that the overall fun of...

7. An index of movie quality in a movie theatre says that the overall fun of every visit to a movietheatre is determined for 25% by who the main star is in the movie, for 25% percent by the quality of the popcorn in the movie theatre and by 50% by the story of the movie. Somebody gives the newest movie 6 points for the star, 3 points for the movie theatre and 8 points for the story. How many overall points is this movie scoring on this index?

8. Somebody sends 10 postcards in the mail. 3 postcards arrived in 2 days on their destination, 4 in 3 days, and 3 in 7 days. What is the average arrival time of the postcards?

In: Statistics and Probability

 A statistician wishes to determine whether current unemployment rates differ between Urban and Rural areas of...

 A statistician wishes to determine whether current unemployment rates differ between Urban and Rural areas of the United States. A sample of ten states each was randomly chosen from all 50 states. The data are as follows:   Urban: 23%, 13%, 33%, 21%, 17%, 24%, 12%, 18%, 27%, 16%  Rural: 12%, 8%, 9%, 14%, 7%, 8%, 10%, 11%, 12%, 7%  Are the mean percentages significantly different? And

what are the degrees of freedom?

a. yes, at p < .05

b. yes, at p < .01

c. yes, at p < .001

d. no, at p > .05


In: Math

Use the balance sheet and income statement below : CLANCY’S DOG BISCUIT CORPORATION Balance Sheet as...

Use the balance sheet and income statement below : CLANCY’S DOG BISCUIT CORPORATION Balance Sheet as of December 31, 2015 and 2014 (in millions of dollars) Assets 2015 2014 Liabilities and Equity 2015 2014 Current assets: Current liabilities: Cash and marketable securities $ 7 $ 7 Accrued wages and taxes $ 10 $ 9 Accounts receivable 25 20 Accounts payable 18 17 Inventory 32 25 Notes payable 16 15 Total $ 64 $ 52 Total $ 44 $ 41 Fixed assets: Long-term debt: $ 30 $ 26 Gross plant and equipment $ 88 $ 70 Stockholders’ equity: Less: Depreciation 18 15 Preferred stock (2 million shares) $ 2 $ 2 Common stock and paid-in surplus Net plant and equipment $ 70 $ 55 (5 million shares) 11 11 Other long-term assets 18 18 Retained earnings 65 45 Total $ 88 $ 73 Total $ 78 $ 58 Total assets $ 152 $ 125 Total liabilities and equity $ 152 $ 125 CLANCY’S DOG BISCUIT CORPORATION Income Statement for Years Ending December 31, 2015 and 2014 (in millions of dollars) 2015 2014 Net sales $ 88 $ 92 Less: Cost of goods sold 44 40 Gross profits $ 44 $ 52 Less: Other operating expenses 5 4 Earnings before interest, taxes depreciation, and amortization (EBITDA) $ 39 $ 48 Less: Depreciation 3 3 Earnings before interest and taxes (EBIT) $ 36 $ 45 Less: Interest 4 4 Earnings before taxes (EBT) $ 32 $ 41 Less: Taxes 8 11 Net income $ 24 $ 30 Less: Preferred stock dividends $ 1 $ 1 Net income available to common stockholders $ 23 $ 29 Less: Common stock dividends 3 3 Addition to retained earnings $ 20 $ 26 Per (common) share data: Earnings per share (EPS) $ 4.60 $ 5.80 Dividends per share (DPS) $ 0.60 $ 0.60 Book value per share (BVPS) $ 15.20 $ 11.20 Market value (price) per share (MVPS) $ 15.85 $ 14.60 Prepare a statement of cash flows for Clancy’s Dog Biscuit Corporation. (Enter your answers in millions of dollars. Amounts to be deducted should be indicated with a minus sign. Leave no cells blank - be certain to enter "0" wherever required.)

In: Accounting

Prepare a master production schedule for industrial pumps in the manner of the following table. Use...

Prepare a master production schedule for industrial pumps in the manner of the following table. Use the MPS rule to "schedule production when the projected on-hand inventory would be less than 10 without production.". Suppose that there are currently 64 pumps in inventory and a production lot size of 70 pumps is used. (Leave no cells blank - be certain to enter "0" wherever required.)

June July
1 2 3 4 5 6 7 8
Forecast 30 30 30 30 40 40 40 40
Customer orders (committed) 33 20 10 4 2
Projected on-hand inventory
MPS
ATP

In: Operations Management

Problem 1 (18 pts.) Skinner Corporation issued $500,000 of 7% bonds for $486,500 to yield a...

Problem 1 (18 pts.)

Skinner Corporation issued $500,000 of 7% bonds for $486,500 to yield a market rate of 8%.

  1. Prepare the journal entry to record the sale of the bonds.
  1. Prepare the journal entry for the first semiannual interest payment.
  1. Prepare the journal entry for the second semiannual interest payment.

Problem 2 (18 pts.)

Smith Corporation issued $200,000 of 9%, 4-year bonds for 206,733 to yield a market rate of 8%. A partially completed amortization table is presented below.

INTEREST PERIOD

INTEREST EXPENSE

END OF PERIOD CARRYING VALUE

        6,733

           206,733

1

        8,269

              9,000

          731

        6,002

           206,002

2

        8,240

              9,000

            760

        5,242

           205,242

3

        8,210

              9,000

            790

        4,452

           204,452

4

        8,178

              9,000

            822

        3,630

           203,630

5

        8,145

              9,000

            855

        2,775

           202,775

6

7

8

REQUIREMENTS:

  1. Fill in the missing column headings in the table.
  2. Complete the last three lines of the table (interest periods 6, 7, & 8)

In: Accounting

Barfly Inc. manufactures and markets a line of non-alcoholic mixers sold to restaurants and bars. Barfly’s...

Barfly Inc. manufactures and markets a line of non-alcoholic mixers sold to restaurants and bars. Barfly’s Creative Bartender has recently experimented with making alcoholic versions with the intention of bottling and marketing these directly to the public through appropriate retail outlets. Prior spending on R&D was $1.5 million and Barfly anticipates spending half of that again during the first year of the project to conclude R&D (for total R&D of $2.25 million). The cost of building the manufacturing line is estimated at $1,175,000.

Marketing projects revenues from the new product line will be 800,000 units in the first year, growth in years 2 and 3 at 15%, growth in year 4 at 10%, and 5% for year 5. While Barfly anticipates the product will have a longer life than 5 years, their initial projections are for a 5 year time horizon, fully depreciating the cost of plant and equipment over that time on a straight-line basis.

Revenue per unit is projected to be $2.50 in the first year, with prices rising by 3% per year thereafter. COGS are projected to be 68% of revenues, SG&A 7% of revenues, and the company’s marginal tax rate is 32%. Net working capital required for the project is expected to be 2% of revenues annually once the project is fully online in year 1.

Barfly’s balance sheet includes $3,000,000 in total capital, of which $980,000 is debt. The market yield to maturity on debt is 3.75%, the risk free rate on a 5-year Treasury is 3%, and the market risk premium is 6.5%. The company’s beta is 1.3 and the CFO uses the CAPM to estimate cost of equity.

  1. What is the project’s NPV?
  2. What is the project’s IRR?
  3. Should the project be accepted?

Management has been studying the company’s capital structure and is considering using a small secondary offering of stock to pay down debt. The following data is used to determine the cost of debt under varying capital structures.

Debt ratio

Spread to Treasuries

Yield on Debt

0% - <10%

0.00%

3.000%

10% - < 20%

0.15%

3.150%

20% - < 30%

0.30%

3.300%

30% - < 40%

0.50%

3.500%

40% - < 50%

0.75%

3.750%

50% - < 60%

1.05%

4.050%

60% - < 70%

1.35%

4.350%

70% - < 80%

1.90%

4.900%

80% - < 90%

2.50%

5.500%

90% - < 100%

3.10%

6.100%

100% - < 110%

3.80%

6.800%

110% - < 120%

4.70%

7.700%

120% - < 130%

6.00%

9.000%

130% - < 140%

7.20%

10.200%

140% - < 150%

9.00%

12.000%

150% - < 160%

11.00%

14.000%

  1. If Barfly issues $180,000 in new equity and uses the proceeds to repurchase (and defease*) existing debt, what would the resulting weighted average cost of capital be?
  2. Should management move towards this capital structure? Why or why not?

In: Finance

Barfly Inc. manufactures and markets a line of non-alcoholic mixers sold to restaurants and bars. Barfly’s...

Barfly Inc. manufactures and markets a line of non-alcoholic mixers sold to restaurants and bars. Barfly’s Creative Bartender has recently experimented with making alcoholic versions with the intention of bottling and marketing these directly to the public through appropriate retail outlets. Prior spending on R&D was $1.5 million and Barfly anticipates spending half of that again during the first year of the project to conclude R&D (for total R&D of $2.25 million). The cost of building the manufacturing line is estimated at $1,175,000.

Marketing projects revenues from the new product line will be 800,000 units in the first year, growth in years 2 and 3 at 15%, growth in year 4 at 10%, and 5% for year 5. While Barfly anticipates the product will have a longer life than 5 years, their initial projections are for a 5 year time horizon, fully depreciating the cost of plant and equipment over that time on a straight-line basis.

Revenue per unit is projected to be $2.50 in the first year, with prices rising by 3% per year thereafter. COGS are projected to be 68% of revenues, SG&A 7% of revenues, and the company’s marginal tax rate is 32%. Net working capital required for the project is expected to be 2% of revenues annually once the project is fully online in year 1.

Barfly’s balance sheet includes $3,000,000 in total capital, of which $980,000 is debt. The market yield to maturity on debt is 3.75%, the risk free rate on a 5-year Treasury is 3%, and the market risk premium is 6.5%. The company’s beta is 1.3 and the CFO uses the CAPM to estimate cost of equity.

  1. What is the project’s NPV?
  2. What is the project’s IRR?
  3. Should the project be accepted?

Management has been studying the company’s capital structure and is considering using a small secondary offering of stock to pay down debt. The following data is used to determine the cost of debt under varying capital structures.

Debt ratio

Spread to Treasuries

Yield on Debt

0% - <10%

0.00%

3.000%

10% - < 20%

0.15%

3.150%

20% - < 30%

0.30%

3.300%

30% - < 40%

0.50%

3.500%

40% - < 50%

0.75%

3.750%

50% - < 60%

1.05%

4.050%

60% - < 70%

1.35%

4.350%

70% - < 80%

1.90%

4.900%

80% - < 90%

2.50%

5.500%

90% - < 100%

3.10%

6.100%

100% - < 110%

3.80%

6.800%

110% - < 120%

4.70%

7.700%

120% - < 130%

6.00%

9.000%

130% - < 140%

7.20%

10.200%

140% - < 150%

9.00%

12.000%

150% - < 160%

11.00%

14.000%

  1. If Barfly issues $180,000 in new equity and uses the proceeds to repurchase (and defease*) existing debt, what would the resulting weighted average cost of capital be?
  2. Should management move towards this capital structure? Why or why not?

In: Finance

The Canadian dollar strengthened against its U.S. counterpart on Tuesday as oil prices rose to 3-1/2-year...

The Canadian dollar strengthened against its U.S. counterpart on Tuesday as oil prices rose to 3-1/2-year highs and domestic manufacturing data supported the view that the Bank of Canada will hike interest rates next week.

At 4 p.m. EDT, the Canadian dollar was trading 0.4 per cent higher at $1.3138 to the greenback, or 76.12 U.S. cents. The currency traded in a range of $1.3133 to $1.3207.

Growth in the Canadian manufacturing sector accelerated in June to its fastest pace in more than seven years, data showed. The IHS Markit Canada Manufacturing Purchasing Managers’ Index rose to a seasonally adjusted 57.1 last month from 56.2 in May.

Strengthening of domestic data has come despite slow-moving talks to revamp the North American Free Trade Agreement and a trade dispute with the United States.

The White House said on Monday that Canada’s decision to enact tariffs on $16.6-billion worth of American goods in retaliation for U.S. tariffs on imports of Canadian steel and aluminum would not help its economy.

“We have been climbing the wall of worry since April and the manufacturing sector in Canada is still posting multi-year strength levels,” said Michael Goshko, corporate risk manager at Western Union Business Solutions. “The Bank of Canada has got to pay attention to something like that.”

Perceived chances of an interest rate hike at the July 11 announcement have jumped to nearly 80 per cent from about 50 per cent before hawkish comments by Bank of Canada Governor Stephen Poloz at a news conference last week.

On Friday, when domestic data showed a surprise expansion of the domestic economy in April and business optimism, the loonie touched its strongest in two weeks at $1.3131.

U.S. crude oil futures settled 0.3 per cent higher at $74.14 a barrel. Oil is one of Canada’s major exports.

The U.S. dollar fell nearly 0.5 per cent against a basket of major currencies ahead of the July 4 Independence Day holiday, while stocks on Wall Street were pressured by declines for technology stocks.

Canadian government bond prices were higher across a flatter yield curve, with the two-year up 2.5 Canadian cents to yield 1.898 per cent and the 10-year rising 22 Canadian cents to yield 2.142 per cent.

The 10-year yield touched its highest intraday level since June 18 at 2.204 per cent.

Canada’s employment report for June and trade data for May are due out on Friday.

Relating your argument to the material we have covered in the class and using the information about the situation in the Canadian economy from the article, explain why it is expected that Bank of Canada will be increasing the interest rate soon.

In: Economics

Consider each of the scenarios below. For each statement, decide which statistical procedure is most appropriate....

Consider each of the scenarios below. For each statement, decide which statistical procedure is most appropriate.

  ?    One-sample hypothesis test for a single proportion    One-sample confidence interval for a single proportion    Two-sample hypothesis test for the difference in proportions    Two-sample confidence interval for the difference in proportions    Chi-square test for multiple categories of a single variable    Chi-square test of independence of 2 categorical variables    One-sample hypothesis test for a single mean    One-sample confidence interval for a single mean    Two-sample hypothesis test for the difference in means    Two-sample confidence interval for the difference in means      1. An insurance company selected a random sample of 500 clients under 18 years of age and found that 180 of them had had an accident in the previous year. A random sample of 600 clients aged 18 and older was also selected and 150 of them had had an accident in the past year. We want to determine if the accident proportions differ between the two age groups.

  ?    One-sample hypothesis test for a single proportion    One-sample confidence interval for a single proportion    Two-sample hypothesis test for the difference in proportions    Two-sample confidence interval for the difference in proportions    Chi-square test for multiple categories of a single variable    Chi-square test of independence of 2 categorical variables    One-sample hypothesis test for a single mean    One-sample confidence interval for a single mean    Two-sample hypothesis test for the difference in means    Two-sample confidence interval for the difference in means      2. A nutritionist wants to know the proportion of Americans who say they limit their consumption of artificial sweeteners. A poll of 2537 US adults is conducted and the proportion is recorded.

  ?    One-sample hypothesis test for a single proportion    One-sample confidence interval for a single proportion    Two-sample hypothesis test for the difference in proportions    Two-sample confidence interval for the difference in proportions    Chi-square test for multiple categories of a single variable    Chi-square test of independence of 2 categorical variables    One-sample hypothesis test for a single mean    One-sample confidence interval for a single mean    Two-sample hypothesis test for the difference in means    Two-sample confidence interval for the difference in means      3. A claim is made that 87% of college undergraduates send more than 10 text messages per day. You collect a random sample of undergraduates to determine if the claim is reasonable or not.

  ?    One-sample hypothesis test for a single proportion    One-sample confidence interval for a single proportion    Two-sample hypothesis test for the difference in proportions    Two-sample confidence interval for the difference in proportions    Chi-square test for multiple categories of a single variable    Chi-square test of independence of 2 categorical variables    One-sample hypothesis test for a single mean    One-sample confidence interval for a single mean    Two-sample hypothesis test for the difference in means    Two-sample confidence interval for the difference in means      4. A researcher wants to estimate the average yearly cost of attendance at community colleges in the US. They collect a simple random sample of 50 community colleges and calculate the mean and sd of the yearly cost of attendance at each school.

  ?    One-sample hypothesis test for a single proportion    One-sample confidence interval for a single proportion    Two-sample hypothesis test for the difference in proportions    Two-sample confidence interval for the difference in proportions    Chi-square test for multiple categories of a single variable    Chi-square test of independence of 2 categorical variables    One-sample hypothesis test for a single mean    One-sample confidence interval for a single mean    Two-sample hypothesis test for the difference in means    Two-sample confidence interval for the difference in means      5. An insurance company selected a random sample of 500 clients under 18 years of age and found that 180 of them had had an accident in the previous year. A random sample of 600 clients aged 18 and older was also selected and 150 of them had had an accident in the past year. We want to determine how much the accident proportions differ between the two age groups.

In: Statistics and Probability