Questions
C Write a function int sort(int** arr, int n) that takes as input an array of...

C

Write a function int sort(int** arr, int n) that takes as input an array of int pointers, multiplies the ints the pointers point to by -1, and then sorts the array such that the values pointed to by the pointers are in decreasing order. For example, if the array is size 10 the pointer at index 0 will point to the largest value after multiplying by -1 and the pointer at index 9 will point to the smallest value after multiplying by -1. If the input is invalid the function should return 1. Otherwise, the function should return 0. Note- a pointer to the array size is passed to the function, NOT the actual size.

int sort(int** arr, int n)

(input is a double pointer)

In: Computer Science

Consider a project to supply Detroit with 40,000 tons of machine screws annually for automobile production....

Consider a project to supply Detroit with 40,000 tons of machine screws annually for automobile production. You will need an initial $5,600,000 investment in threading equipment to get the project started; the project will last for 6 years. The accounting department estimates that annual fixed costs will be $600,000 and that variable costs should be $250 per ton. Further, the accounting department will depreciate the initial fixed asset investment straight-line to zero over the 6-year project life and estimate a salvage value of $450,000 after dismantling costs. The marketing department estimates that the automakers will let the contract at a selling price of $340 per ton. The engineering department estimates you will need an initial net working capital investment of $560,000. You require a return of 13 percent and face a marginal tax rate of 24 percent on this project. Suppose you’re confident about your own projections, but you’re a little unsure about Detroit’s actual machine screw requirements. a. What is the sensitivity of the project OCF to changes in the quantity supplied? What about the sensitivity of NPV to changes in quantity supplied? c. Given the sensitivity number you calculated, is there some minimum level of output below which you wouldn’t want to operate? Show step by step

In: Finance

It is required to develop an application in Java to perform some operations of a bank....

It is required to develop an application in Java to perform some operations of a bank. The application will have the following classes:

  1. Class called Person having following data fields (private):

firstName (String), lastName(String), gender(char), cpr(long), mobile(String) and following methods:

  1. Constructor having 5 parameters to initialize all data fields,
  2. Set and get methods for all data fields,
  3. toString method to return String equivalent of all data fields,

  1. Abstract class called Account having following data fields(protected):

accountHolder(Person), ccountNum(long), balance(double)and following methods:

  1. Constructor having 3 parameters for all 3 data fields including an object of type Person.
  2. Get methods for all three data fields.
  3. Abstract method updateBalance to update balance according to parameter.
  4. Abstract method withdraw to withdraw money from the account and update balance.
  5. Abstract method deposit to deposit money in the account and update balance.
  6. method to return String equivalent of all data fields by calling toString method of class Person.

  1. Class called Savingsccount that inherit the properties of abstract class Account having following additional data field:

interestRate(double) and following methods:

  1. Constructor having 4 parameters for all data fields including that of class Account.
  2. Set and get methods for interestRate.
  3. Implementation of method updateBalance.
  4. Implementation of method withdraw.
  5. Implementation of method deposit.
  6. Overloaded toString method to return String equivalent of all data fields.
  1. Write a class called Bank having only main method to test all functionalities of the application.

In: Computer Science

You have been asked by your boss to determine whether it is necessary to show earnings...

You have been asked by your boss to determine whether it is necessary to show earnings per share (EPS) on the financial statements when the company is not public and not governed by the Securities & Exchange Commission (SEC). What will you tell your boss? (US GAAP ISSUE) AN ASC NUMBER MUST BE USED AS A CITATION REFERENCE EACH GAAP ASSIGNMENT WILL HAVE THE FOLLOWING FORMAT: PROBLEM TO BE RESEARCHED: What is the question being asked? SOURCES FOR RESEARCH: (EX. FASB TEXT PAGE, GAAP GUIDE, ETC.) A CITATION MUST BE IDENTIFIED (i.e. U.S. GAAP (ASC) ACCOUNTING STANDARDS CODIFICATION TOPIC 111-11 FOR EXAMPLE) Where did you get you answer? III. CONCLUSION – What is your answer?

In: Accounting

For this assignment, you will need any computer running PowerShell v5 or later. Your answer should...

For this assignment, you will need any computer running PowerShell v5 or later. Your answer should only include the function or the script files that generate the results.

  1. The Get-ChildItem cmdlet is very useful in obtaining files and directory information. Your challenge is to create a PowerShell function that displays all ‘.exe’ and ‘.dll’ files stored under C:\Windows\System32, whose size is more than 5 MB. Group the files based on their extension and store the list into a text file.

In: Computer Science

10. How appropriate is it to share personal information with the world? 11. What are the...

10. How appropriate is it to share personal information with the world?

11. What are the possible barriers for you to share confidential details online personally?

In: Operations Management

What are some ways that Donald Trump can improve his leadership skills using the three out...

What are some ways that Donald Trump can improve his leadership skills using the three out of 5 following leadership concepts?

-Charismatic Leadership

- Servant Leadership

- The strategic management process

- Transformational leadership

- The five conflict management styles

In total I need to write 2 double spaced pages, so any amount of ideas or thoughts will be appreciated!!

In: Operations Management

Python DESCRIPTION Write a program that will read an array of integers from a file and...

Python

DESCRIPTION

Write a program that will read an array of integers from a file and do the following:

Task 1: Revert the array in N/2 complexity time

(i.e., number of steps)

.

Task 2: Find the maximum and minimum element of the array.

INPUT OUTPUT

Read the array of integers from a file named “

inputHW1.txt

”. To do this, you can use code snippet

from the “

file.py

” file. This file is provided in

Canvas. Copy the “

read

” function from this file and

paste it to your program file. Then, if you call the read function like the following:

numbers = read()

# The following "read" function reads values from a file named "inputHW1.txt" and

returns the values in an array.

def read():

file = open("inputHW1.txt", "r")

line = file.readline()

values = []

for value in line.split(' '):

values.append(int(value))

return values

the integers will be read from file and loaded in the numbers array.

Now, print the reverted arra

y, minimum element and maximum element of the array.

For example, if the input array is: 1 4 9 11 8 3 2 5 10

the following will be printed on the screen:

Reverted array: 10 5 2 3 8 11 9 4 1

Maximum element: 11

Minimum element: 1

In: Computer Science

Case Study Examples About Business Analysis And Human Resources Planning reference

Case Study Examples About Business Analysis And Human Resources Planning reference

In: Operations Management

You are holding a shopping basket at the grocery store with two 0.72-kg cartons of cereal...

You are holding a shopping basket at the grocery store with two 0.72-kg cartons of cereal at the left end of the basket. The basket is 0.81 m long.

Where should you place a 1.9-kg half gallon of milk, relative to the left end of the basket, so that the center of mass of your groceries is at the center of the basket?

In: Physics

9.15 Bad News to Customers: Selecting Sturdy Stepper for Snap Fitness Gym (L.O. 1–4) You are...

9.15 Bad News to Customers: Selecting Sturdy Stepper for Snap Fitness Gym

(L.O. 1–4)

You are delighted to receive a large order from Lawrence Holder at Snap Fitness Gym. This order includes two Lifecycle Trainers (at $1,295 each), four Pro Abdominal Boards (at $295 each), three Tunturi Muscle Trainers (at $749 each), and three Dual-Action StairClimbers (at $1,545 each).

You could ship immediately except for one problem. The Dual-Action StairClimber is intended for home use, not for gym or club use. Customers like it because they say it is more like scaling a mountain than climbing a flight of stairs. With each step, users exercise their arms to pull or push themselves up. Its special cylinders absorb shock so that no harmful running impact results. However, this model is not what you would recommend for gym use. You feel Mr. Holder should order your premier stair climber, the LifeStep (at $2,395 each). This unit has sturdier construction and is meant for heavy use. Its sophisticated electronics provide a selection of customer-pleasing programs that challenge muscles progressively with a choice of workouts. It also quickly multiplies workout gains with computer-controlled interval training. Electronic monitors inform users of step height, calories burned, elapsed time, upcoming levels, and adherence to fitness goals. For gym use the LifeStep is clearly better than the Dual-Action StairClimber. The bad news is that the LifeStep is considerably more expensive.

You get no response when you try to call Mr. Holder to discuss the problem. Should you ship what you can, or hold the entire order until you learn whether he wants the Dual-Action StairClimber or the LifeStep? Or perhaps you should substitute the LifeStep and send only two of them.

Your Task Decide what to do and write a letter to be faxed to Lawrence Holder, Snap Fitness Gym, 1212 Bahama Drive, Richmond, KY 40475, using either negative or positive news response

In: Operations Management

Sharp Company manufactures a product for which the following standards have been set: Standard Quantity or...

Sharp Company manufactures a product for which the following standards have been set: Standard Quantity or Hours Standard Price or Rate Standard Cost Direct materials 3 feet $ 5 per foot $ 15 Direct labor ? hours ? per hour ? During March, the company purchased direct materials at a cost of $52,740, all of which were used in the production of 2,750 units of product. In addition, 4,500 hours of direct labor time were worked on the product during the month. The cost of this labor time was $40,500. The following variances have been computed for the month: Materials quantity variance $ 2,700 U Labor spending variance $ 3,100 U Labor efficiency variance $ 850 U

b.

Compute the price variance and the spending variance. (Do not round intermediate calculations. Indicate the effect of each variance by selecting "F" for favorable, "U" for unfavorable, and "None" for no effect (i.e., zero variance))

          

For direct labor: (Do not round intermediate calculations.)

a.

Compute the standard direct labor rate per hour. (Round your final answer to 2 decimal places.)

            

Compute the standard hours allowed for the month’s production.

            

In: Accounting

Explain what is blacklisting and whitelisting? iptables: Compare -j DROP vs -j REJECT. Which option would...

  1. Explain what is blacklisting and whitelisting?

  1. iptables:

Compare -j DROP vs -j REJECT. Which option would you use to create a firewall rule that blocks incoming packets and why?

  1. State the iptables command you would use to add a firewall rule where outgoing packets(connections) to ports 20, 21 (ftp) were blocked.

  1. ICMP is a protocol for sending various messages to report network conditions. Ping is the sends ICMP Echo request packets to the target host and waits for ICMP echo reply from the host.
  2. State a firewall rule that will block other systems from pinging your system.

In: Computer Science

This lab problem demonstrates the use of import module. The Python programming language has many strengths,...

This lab problem demonstrates the use of import module. The Python programming language has many strengths, but one of its best is the availability to use many existing modules for various tasks, and you do not need to be an experienced computer programmer to start using these modules.

We have given you some incomplete code; note that the very first line of that code contains an import statement as follows:

import math

This statement enables your program to use a math module. A module is a collection of instructions saved together as a whole. So, in this lab you are using the math module. Any time we choose to use a module, we must use an import statement to bring this module into the program. When we import the math module, all the computer instructions contained in the math module are made available to our program, including any functions that have been defined.

If you are interested in finding out what is in the math module you can always go to the Python docs and take a look: Python Docs

Example of using the math module: print(math.floor(5.4)) will use the floor() function as defined in the math module, and in this case with the argument 5.4, will result in printing the value 5.

Below is the definition of your problem that we are asking you to solve using the math module.

Prompt the user for floating point numbers x, y and z. For the x value your you will the use the following prompt Enter x value:inside of your input statement. Using the same approach you will prompt the user for y and z.

- Given three floating-point numbers x, y, and z, your job is to output - the **square root** of x, - the **absolute value** of (y minus z) , and - the **factorial** of (the **ceiling** of z). 

Example of a sample run:

Enter x value:5 Enter y value:6.5 Enter z value:3.2

Then the expected output from these entries is:

2.23606797749979 3.3 24

Hint: For finding out the square root you will need to use math.sqrt(), you need to use the website recommended above to find out which functions to use in order to solve the rest of the lab problem.

In: Computer Science

A database schema consisting of three relations STUDENT, COURSE, and STAFF is created as follows: CREATE...

A database schema consisting of three relations STUDENT, COURSE, and STAFF is created as follows:

CREATE TABLE STUDENT (STU_ID CHAR(4),

STUDENT_NAME CHAR(20),

ADDRESS CHAR(20),

BIRTHDATE DATE,

GENDER CHAR(6));

CREATE TABLE COURSE (COURSE_ID CHAR(6),

COURSE_TITLE CHAR(20),

STAFF_ID CHAR(3),

SECTION NUMBER(2));

CREATE TABLE STAFF (STAFF_ID CHAR(3),

STAFF_NAME CHAR(20),

GENDER CHAR(6),

DEPARTMENT CHAR(20),

BOSS_ID CHAR(3)

SALARY NUMBER(8,2));

Write down SQL statement for each query below:

1) Find out the information of staff members who are female and earn either below $5,000 or above $30,000. [5 marks] 2) List all staff members who are not in the Accounting nor the History department. [5 marks] 3) List all students whose name contains the substring "JONES". List the females before the males in chronological order (by birthdate). [6 marks] 4) List all the courses taught by Raymond J. JOHNSON. [6 marks] 5) Find the names of all staff members who earn more than their bosses. [8 marks] 6) List all staff members who are either in the same department as Amy Dancer or Jack Nelson. [8 marks] 7) Find the names of the staff members who make more money than every member of the Accounting department. [7 marks] 8) Find the average salary for each department with more than one staff member. [5 marks]

In: Computer Science