Questions
Programming Language: JAVA In this assignment you will be sorting an array of numbers using the...

Programming Language: JAVA

In this assignment you will be sorting an array of numbers using the bubble sort algorithm. You must be able to sort both integers and doubles, and to do this you must overload a method.

Bubble sort work by repeatedly going over the array, and when 2 numbers are found to be out of order, you swap those two numbers.

This can be done by looping until there are no more swaps being made, or using a nested for loop, meaning the array of length n is checked n2 times.

Sample Run #1

Please enter the # of numbers to be sorted: 4

Enter 1 for int's or 2 for doubles: 2

Enter number: 4

Enter number: 3

Enter number: 2

Enter number: 1

3.0, 4.0, 2.0, 1.0

3.0, 2.0, 4.0, 1.0

2.0, 3.0, 4.0, 1.0

2.0, 3.0, 1.0, 4.0

2.0, 1.0, 3.0, 4.0

1.0, 2.0, 3.0, 4.0

In: Computer Science

R.A.T.-Create Your Own Water Park Apply your knowledge of polynomial functions to create a water park,...

R.A.T.-Create Your Own Water Park Apply your knowledge of polynomial functions to create a water park, with 6 waterslides - one for under 6 years old (highest point at least 5m above ground) two for ages 6 to 12 (highest point at least 10m above ground) three for over age 12 (highest point at least 20 m above ground)

A Create a polynomial equation for each waterslide. Show all of your work. The waterslide must begin at the y axis and the x axis must represent the ground. For each function, write the original function in factored form, then explain the transformations that were performed, in order to obtain the model function.

B. Graph (and print) each function using desmos. State the domain and range of each function.

C. Choose one of your waterslides and determine the interval(s) in which the height of the ride was above 3m. Explain your method.

D. Choose one of the waterslides for ages 12 and up and state the interval (from peak to trough) where the waterslide is steepest. Then determine the average rate of change for that interval (by using the equation). Next, determine the instantaneous rate of change at the point in the interval when the person is moving the quickest. Interpret the meaning of these numbers. Note: the maximum steepness of a ride should not exceed 4:1, rise to run. The waterslide should be decelerating as it comes to a stop.

In: Advanced Math

The National Association of Truck Drivers claims that the average truck driver travels 60000 miles per...

  1. The National Association of Truck Drivers claims that the average truck driver travels 60000 miles per year. The population standard deviation of the mileage is 5000 miles. The Connecticut Valley Trucking Corporation surveyed 48 Truck Drivers and found the mean mileage for its Truck Drivers was 59500 miles driven per year. Is Connecticut Valley’s mileage different from that claimed by the National Association of Truck Drivers at the .05 significance level?

In: Statistics and Probability

Question 1: A random sample of   n = 16 mid-sized cars tested for fuel consumption gave...

Question 1:

A random sample of   n = 16 mid-sized cars tested for fuel consumption gave a mean of   x ¯ = 22.81 miles per gallon with a standard deviation of   s = 2.08 miles per gallon.

Assuming that the miles per gallon given by all mid-sized cars have a normal distribution, find a 99 % confidence interval for the population mean,   μ .

Round your answers to two decimal places.

In: Statistics and Probability

Write a program that prompts the user to enter a 3 x 3 matrix of double...

Write a program that prompts the user to enter a 3 x 3 matrix of double values and tests whether it is a positive Markov matrix. There will be two methods which will be called from the main method: public static double [] [] createArray() 1. Creates a 3 by 3 two dimensional array of doubles 2. Prompts the user for values as shown in the sample run 3. Stores the numbers in the array in the order entered 4. Returns the array to the main method public boolean isMarkovMatrix(double [][] matrix) 1. Returns false if any value in the array is negative 2. Prints the sum of each column in the array 3. Returns false if any the sum of any of the columns is not equal to 1.0 4. Otherwise, it returns true. Sample Program running: Enter a 3 x 3 matrix by row 0.15 0.875 0.375 0.55 0.005 0.225 0.30 0.12 0.4 The sum of the columns 1.0 1.0 1.0 It is a Markov matrix Enter a 3 x 3 matrix by row -0.2 0.875 0.375 0.75 0.005 0.225 0.45 0.12 0.4 The sum of the columns 1.0 1.0 1.0 It is not a Markov matrix

In: Computer Science

Concur Technologies, Inc., is a large expense-management company located in Redmond, Washington. The Wall Street Journal...

Concur Technologies, Inc., is a large expense-management company located in Redmond, Washington. The Wall Street Journal asked Concur to examine the data from 8.3 million expense reports to provide insights regarding business travel expenses. Their analysis of the data showed that New York was the most expensive city, with an average daily hotel room rate of $198 and an average amount spent on entertainment, including group meals and tickets for shows, sports, and other events, of $172. In comparison, the U.S. averages for these two categories were $89 for the room rate and $99 for entertainment. The table in the Excel Online file below shows the average daily hotel room rate and the amount spent on entertainment for a random sample of 9 of the 25 most visited U.S. cities (The Wall Street Journal, August 18, 2011). Construct a spreadsheet to answer the following questions.

City Hotel Room Rate ($) Entertainment ($)
Boston 152 159
Denver 99 107
Nashville 88 101
New Orleans 106 142
Phoenix 90 98
San Diego 103 121
San Francisco 138 166
San Jose 88 139
Tampa 81 99
  1. What does the scatter diagram developed in part (a) indicate about the relationship between the two variables?

    The scatter diagram indicates a _________ linear relationship between the hotel room rate and the amount spent on entertainment.

  2. Develop the least squares estimated regression equation.

    Entertainment=______+_________ room rate (to 4 decimals)

  3. Provide an interpretation for the slope of the estimated regression equation (to 3 decimals).

    The slope of the estimated regression line is approximately . So, for every dollar _________ in the hotel room rate the amount spent on entertainment increases by $.

  4. The average room rate in Chicago is $128, considerably higher than the U.S. average. Predict the entertainment expense per day for Chicago (to whole number).

    $

In: Statistics and Probability

Concur Technologies, Inc., is a large expense-management company located in Redmond, Washington.  The Wall Street Journal asked...

Concur Technologies, Inc., is a large expense-management company located in Redmond, Washington.  The Wall Street Journal asked Concur to examine the data from 8.3 million expense reports to provide insights regarding business travel expenses. Their analysis of the data showed that New York was the most expensive city, with an average daily hotel room rate of $198 and an average amount spent on entertainment, including group meals and tickets for shows, sports, and other events, of $172. In comparison, the U.S. averages for these two categories were $89 for the room rate and $99 for entertainment. The table in the Excel Online file below shows the average daily hotel room rate and the amount spent on entertainment for a random sample of 9 of the 25 most visited U.S. cities (The Wall Street Journal, August 18, 2011). Construct a spreadsheet to answer the following questions.

 
City Hotel Room Rate ($) Entertainment ($)
Boston 144 163
Denver 100 104
Nashville 93 102
New Orleans 111 140
Phoenix 89 100
San Diego 105 121
San Francisco 134 165
San Jose 87 140
Tampa 82 97
  1. What does the scatter diagram developed in part (a) indicate about the relationship between the two variables?

    The scatter diagram indicates a  _________negativepositive linear relationship between the hotel room rate and the amount spent on entertainment.

  2. Develop the least squares estimated regression equation.

         (to 4 decimals)

  3. Provide an interpretation for the slope of the estimated regression equation (to 3 decimals).

    The slope of the estimated regression line is approximately  . So, for every dollar _________increasedecrease in the hotel room rate the amount spent on entertainment increases by $.

  4. The average room rate in Chicago is $128, considerably higher than the U.S. average. Predict the entertainment expense per day for Chicago (to whole number).


In: Economics

Case Study Terror at the Taj Bombay: Customer-Centric Leadership The night of November 26, 2008, 10...

Case Study

Terror at the Taj Bombay: Customer-Centric Leadership

The night of November 26, 2008, 10 armed individuals from the terrorist group Lashkar-e-Taiba (Army of the Righteous) entered the western-Indian city of Mumbai (formerly Bombay) to attack pre-determined locations, including the Taj MahalPalace and Tower (Taj Bombay). Over three nights and two days, terrorists killed 159 people and wounded 211 across the city. Of these, 34 people died and 28 were injured during the three-day siege of the Taj Bombay. The attacks, which became known in India as “26/11”, had a dramatic and lasting impact on the Indian national psyche.

However, the Taj Bombay received praise in the aftermath of the attach- specifically from hotel guests-for the quick-thinking actions of hotel staff to ensure the safety of hotel guests at the expense of their own personal safety. In addition to managing the emotional and psychological challenges of moving forward after the loss of employees and extensive physical da1nage to the hotel, senior executives wondered if the Taj brand would survive. Images of the Taj Bombay under attack were reprinted in newspapers and shown on television news stations worldwide. Executives had to decide when -and if -to re-open the hotel, whether to continue to use the Taj brand name, and what message to send out to consumers. The risk was to be viewed as insensitive by either avoiding the tragedy completely in their messages to the public or being seen as taking advantage of public sympathy in talking about the tragedy, and in deciding the right time to return to "business as usual" at the Taj Bombay.

  1. What specific actions do you take in both the short-term and long-term in rebuilding the Taj brand name?
  2. What would you do to recover from "being the living image of the terrorist attack" as Ratan Tata describes it? Is this even possible?

In: Operations Management

Ivanka Trump after moving to Pakisatan and has purchase PC hotel Karachi in November 2020 and...

Ivanka Trump after moving to Pakisatan and has purchase PC hotel Karachi in November 2020 and renamed it Ivayana. The hotel is a 5 star luxury hotel consisting of 100 single rooms 70 double rooms and 40 Suites. The average night stay in a single room costs Rs 8000. Double bed cost Rs 19000 and suite costs Rs 35000. On average 70 single rooms, 60 double rooms and 35 suites are occupied. Besides, there are 4 ball rooms. The ball rooms are always available for booking but they only get booked on Saturdays and Sundays. Each ball room has capacity of 300 people and rental charged for each booking is RS 130,000. 10 Rooms in each category are paid by credit card. The payment is received a week later. 50% amount related to ball room are received in same month and 50% in next month. The rental charge for ball rooms was Rs 100,000 in 2020. The charge for rooms has not changes since last year and have remained same. The hotel is charged local tax of Rs 5000 each week which is paid in the same month. The hotel has a staff of 150 people. 30 kitchen staff which receive 18% of the amount received againts the bill charged for the meals. On average the kitchen staff receive 90 orders for meal with the average billing of Rs 8000 per meal. the amount of meals billed is immediately collected and the kitchen staff is paid in the 1st week of next month. The room service and the janitorial satff are 40 which are paid Rs 18000/month at last day of same month. 10 is the num of other lower staff for misc services and they are paid 15000/month at last day of same month. The remainig 20 are the senior executive staff, their remuniration details are not shared. The hotel is powered by solar panels and the, its maintenance is outsourced to a company solarex, they charge Rs 200,000 quarterly, which is paid in 2 installments. 50% is paid in the 1st month of quarter and the rest is paid in the last month of quarter. The opening cash in hand was Rs 100,000.

Prepare Cash budget for the 1st quarter of 2021.                (PLO 2.1, CLO 1)                                13 marks

Hint: Consider reviewing the actual calendar for 2021.

In: Finance

Ivanka Trump after moving to Pakisatan and has purchase PC hotel Karachi in November 2020 and...

Ivanka Trump after moving to Pakisatan and has purchase PC hotel Karachi in November 2020 and renamed it Ivayana. The hotel is a 5 star luxury hotel consisting of 100 single rooms 70 double rooms and 40 Suites. The average night stay in a single room costs Rs 8000. Double bed cost Rs 19000 and suite costs Rs 35000. On average 70 single rooms, 60 double rooms and 35 suites are occupied. Besides, there are 4 ball rooms. The ball rooms are always available for booking but they only get booked on Saturdays and Sundays. Each ball room has capacity of 300 people and rental charged for each booking is RS 130,000. 10 Rooms in each category are paid by credit card. The payment is received a week later. 50% amount related to ball room are received in same month and 50% in next month. The rental charge for ball rooms was Rs 100,000 in 2020. The charge for rooms has not changes since last year and have remained same. The hotel is charged local tax of Rs 5000 each week which is paid in the same month. The hotel has a staff of 150 people. 30 kitchen staff which receive 18% of the amount received againts the bill charged for the meals. On average the kitchen staff receive 90 orders for meal with the average billing of Rs 8000 per meal. the amount of meals billed is immediately collected and the kitchen staff is paid in the 1st week of next month. The room service and the janitorial staff are 40 which are paid Rs 18000/month at last day of same month. 10 is the number of other lower staff for misc services and they are paid 15000/month at last day of same month. The remainig 20 are the senior executive staff, their remuniration details are not shared. The hotel is powered by solar panels and the, its maintenance is outsourced to a company solarex, they charge Rs 200,000 quarterly, which is paid in 2 installments. 50% is paid in the 1st month of quarter and the rest is paid in the last month of quarter. The opening cash in hand was Rs 100,000.

Prepare Cash budget for the 1st quarter of 2021.   

Hint: Consider reviewing the actual calendar for 2021.

In: Accounting