Questions
Write a C++ program that prints a calendar for a given year. ONLY USING "#include<iostream>" and...

Write a C++ program that prints a calendar for a given year.

ONLY USING "#include<iostream>" and "#include<cmath>" The program prompts the user for two inputs:

      1) The year for which you are generating the calendar.
      2) The day of the week that January first is on, you will use the following notation to set the day of the week:

      0 Sunday                     1 Monday                   2 Tuesday                   3 Wednesday
      4 Thursday                 5 Friday                      6 Saturday

Your program should generate a calendar similar to the one shown in the example output below. The calendar should be printed on the screen. Your program should be able to handle leap years. A leap year is a year in which we have 466 days. That extra day comes at the end of February. Thus, a leap year has 466 days with 29 days in February. A century year is a leap year if it is divisible by 400. Other years divisible by 4 but not by 100 are also leap years.

Example: Year 2000 is a leap year because it is divisible by 400.  Year 2004 is a leap year because it is divisible by 4 but not by 100.

Your program should clearly describe the functionality of each function and should display the instructions on how to run the program.

Sample Input:

Enter the year for which you wish to generate the calendar: 2018
Enter the day of the week that January first is on: 1

Sample output:

Calendar for year 2018

January
Sun      Mon     Tue      Wed     Thu      Fri        Sat
            1          2          4           4          5          6         

7          8          9          10        11        12        14       

14       15        16        17         18        19        20       

21       22        24        24         25        26        27       

28       29        40        41

February
Sun      Mon     Tue      Wed     Thu      Fri        Sat
                                                1          2          4         

4          5          6          7          8          9          10       

11        12        14        ..         ..          ..          ..         

..          ..          ..          ..          ..          ..          ..

..

..

..

In: Computer Science

A paper company requires that the true median height of pine trees exceed 40 feet before...

A paper company requires that the true median height of pine trees exceed 40 feet before they are harvested. A penalty is assigned if the median height is less than 40 feet. The management wants to avoid this penalty. A sample of 24 trees in one large plot is selected, and 7 of them are over 40 feet. Conduct the appropriate hypothesis test to determine if the median height of pine trees in the plot is less than 40 feet. The estimated median is 35 feet. Do not assume normality. Let a = 0.05.

In: Math

RISK AND RETURN – (A) Consider the expected return and standard deviation of these four stocks...

RISK AND RETURN –

(A) Consider the expected return and standard deviation of these four stocks (chart below). If investors are buying only one stock, which one of these stocks would no investor buy? Why? (PLEASE INCLUDE FORMULAS USED TO SOLVE PROBLEM FOR EXCEL).

STOCK EXPECTED RETURN STANDARD DEVIATION
A 6% 1%
B 7% 1.5%
C 7% 2%
D 8% 2%

ADDING AN ASSET TO A PORTFOLIO -

(B) Your current portfolio's cash returns over the past three years look like this:

YEAR 1 YEAR 2 YEAR 3 E(CF) o
Your Portfolio CF's 120 100 80 100 20

The past three years are representative of a good year, an average year, and a bad year for you. You are considering adding one of these two equally priced assets to your portfolio:

YEAR 1 YEAR 2 YEAR 3 E(CF) o
New Asset 1 6 6 6 6 0
New Asset 2 2 6 10 6 4

Which asset would be best for you? Calculate the portfolio expected return, variance, and standard deviation when adding each new asset? (PLEASE INCLUDE FORMULAS USED TO SOLVE PROBLEM FOR EXCEL).

In: Finance

1. The relation between gram and amu is represented by ____________________________(use NA = 6 x 10*23)...

1. The relation between gram and amu is represented by ____________________________(use NA = 6 x 10*23)

2. The atomic mass of Rubidium is 85, so the mass of one mole of Rubidium is______________________.

3. The atomic mass of silver (Ag) is 108. find the mass of two moles of silver atoms.___________________

4. The atomic mass of lithium (Li) is 7. the mass of one atom of lithium is ________________________.

5. Given the following atomic masses: N=14; O=16. tha is the molecular mass of N2O5?_______________________________

6. (Given: atomic masses of H=1; O =16;and S=32) The mass of one mole of sulphuric acid, H2SO4, is______________________________

7. Given the following atomic masses; N=14; O=16. What is the molar mass of N2O2?__________________________________________

8. How many moles are there in 3.9g of K? [Atomic mass of K=39]________________________________

9. Find the number of moles in 51 g of ammonia gas (NH3). [N=14; H=1]________________________

10. How many moles are present in 6.3 g of nitric acid HNO3? [Given atomic mass of H=1, N=14 and Q=16]

11. How many moles are contained in 620g of pure H2CO3? [Given atomic masses: H=1,C=12 and O=16]________________________

In: Chemistry

Ford Motor Company just paid a dividend of $1.80 per share and its stock has a...

Ford Motor Company just paid a dividend of $1.80 per share and its stock has a beta of 1.2. Risk free rate is 4% and expected return of the stock market is 12%. Ford wants to change its dividend policy to one of the two alternatives, what will be today’s stock price under each situation?

  1. Keep plowback ratio at 100% for the next 5 years. At the end of the sixth year, Ford will pay a $3 per share dividend and after that future dividend will increase 8% per year indefinitely
  2. Decrease its dividend by 5% next year, then another decrease by 10% in year two. After that, the dividend will increase at a rate of 8% per year indefinitely.

In: Finance

Determine the before and after-tax return from each of the following trades. Assume a marginal tax...

Determine the before and after-tax return from each of the following trades. Assume a

marginal tax rate of 40%.

a. You purchase a bond today that has a quoted price of 94.455/94.695, a fixed coupon

rate of 6% (paid quarterly) which last paid a coupon 40 days prior. You sell the

bond in exactly one year for a quoted price of 97.565/97.950.

b. You purchased a newly issued bond one year ago. At the time of issuance, the bond

was sold by the company for par, had a coupon rate of 5.5% (paid semi-annually)

and 10 years to maturity. The YTM on the bond today is 6.25% and you sell it.

In: Finance

Sheffield Inc. has provided you with the following information. This company purchases its inventory from a...

Sheffield Inc. has provided you with the following information. This company purchases its inventory from a supplier for cash and has only cash sales. Sheffield uses the average cost formula in a perpetual inventory system. Increased competition has recently reduced the price of the product.

Date Explanation Units Unit Cost Unit Price
Apr. 1 Beginning inventory 50 $78
6 Purchases 110 89
8 Sales (130 ) $120
15 Purchases 120 68
20 Sales (120 ) 102
27 Purchases 20 59

Based on your answer to part (c), determine whether the company should record a journal entry at the end of April and, if so, prepare the entry. (List all debit entries before credit entries. Credit account titles are automatically indented when the amount is entered. Do not indent manually. Round answers to 2 decimal places, e.g. 1.25. If no entry is required, select "No Entry" for the account titles and enter 0 for the amounts.)
answer to part C was $2450 (49 x 50)

Account Titles and Explanation

Debit

Credit

COGS ?
inventory ?

In: Accounting

Greta, an elderly investor, has a degree of risk aversion of A = 3 when applied...

Greta, an elderly investor, has a degree of risk aversion of A = 3 when applied to return on wealth over a one-year horizon. She is pondering two portfolios, the S&P 500 and a hedge fund, as well as a number of 1-year strategies. (All rates are annual and continuously compounded.) The S&P 500 risk premium is estimated at 8% per year, with a SD of 23%. The hedge fund risk premium is estimated at 10% with a SD of 40%. The returns on both of these portfolios in any particular year are uncorrelated with its own returns in other years. They are also uncorrelated with the returns of the other portfolio in other years. The hedge fund claims the correlation coefficient between the annual returns on the S&P 500 and the hedge fund in the same year is zero, but Greta is not fully convinced by this claim.

a-1. Assuming the correlation between the annual returns on the two portfolios is indeed zero, what would be the optimal asset allocation? (Do not round intermediate calculations. Enter your answers as decimals rounded to 4 places.)

S&P-

Hedge-


a-2. What is the expected risk premium on the portfolio? (Do not round intermediate calculations. Enter your answers as decimals rounded to 4 places.)

Expected risk premium-

In: Finance

George Johnson recently inherited a large sum of money; he wants to use a portion of...

George Johnson recently inherited a large sum of money; he wants to use a portion of this money to set up a trust fund for his two children. The trust fund has two investment options: (1) a bond fund and (2) a stock fund. The projected returns over the life of the investments are 8% for the bond fund and 20% for the stock fund. Whatever portion of the inheritance George finally decides to commit to the trust fund, he wants to invest at least 40% of that amount in the bond fund. In addition, he wants to select a mix that will enable him to obtain a total return of at least 5.5%.

a.Formulate a linear programming model that can be used to determine the percentage that should be allocated to each of the possible investment alternatives. If required, round your answers to three decimal places. Let B = percentage of funds invested in the bond fund S = percentage of funds invested in the stock fund

  1. Max
    • Max
    • Min
    B + S
    s.t.
    B
    • =
    Bond fund minimum
    B + S
    • =
    Minimum return
    B + S =
    • =
    Percentage requirement

b.Solve the problem using the graphical solution procedure. If required, round the answers to one decimal place. Optimal solution:

B =

S =

Value of optimal solution is= %

In: Math

Problem 2-25 (Algorithmic) George Johnson recently inherited a large sum of money; he wants to use...

Problem 2-25 (Algorithmic)

George Johnson recently inherited a large sum of money; he wants to use a portion of this money to set up a trust fund for his two children. The trust fund has two investment options: (1) a bond fund and (2) a stock fund. The projected returns over the life of the investments are 8% for the bond fund and 20% for the stock fund. Whatever portion of the inheritance he finally decides to commit to the trust fund, he wants to invest at least 40% of that amount in the bond fund. In addition, he wants to select a mix that will enable him to obtain a total return of at least 5.5%.

  1. Formulate a linear programming model that can be used to determine the percentage that should be allocated to each of the possible investment alternatives. If required, round your answers to three decimal places.
    Let B = percentage of funds invested in the bond fund
    S = percentage of funds invested in the stock fund
    B + S
    s.t.
    B Bond fund minimum
    B + S Minimum return
    B + S Percentage requirement
  2. Solve the problem. If required, round the answers to one decimal place.

    Optimal solution: B = , S =

    Value of optimal solution is  % ????

In: Advanced Math