Questions
Part 1 1. Implement the binary search function. The function should take as formal parameters an...

Part 1

1. Implement the binary search function. The function should take as formal parameters an array of integers, its size and target, and returns

(a) in the case of successful search – the position (index) of the target in the array

(b) in the case of unsuccessful search – an exception with the message “Unsuccessful search” thrown from the function to the user.

2. The binary search works correctly only when the input is sorted. This requirement should be satisfied before the algorithm starts the search operation. Therefore if the input is unsorted the exception with the message “Unsorted input” should be thrown by the function.

3. Test the binary search function using different inputs in the main function.

(a) Use const int SIZE to define the number of input elements.

(b) The main function should provide the try and catch mechanism.

In: Computer Science

Using the Home Depot company, how could strong team cohesion at the firm both enhance and...

Using the Home Depot company, how could strong team cohesion at the firm both enhance and hinder performance.

In: Operations Management

Charlene is evaluating a capital budgeting project that should last for 4 years. The project requires...

Charlene is evaluating a capital budgeting project that should last for 4 years. The project requires $700,000 of equipment. She is unsure what depreciation method to use in her analysis, straight-line or the 3-year MACRS accelerated method. Under straight-line depreciation, the cost of the equipment would be depreciated evenly over its 4-year life (ignore the half-year convention for the straight-line method). The applicable MACRS depreciation rates are 33%, 45%, 15%, and 7%. The company's WACC is 11%, and its tax rate is 35%.

What would the depreciation expense be each year under each method? Round your answers to the nearest cent. Year Scenario 1 (Straight-Line) Scenario 2 (MACRS) 1 $ $ 2 3 4

Which depreciation method would produce the higher NPV?

How much higher would the NPV be under the preferred method? Round your answer to two decimal places. Do not round your intermediate calculations.

In: Finance

The Bigbee Bottling Company is contemplating the replacement of one of its bottling machines with a...

The Bigbee Bottling Company is contemplating the replacement of one of its bottling machines with a newer and more efficient one. The old machine has a book value of $625,000 and a remaining useful life of 5 years. The firm does not expect to realize any return from scrapping the old machine in 5 years, but it can sell it now to another firm in the industry for $265,000. The old machine is being depreciated by $125,000 per year, using the straight-line method. The new machine has a purchase price of $1,150,000, an estimated useful life and MACRS class life of 5 years, and an estimated salvage value of $155,000. The applicable depreciation rates are 20%, 32%, 19%, 12%, 11%, and 6%. It is expected to economize on electric power usage, labor, and repair costs, as well as to reduce the number of defective bottles. In total, an annual savings of $225,000 will be realized if the new machine is installed. The company's marginal tax rate is 35%, and it has a 12% WACC.

What initial cash outlay is required for the new machine? Round your answer to the nearest dollar. Negative amount should be indicated by a minus sign. $

Calculate the annual depreciation allowances for both machines and compute the change in the annual depreciation expense if the replacement is made. Round your answers to the nearest dollar. Year Depreciation Allowance, New Depreciation Allowance, Old Change in Depreciation 1 $ $ $ 2 3 4 5

What are the incremental net cash flows in Years 1 through 5? Round your answers to the nearest dollar. Year 1 Year 2 Year 3 Year 4 Year 5 $ $ $ $ $

Should the firm purchase the new machine?

In general, how would each of the following factors affect the investment decision, and how should each be treated?

1. The expected life of the existing machine decreases.

2. The WACC is not constant, but is increasing as Bigbee adds more projects into its capital budget for the year. The input in the box below will not be graded, but may be reviewed and considered by your instructor.

In: Finance

Please create a Hangman game in Java language. For this game a random word will be...

Please create a Hangman game in Java language. For this game a random word will be selected from the following list (abstract, cemetery, nurse, pharmacy, climbing). You should keep a running tab of the user’s score and display it on screen; the user begins with 100 points possible if they correctly guess the word without any mistakes. For every incorrect letter which is guessed, 10 points should be taken away from what is left of their total possible points. For every correct letter which is guessed, their score is left unchanged. The user’s score should never be lower than 0, or exceed the mentioned points possible. Keep track and print a list of the player's high scores at the end.

In: Computer Science

Write a program factor that prints the prime factors of a specified non-negative integer. The integer...

Write a program factor that prints the prime factors of a specified non-negative integer. The integer will be provided as a command-line argument.

You may assume that the integer will be greater than 1 and less than or equal to the largest signed integer on your platform (that is, you may use an int).

In: Computer Science

Describe and provide a rationale for two instructional strategies that can be implemented in a math...

Describe and provide a rationale for two instructional strategies that can be implemented in a math lesson to create engagement, promote discussion, and provide opportunity for assessment. Do you think classroom instruction in math should be implemented through teacher-directed instructed or student-centered? Explain your choice

In: Psychology

The commercial concentrated hydrochloric acid is rated at 38 w/w%. The density of the solution is...

The commercial concentrated hydrochloric acid is rated at 38 w/w%. The density of the solution is d = 1.18g.mL. Calculate the molarity of HCl (cHCl), molality of HCl (cR,HCl), and the mole fraction of HCl (xHCl).

In: Chemistry

Linked List Course Outcome: CLO3    Build computer programs to implement appropriate data structures for solving computing...

Linked List

Course Outcome:

CLO3    Build computer programs to implement appropriate data structures for solving computing problems in a time frame given. (P3, PLO3)

Task

Write a complete program by applying linked list data structure that will perform the following operation on any records:

  1. Add record
  2. Delete record
  3. View record
  4. Find record

Your program also should be able to display the number of record in the linked list. Put your creativity to produce the program.

Your Submission should have the following components:

  1. Program description – explain in detail about the program that you are develop.
  2. Coding – Your developed program. Make sure you put appropriate comment in your program.
  3. Sample output – Give sample output for each operation with appropriate label or description.

In: Computer Science

Describing 1.    Accounts receivable— 2.    Note receivable— 3.    Inventories— 4.    Investments— 5.   Prepaid expenses— 6.   Land—...

Describing

1.    Accounts receivable—

2.    Note receivable—

3.    Inventories—

4.    Investments—

5.   Prepaid expenses—

6.   Land—

7.   Equipment, net—

8.    Patent—

9.    Note payable—$

10. Interest payable—

11. Common stock—

In: Accounting

Use the following table to answer questions 1 - 6: State of Economy Probability of State...

Use the following table to answer questions 1 - 6:

State of Economy

Probability of State of Economy

Asset A Rate of Return

Asset B Rate of Return

Boom

0.3

0.13

0.08

Normal

0.5

0.06

0.05

Recession

0.2

-0.05

-0.01

  1. What is the expected return for asset A?

  1. What is the expected return for asset B?

  1. What is the standard deviation for asset A?

  1. What is the standard deviation for asset B?

  1. What is the expected return of a portfolio that has 70% in Asset A and 30% in Asset B?

  1. The standard deviation of the 70% A and 30% B portfolio most likely should:

A)

Equal 70% X A's standard deviation plus 30% x B's standard deviation.

B)

Be greater than 70% X A's standard deviation plus 30% x B's standard deviation.

C)

Be less than 70% X A's standard deviation plus 30% x B's standard deviation.

In: Finance

JAVA Write nested while loop that will print out this pattern, based upon a number entered...

JAVA

Write nested while loop that will print out this pattern, based upon a number entered by the user. User enters 4: 1234 1234 1234 1234 User enters 2: 12 12

In: Computer Science

Motherboards, Power Supplies, NICs, Modems, Switches, and Cabling (Twisted Pair, Coaxial, and Fiber Optic); Hard Drives,...

Motherboards, Power Supplies, NICs, Modems, Switches, and Cabling (Twisted Pair, Coaxial, and Fiber Optic); Hard Drives, Dimms, DDRs, RIMMs, SCSI, IDE, PCI, RAM; VGA, SVGA, and XVGA video
TCP/IP, NetBIOS. please answers all in a short answer amd clear.

In: Computer Science

Answer the following questions in an Excel file. Each questions with multiple parts requires a separate...

Answer the following questions in an Excel file. Each questions with multiple parts requires a separate answer. Label your steps and show each answer (1, 2, 3, and 4) in a separate Excel tab. For problems that require a written answer, use a text box in Excel to record the text.

  1. Calculate the PV of $5,000 received 10 years from now compounded annually at discount rates of:
    1. 1%
    2. 4%
    3. 12%
  2. Calculate the FV of $5,000 invested for 20 years using annual interest rates of
    1. 3%
    2. 7%
    3. 10%
  3. Prepare a bond amortization table using the following information. Using this information, calculate the duration of this bond.
    1. Principal: $1,000,000
    2. Face rate: 8%
    3. Yield: 7%
    4. Semiannual payments made over 5 years
  4. For the following questions, use information from your company’s financial statements
    1. How much total long-term debt does your company report?
    2. What is the maturity of the longest-term debt your company has?
    3. Is the debt reported at face value on the balance sheet?
    4. Calculate the present value of the longest term debt on your financials considering:
      1. A discount rate of 4%
      2. Annual payments made on the debt
      3. Term debt (rather than serial)
      4. A maturity date equal to the reported maturity date on the financials.

In: Finance

Write the following questions as queries in RELATIONAL ALGEBRA. Use only the operators discussed in class...

Write the following questions as queries in RELATIONAL ALGEBRA. Use only the operators discussed in class (select, project, Cartesian product, join, union, intersection, set difference and renaming).

The following database schema is given:

ATHLETE(name,age,height,weight,country) RACE(id,location,date,time-start,distance) COMPETES(aname,rid,time,position)

where ATHLETE has information about runners (their name, age, height, weight, and nationality); RACE has information about races (id, location, date when it’s held, time it starts, and distance ran); and COMPETES keeps track of which runners run on with race, the time it took them to complete the race, and their position on it (winner = ’1’, second = ’2’, third = ’3’, and so on).

(a) List the names of athletes under 30 years old from Norway that have ran a marathon (distance=26.2).

(b) List the names of athletes who have finished a race in 1st position and another race in second position.

(c) List the names of athletes who have never won a race (win=1st position).

(d) (*) List the races (id) where all the athletes were under 30 years old.

In: Computer Science