Questions
Make a 20 by 20 matrix in which diagonal elements are 2, 5, 8, 11 ......

Make a 20 by 20 matrix in which diagonal elements are 2, 5, 8, 11 ... 59 and the first column is 21,22,23,24 ... 40 whereas the rest of the elements of the matrix are 9.

Note: you must if, elseif, else, end or/and if, end or/and if, else, end commands in MATLAB.

In: Computer Science

This lab will focus on creating a better understanding of Selection Sort and Insertion Sort algorithms....

This lab will focus on creating a better understanding of Selection Sort and Insertion Sort algorithms.

What you need to do

I have provided a driver and a Utility class with three methods. You must finish writing Selection Sort and Insertion Sort in the Utility class. Below is pseudocode for Selection and Insertion Sort, which you may use as a guide. Your selection sort will sort an array of Strings lexicographically, meaning A-Z. Your insertion sort will sort an array of Strings in reverse, meaning Z-A.

                      Selection Sort Pseudo Code

for i = 0 to length(A) min = i

for j = i to length(A) if A[j] < A[min]

min = j end for

                           swap A[i] and A[min]
                      end for
                      Insertion Sort Pseudo Code

for i = 1 to length(A) j=i

while j > 0 and A[j-1] < A[j] swap A[j] and A[j-1]

j=j-1 end while

end for

How do we compare strings to sort them correctly? Use the method compareTo provided in the string class. This method returns a int value and is used as follows:

<str1>.compareTo(<str2>)

If str1 comes before str2, compareTo will return a negative number. If str1 comes after str2, compareTo will return a positive number.
If str1 and str2 are the same, compareTo will return 0.

Driver Output

Unsorted array:
Tom, Steve, Ann, Zoe, Bob, Moana, Naomi, Kevin, Ryan, Nina, Dora, Wanda, Eric

Selection Sorted array from A-Z:
Ann, Bob, Dora, Eric, Kevin, Moana, Naomi, Nina, Ryan, Steve, Tom, Wanda, Zoe

Insertion Sorted array from Z-A:
Zoe, Wanda, Tom, Steve, Ryan, Nina, Naomi, Moana, Kevin, Eric, Dora, Bob, Ann

Driver.java///////

public class Driver {

   public static void main(String[] args) {
       // TODO Auto-generated method stub

       String[] names = {"Tom", "Steve","Ann","Zoe","Bob","Moana","Naomi","Kevin","Ryan","Nina","Dora","Wanda","Eric"};
      
       System.out.println("Unsorted array:");
       Utility.printArray(names);
       System.out.println();
      
       Utility.selectionSort(names);
       System.out.println("Selection Sorted array from A-Z:");
       Utility.printArray(names);
       System.out.println();

       Utility.insertionSort(names);
       System.out.println("Insertion Sorted array from Z-A:");
       Utility.printArray(names);
      
   }

}


Utility.java///////

public class Utility {

   public static void selectionSort(String[] array) {
       //TODO - Sort array from A-Z
   }
  
   public static void insertionSort(String[] array) {
       //TODO - Sort array from Z-A
   }
  
   public static void printArray(String[] array) {
      
       for(int i = 0; i < array.length; i++) {
           System.out.print(array[i]);
           if(i != array.length -1) {
               System.out.print(", ");
           }
       }
       System.out.println();
   }
  
}

In: Computer Science

What method does NOT cause the program to wait until a stream's buffer is empty? (a)...

What method does NOT cause the program to wait until a stream's buffer is empty? (a) flush (b) endl (c) clear (d) close (e) Multiple answers don't pause the program. (f) None of the above cause the program to pause.

I believe that clear is the answer.

flush pauses the program, endl (indirectly calls flush), close (calls flush).

In: Computer Science

If Netflix were to diversify into the telecommunications industry, would it create value for its shareholders?...

  1. If Netflix were to diversify into the telecommunications industry, would it create value for its shareholders? Utilize the appropriate measures found in Chapter 7 that can be applied for Netflix to make up its mind and to justify your answer.

Appropriate measures: economies of scope, transaction costs, costs of corporate complexity, diversification, vertical integration and strategic manoeuvring

In: Operations Management

General Questions about Network Footprinting Guidelines Answer each of the following questions using knowledge gained from...

General Questions about Network Footprinting

Guidelines

  • Answer each of the following questions using knowledge gained from the iLab, readings from the textbook, and individual research on the Web. Answer all questions in full graduate-level sentences and paragraphs.

1. What is accomplished by network footprinting?

2. What are the countermeasures a network security architect can set in motion to diminish the threat from network footprinting?

3. What is the difference between network footprinting and network reconnaissance?

4. In the context of network security, explain what is meant by after reconnaissance comes penetration.
5.  What is a denial of service (DOS) attack?

In: Computer Science

Write a function that will take a string containing only alphanumeric characters that are in lowercase...

  1. Write a function that will take a string containing only alphanumeric characters that are in lowercase (if you think your logic requires you to use more than one argument, please go ahead). Your task is to see if the string becomes a palindrome if only one character is removed from anywhere in the string.

In: Computer Science

What are some arguments supporting or critiquing the logic of divine command?

What are some arguments supporting or critiquing the logic of divine command?

In: Psychology

Explain the blue ocean strategy. pick a firm that has utilized this strategy and explain why...

Explain the blue ocean strategy. pick a firm that has utilized this strategy and explain why their action is a Blue Ocean Strategy. Would you rather be the only competitor in a blue ocean where the competition just has not found it yet, or the best competitor in a red ocean?


In: Economics

Chapter 4 addresses the nature and sources of competitive advantage. Why could other streaming companies have...

  1. Chapter 4 addresses the nature and sources of competitive advantage. Why could other streaming companies have difficulty in copying what Netflix has done to create a competitive advantage?

In: Operations Management

Porter’s 5 Forces is addressed in detail in Chapter 2. Discuss why it may be limited...

  1. Porter’s 5 Forces is addressed in detail in Chapter 2. Discuss why it may be limited in analyzing the industry that Netflix currently competes in and what needs to be done using observations from that industry?

In: Operations Management

Although we live in enlightened times, a recent Gallup Poll found that 15 percent of American...

Although we live in enlightened times, a recent Gallup Poll found that 15 percent of American workers still experienced some form of workplace discrimination. The study was conducted to mark the anniversary of the Civil Rights Act of 1964 and the creation of the EEOC.

The poll found that the two most frequently cited types of discrimination are sexual discrimination (31 percent) and discrimination based on race or ethnicity (36 percent). Also mentioned were age, disability, sexual orientation, and religion. The work areas found to be most susceptible to discrimination are promotion and pay. Being selected for a job and treatment in the workplace were also cited. Wage discrimination and sexual harassment are two big battles women continue to fight. Both topics were in the headlines in 2017; one took center stage and the other was brushed under the covers (at least for now).

Thanks to Harvey Weinstein, the topic of sexual harassment was in the spotlight, setting off a tsunami as women around the world reacted with their #MeToo stories. As the movement progressed from Hollywood, to media companies, to Capitol Hill, and finally into corporate America, the topic had a platform. From the boardroom to the factory floor, women who had been sexually harassed shared their stories.

As companies rushed to put zero-tolerance policies into place and issue new training requirements, lawsuits and class-action cases were settled more quickly, some very publicly. In August 2017, the EEOC reached a $10 million settlement with Ford motor company for sexual and racial harassment at two Chicago plants.

In contrast, little was reported on the reversal of the new regulation designed to combat the wage gap between men and women. The revised EEO-1 would have gone into effect March 31, 2018, and required companies with 100 or more employees and federal contractors with 50 or more employees to report W-2 wage information and total hours worked for all employees. The EEO-1 form already requires employers to report data on race/ethnicity and gender.

The Office of Management and Budget (OMB) initiated a review and immediate stay to the U.S. EEOC “in accordance with its authority under the Paperwork Reduction Act (PRA),” reversing the regulation that had been revised on September 29, 2016.

Pay equity advocates who had supported expanded pay-data reporting were critical of the suspension. “We see through the Trump administration’s call to halt the equal pay rule that requires employers to collect and submit pay data by gender, race, and ethnicity to the government,” said Fatima Goss Graves, president and CEO of the National Women’s Law Center in Washington, D.C. “Make no mistake—it’s an all-out attack on equal pay. [It] sends a clear message to employers: if you want to ignore pay inequities and sweep them under the rug, this administration has your back.”

How important is equal pay? According to the analyses of the 2014–2016 Annual Social and Economic supplement published by the Institute for Women’s Policy Research, the United States economy would have produced additional income of $512.6 billion if women received equal pay; this represents 2.8 percent of 2016 gross domestic product (GDP).

In addition, poverty rates would drop from 10.8 percent to 4.4 percent, and the number of children with working mothers living in poverty would be nearly cut in half, dropping from 5.6 million to 3.1 million.

Critical Thinking Questions

  1. Why is workplace diversity so important in today’s business environment?
  2. What are the major sources of workplace discrimination? Cite specific examples from the case.
  3. What steps are companies taking to ensure that employees are not discriminated against?

In: Operations Management

The dialogue ends inconclusively: Euthyphro has not been able to arrive at a satisfactory definition of...

The dialogue ends inconclusively: Euthyphro has not been able to arrive at a satisfactory definition of the pious. Does this mean the whole discussion between Socrates and Euthyphro was a complete waste of time? Why or why not?

In: Psychology

As mentioned in earlier, U.S. businesses will face a decrease in the available workforce due in...

As mentioned in earlier, U.S. businesses will face a decrease in the available workforce due in part to a smaller generation of talented workers replacing retiring baby boomers. “Our study reveals that recruiters and hiring managers are not only cognizant of the issue but are concerned about its current and future impact on organizational growth,” said Dr. Jesse Harriott, former vice president of research at monster.com (http://www.monster.com), one of the leading global online career and recruitment resources. “Businesses of all sizes and across all industries must develop and implement creative programs and strategies to attract and hire top candidates while retaining and motivating current employees. As the talent pool shrinks, it is imperative that immediate action is taken to ensure businesses are properly prepared and staffed for the future.”

In a sampling of over 600 human resource managers, Monster’s survey showed that over 75 percent believe compensation is one of the top three motivators that prevent employees from leaving their job. The fact that money motivates top-performing employees is supported by almost half the human resources professionals surveyed for a Rewards Program and Incentive Compensation Survey released by the Society of Human Resource Management. The survey also found that neither monetary nor nonmonetary rewards were effective motivators for underperformers.

While compensation is clearly a significant issue, not all companies can offer this advantage. Other strategies that motivate employee loyalty and commitment are necessary. Some of these include making supervisors more accountable for worker retention, promoting work-life balance for employees, fostering a workplace where employee expectations are clearly articulated, creating learning and development programs that groom employees for future management roles, implementing performance-based systems that identify and proactively manage top employees and when possible promote from within, creating mentoring programs that match new employees with seasoned veterans, monitoring sentiment throughout the employee life cycle, and creating an employment brand “experience” that not only motivates and energizes employees but can also be used to attract new talent.

Diana Pohly, president, CEO, and owner of The Pohly Company, keeps vigilant watch over the morale of the office, ensuring that employees are satisfied. “Business owners of growing companies must possess strong leadership and management skills in order to solidify the foundation of their business,” said Pohly. “Effective team leadership is imperative to sustain efficient team workflows and contribute to employee morale.”

“Employees are the lifeblood of any organization. Building a positive work environment is an important strategy in attracting, retaining and motivating a team,” says Michelle Swanda, corporate marketing manager of The Principal. Improving employee morale with creative and effective management tactics ultimately boosts employee productivity, and that goes straight to the bottom line.

Critical Thinking Questions

  1. How are social and economic factors influencing companies’ approach to hiring, motivating, and retaining employees?
  2. What are some of the nonmonetary strategies companies must develop to attract and reward employees and keep them motivated?
  3. What “reward factors” would be important to you when working for a company? List at least five in order of importance, and list your reasons for each.

In: Operations Management

What information is provided by the numerical value of the Pearson correlation? Also in your own...

What information is provided by the numerical value of the Pearson correlation? Also in your own words, explain in detail and include a discussion of X, Y, co-variability and separate variability in your answer.

In: Math

Describe and discuss the role of consolidation.  Identify how psychologists study this process and why. Provide examples...

Describe and discuss the role of consolidation.  Identify how psychologists study this process and why. Provide examples from your life that demonstrate the process of consolidation in action​

In: Psychology