Questions
This code in java: A typical ball is circular in shape. Many games are played with...

This code in java:

A typical ball is circular in shape. Many games are played with ball e.g cricket ball football etc. Impingement a scenario in which you create cricket ball and football or any other game ball. All balls differ in color, size and material

In: Computer Science

Pelzer Printing Inc. has bonds outstanding with 9 years left to maturity. The bonds have a...

Pelzer Printing Inc. has bonds outstanding with 9 years left to maturity. The bonds have a 8% annual coupon rate and were issued 1 year ago at their par value of $1,000. However, due to changes in interest rates, the bond's market price has fallen to $901.40. The capital gains yield last year was -9.86%.

What is the yield to maturity? Do not round intermediate calculations. Round your answer to two decimal places. %

For the coming year, what is the expected current yield? (Hint: Refer to footnote 7 for the definition of the current yield and to Table 7.1.) Do not round intermediate calculations. Round your answer to two decimal places. %

For the coming year, what is the expected capital gains yield? (Hint: Refer to footnote 7 for the definition of the current yield and to Table 7.1.) Do not round intermediate calculations. Round your answer to two decimal places. %

In: Finance

Pelzer Printing Inc. has bonds outstanding with 9 years left to maturity. The bonds have a...

Pelzer Printing Inc. has bonds outstanding with 9 years left to maturity. The bonds have a 8% annual coupon rate and were issued 1 year ago at their par value of $1,000. However, due to changes in interest rates, the bond's market price has fallen to $901.40. The capital gains yield last year was -9.86%.

What is the yield to maturity? Do not round intermediate calculations. Round your answer to two decimal places. %

For the coming year, what is the expected current yield? (Hint: Refer to footnote 7 for the definition of the current yield and to Table 7.1.) Do not round intermediate calculations. Round your answer to two decimal places. %

For the coming year, what is the expected capital gains yield? (Hint: Refer to footnote 7 for the definition of the current yield and to Table 7.1.) Do not round intermediate calculations. Round your answer to two decimal places. %

In: Finance

Mrs. J. (age 42) has been married for 20 years to a TV newscaster. She has...

Mrs. J. (age 42) has been married for 20 years to a TV newscaster. She has two 16-year-old twins who are in high school. She's coming in for a routine physical because she said over the phone that she has no energy and has lost some weight. She also thinks she has had a temperature for several days.

CC: "I can't stand sweating at night and think I'm too young for menopause. Besides, I still get my period."

Physical exam:

·        Temperature, 101°F    

·        Weight loss of 10 lbs. since her previous visit last year

·        Flu-like symptoms     

·        Nonproductive cough       

·        Bilateral lymphadenopathy in cervical and supraclavicular nodes    

·        Decreased breath sounds in bilateral bases  

·        White hair-like growth on tongue

Questions:

5. What are the differential diagnoses and your primary diagnosis with rationales?

6. Are there any legal/ethical considerations?

7. What is your plan of care? Always include pharmaceutical and nonpharmaceutical treatments, diagnostic tests, patient/family education, and follow-up plan.

8. Are there any Healthy People 2020 objectives that you should consider?

In: Nursing

 A firm is considering renewing its equipment to meet increased demand for its product. The cost...

 A firm is considering renewing its equipment to meet increased demand for its product. The cost of equipment modifications is $ 1.88 million plus $ 111,000 in installation costs. The firm will depreciate the equipment modifications under​ MACRS, using a​ 5-year recovery period​. Additional sales revenue from the renewal should amount to $ 1.17 million per​ year, and additional operating expenses and other costs​ (excluding depreciation and​ interest) will amount to 40 % of the additional sales. The firm is subject to a tax rate of 40 %. ​(Note​: Answer the following questions for each of the next 6​ years.)

Rounded Depreciation Percentages by Recovery Year Using MACRS for

First Four Property Classes

Percentage by recovery​ year*

Recovery year

3 years

5 years

7 years

10 years

1

33​%

20​%

14​%

10​%

2

45​%

32​%

25​%

18​%

3

15​%

19​%

18​%

14​%

4

77​%

12​%

12​%

12​%

5

1212​%

99​%

99​%

6

55​%

99​%

88​%

7

99​%

77​%

8

44​%

66​%

9

66​%

10

66​%

11

44​%

Totals

100​%

100​%

100​%

100​%

a. What incremental earnings before​ depreciation, interest, and taxes will result from the​ renewal?

b. What incremental net operating profits after taxes will result from the​ renewal?

c. What incremental operating cash inflows will result from the​ renewal?

In: Accounting

For the following experiments/questions, pick the most appropriate statistical test. You have the following statistical tests...

For the following experiments/questions, pick the most appropriate statistical test. You have the following statistical tests as choices: some may be used more than once, others not at all. Assume homogeneity of variance (where applicable) and the validity of parametric tests (where applicable), unless something is directly stated (e.g., “the data are not at all normal”) or otherwise indicated (viz., by the inspection of the data) which would indicate a strong and obvious violation of an assumption. This means you must inspect the data for violations of all assumptions. Please simply write the letter for the test as your answer. [You can, but need not, add an explanation.] A: one sample z-test B: one-sample t-test C: t-test for the difference between means for two related samples D: t-test for the difference between means for two independent samples with homogeneity of variance E: t-test for the difference between means for two independent samples with heterogeneity of variance F: Wilcoxon test G: Mann-Whitney test H: a one sample z-test for proportions (or a chi-square goodness of fit) I: chi-square goodness of fit only (where a one sample z-test of proportions is not appropriate) J: a two sample z-test for the difference between proportions (or a chi-square test of independence) K: chi-square test of independence only (where a two sample z-test for proportions is not appropriate.) L: ANOVA

1. I want to know if Californians are better swimmers than non-Californians. I measure ability to swim by timing how long it takes to swim 100 meters.

2. Gigi is a waiter at an Italian restaurant and wants to know if men or women tip her more money. She also wonders if smiling while serving them also affects her tip. Thus, at some tables she smiles and at the other tables she does not smile.

3. Emily wants to know if horses are attracted to a specific type of food. She gets 25 different horses and provides them with a choice of carrots, sugar cubes, hay, or apples. She then records which the horse eats first.

4. An experimenter is interested in looking at the impact of weight gain during students’ freshman year at college on the students’ happiness. The experimenter compared students who gained weight (15 pounds or more) during their freshman year with students who did not gain weight. It is safe to assume that the level of happiness can be treated as if it is interval in scale. Here is the data. Gained weight: 8 5 6 9 7 7 6 7 8 Did not gain weight 2 3 4 4 6 5 5 3 4 2 4 4 3 5 6 5 4 3

5. In a study of 3,401 Allergy Research Patients from five different allergy clinics throughout the Greater Los Angeles, the patients were asked if they preferred appointments in the morning or the evening. Do patients from different clinics show a difference in preference?

6. Grant is testing to see if people see more than 10 movies per year. He gets a sample of four people. It is known that the population distribution is normal, and it is known what the population standard deviation is.

7. An experiment was conducted to compare four drugs for minimizing migraine headaches. Two hundred people suffering from migraines were divided into four groups of fifty people each – one group per drug. After using the drug, the people were asked how much pain they were still feeling. Do a hypothesis test to see if drug type affects headache. (Assume pain is interval.) 8. Donna is testing to see if going to the beach to study for a test affects test score. The data are below Go to Beach 145 150 142 150 72 68 147 130 65 62 Doesn’t go to Beach 54 135 126 58 141 67 69 132 59 126

8.         Donna is testing to see if going to the beach to study for a test affects test score. The data are below

            Go to Beach                                145       150       142       150       72         68         147       130       65         62        

            Doesn’t go to Beach                     54         135       126       58         141       67         69         132       59         126      

In: Statistics and Probability

Module 7 showed that one way of comparing different algorithms for accomplishing the same task is...

Module 7 showed that one way of comparing different algorithms for accomplishing the same task is complexity analysis. You will recall that in complexity analysis we express the time an algorithm takes to run as a function of the size of the input, and we used the big-Oh notation. For example, if an algorithm has a complexity of O(1), then it always runs in the same amount of time, no matter what the size of the input is; if it O(n), then the time it takes for the algorithm to run is proportional to the size of the input.

However, complexity analysis has a number of limitations. For example, big-Oh analysis concerns the worst case scenario. For example, some sorting algorithms with a complexity of O(n^2) often run considerably faster if the list that it receives as input is (almost) sorted; other sorting algorithms with a complexity of O(n^2) always take the same amount of time, no matter what state the list is in. Also, in big-Oh, we look at the dominant term in our calculation of the complexity of the algorithm. Thus, when we analyze an algorithm and discover that it runs in 75,312 + n time units, we still say that it has a complexity of O(n). It is therefore deemed to be better than an algorithm that runs in .007 + n^2 time units, as this algorithm has a complexity of O(n^2). We also saw the rationale behind this: If n becomes sufficiently large, the other factors become insignificant.

Fortunately, there is another way to determine how long it takes for an algorithm to run, namely timing experiments. In a timing experiment, you actually implement the algorithm in a programming language, such as Java or C++, and simply measure how long it takes for the algorithm to run.

In the term project for this course, you are going to conduct a timing experiment and compare the results with the results you would get from a complexity analysis. We will compare Bubble Sort with Selection Sort.

In its least sophisticated form, bubble sort (http://en.wikipedia.org/wiki/Bubble_sort) works as follows:

Assuming that the list contains n elements.

Compare the first and the second element in the list, and swap them if the last element is smaller than the preceding one; otherwise, do nothing to this pair.

Now, compare the second and third elements and swap them if the first of them is larger than the second; otherwise, do nothing to this pair.

Move on the next pair and continue the process until you reach the end of the list.

A little reflection will show that at the end of this iteration, the last element in the list is now the largest element in the list. The last element has bubbled to the top.

Now repeat the process but rather than going to the end of the list, stop when you reach n-1.

Now repeat the process again, but rather than going to the end of the list, stop when you reach n-2.

Keep repeating this until you reach 1.

The Wikipedia entry has a little simulation that shows how bubble sort works. The code looks something like:

bubbleSort(array A){
   n = length(A);

   for(j = n; j > 0, j--)
       for(i = 1; i < j; i++) {
         if A[i-1] > A[i]
             swap(A,i-1, i);
       }
   }
}

swap obviously swaps the elements and can be defined as:

swap(A, pos1, pos2) {
     temp = A[pos1];
     A[pos1] = A[pos2];
     A[pos2] = temp;
}

Another sort is selection sort (http://en.wikipedia.org/wiki/Selection_sort). We saw selection sort in the question in the sub-module on how to determine the complexity of an algorithm. Array A contains n elements, the elements to be sorted. The algorithm starts at the first position in the array and looks through the array for the smallest element. Once it reaches the end of the array, it puts that element in the first cell of the array. It then restarts the whole process from the second position in the array, and continues until the entire array has been sorted.

selection_sort(array A) {
    int i,j
    int iMin;
    for(j = 0; j < n; j++){
       iMin = j;

   for ( i = j+1; i < n; i++) {

       if (a[i] < a[iMin]) {

           iMin = i;

       }

   }

   if ( iMin != j ) {

       swap(a[j], a[iMin]);

   }

} } If you like the Hungarian dancers, they perform selection sort at http://www.youtube.com/watch?v=Ns4TPTC8whw

THE PROJECT

The purpose of the project is to perform a timing experiment. You are required to complete the following activities:

Write a computer program that prompts the user for a number, creates an array for that number of random integers, and then usees the bubble sort to order the array. The program should print out the array prior to the call to the sorting algorithm and afterwards. You can write the program in either Java, C++, C#, or whatever language you are most comfortable in. Do Not use an API from the language library. Write the program to perform the sort.

Repeat 1 but use selection sort this time. Again, write out the program for the selection sort. DO not use the language library.

1 and 2 are primarily intended to make sure that your algorithms work.

Once you are convinced your programs work, do the following

Write a computer program that prompts the user for one number, n for the number of items in the array to sort, and create and sort 1000 different arrays of this size timing the run to get an average time to sort an array of this size. Then do the following:

Initiate a variable running_time to 0

Create a for loop that iterates 1000 times.

In the body of the loop,

Create an array of n random integers (Make sure you make the range of the random numbers substantially bigger than the array, ie. if the array size is 500 have the random number generator pick numbers between 1 and 5000. For the largest array have the random number generator pick numbers between 1 and 50,000).

Get the time and set this to start-time (notice the sort is started after each array is built. You want to time the srt process only). You will have to figure out what the appropriate command is in the programming language you are using to find the time (Important: Do not start the timer until after the array is created).

Use bubble sort to sort the array

Get the time and set this to end-time Subtract start-time from end-time and add the result to total_time

Once the program has run, note

The number of items sorted

The average running time for each array (total_time/1000)

Repeat the process using 500, 2500 and 5000 as the size of the array.

Repeat 3 using selection sort.

You now have 6 data points ( the averages from the three array sizes for the two sort algorithms) Create a spreadsheet showing the results of 3 and 4 and create a graph to graphically represent the information. Show both sort algorithms on the same graph for comparison.

Write a one page document explaining the results, bearing in mind that both algorithms have a complexity of O(n^2) and what you know about complexity analysis. Use your knowledge of complexity analysis to explain your results.

Please submit

Program code for 1

Program code for 2

Program code used in 3 and the results of the three program runs

Program code used in 4 and the results of the three program runs

The spreadsheet created in 5

The report. In the report, say which machine you ran the experiments on (type of processor, RAM, etc). Explain your experiment and why you feel you received the results you observed.

In: Statistics and Probability

For the data set 1 4 4 4 7 7 7 9 12 13 14 14...

For the data set

1

4

4

4

7

7

7

9

12

13

14

14

14

15

16

16

17

17

19

20

22

23

23

24

24

25

26

26

27

29

29

31

34

34

35

35

36

37

43

44

44

47

48

48

49

50

52

52

54

54

55

56

56

58

58

59

59

60

64

64

65

66

69

69

73

76

76

77

77

79

(a) Find the 76th percentile.

(b) Find the 42nd percentile.

(c) Find the 16th percentile.

(d) Find the 65th percentile.

In: Math

Older people often have a hard time finding work. AARP reported on the number of weeks...

Older people often have a hard time finding work. AARP reported on the number of weeks it takes a worker aged 55 plus to find a job. The data on number of weeks spent searching for a job contained in the table below. 17 0 0 28 18 37 7 13 33 0 24 50 4 48 5 19 3 25 2 29 4 8 8 32 1 27 7 47 6 0
a. Provide a point estimate of the population mean number of weeks it takes a worker aged 55 plus to find a job. Round the answer to two decimal places.
( ) weeks
b. At 95% confidence, what is the margin of error? Round the answer to four decimal places. ( )
c. What is the 95% confidence interval estimate of the mean? Round the answers to two decimal places. ( , )
d. Find the skewness. Round the answer to four decimal places. ( )

In: Statistics and Probability

21. From the following list of costs, calculate the amount of societal environmental costs. Equipment purchased...

21. From the following list of costs, calculate the amount of societal environmental costs.

Equipment purchased to reduce emissions                                                                     $ 200 000

Monitoring emissions                                                                     $                                                                    50 000

Estimated fines for breaching environmental regulations                                        $ 500 000 Estimated future costs-the need to dispose of firm's products which contain

hazardous material                                                                  550 000

Purchase of recyclable material                                                                     $ 130 000

On-going clean-up costs                                                                     $ 300 000

Estimate of potential liability-oil spill                                                                     $ 600 000

Purchase of recyclable packaging materials                                                                     $                                                                    25 000

Estimate of lost business-adverse television publicity                                                                             $ 110 000

A. $350 000

B. $355 000

C. $110 000

D. $550 000

In: Accounting