Questions
1) Why should virtualization sprawl be restrained and what would you do to achieve that goal?...

1) Why should virtualization sprawl be restrained and what would you do to achieve that goal?

2) If virtualization sprawl is already an issue, what should an administrator do before it becomes even worse?

In: Computer Science

Question : What are the benefits of searching for reviews or guides online before purchasing a...

Question : What are the benefits of searching for reviews or guides online before purchasing a product or buying services, and what are the pros and cons of using it.

In: Operations Management

The proposed costs to operate this new facility are as follows: Expected Monthly Revenue (Membership Fee):...

The proposed costs to operate this new facility are as follows:

Expected Monthly Revenue (Membership Fee): $125 per person

Monthly Fixed Costs

• Utilities: $590

• Health/Wellness Staff: $2,500

• Arts/Crafts Staff: $2,000

• Supplies: $800

• Fitness Equipment Maintenance Contract: $200

Variable Costs

• Monthly Lunch Cost: $25

• Monthly Breakfast Cost: $15

Based on the information above, once the minimum threshold of participants is reached, the initial investment to establish the center is $317,880. The organization anticipates that it will generate $46,920 of net revenues in the first year, $68,166 in the second year, $93,404 in the third year, $123,287 in the fourth year, and $158,573 in the fifth year.

1. Calculate the payback period to determine how long it will take for the organization to recover its initial investment of establishing the senior multipurpose center.

In: Finance

Discuss the historical view of religion from a sociological perspective. What is the ultimate goal of...

Discuss the historical view of religion from a sociological perspective. What is the ultimate goal of all religions? Is there really a separation between state and religion? How would life be without religion? Thomas Paine, a political activist, stated that "All national institutions of churches, whether Jewish, Christian or Turkish appear to me no other than human inventions set up to terrify and enslave mankind, and monopolize power and profit". Do you agree or disagree with his statement? Explain. Is religion beneficial or a hindrance to our society? Modern-day sociologists often apply one of three major theoretical perspectives to understand religion. Which of the three theories do you feel better explains the concept of religion in our society and why?

In: Psychology

for C++ pointers: a. Given int arr [10], *ap = &arr[2]; what is the result of...

for C++ pointers:

a. Given int arr [10], *ap = &arr[2]; what is the result of (ap - arr)?

b. Given int val = 10, *x = &val, *y; y = x; *y=100; what is the output of cout << *x << *y;?

c. Given int arr [10], *ap = arr; what element does ap point to after ap +=2; ?

In: Computer Science

Explain the role and reasons for both quantitative and qualitative methods in describing a population's health.

Explain the role and reasons for both quantitative and qualitative methods in describing a population's health.

In: Psychology

Please implement a HashSet using Separate Chaining to deal with collisions. public interface SetInterface<T> {   ...

Please implement a HashSet using Separate Chaining to deal with collisions.

public interface SetInterface<T> {

   public boolean add(T item);
   public boolean remove(T item);
   public boolean contains(T item);
   public int size();
   public boolean isEmpty();
   public void clear();
   public Object[] toArray();
  
}

public class HashSet<T> implements SetInterface<T> {
   //============================================================================= Inner node class
   private class Node<E> {
       private E data;
       private Node<E> next;

       public Node(E data) {
           this.data = data;
           this.next = null;
       }
   }

   //============================================================================= Properties
   private Node<T>[] buckets;   // An array of nodes
   private int size;
   private static final double LOAD_FACTOR = .6;
   private static final int DEFAULT_SIZE = 11; // should be prime

   //============================================================================= Constructors
   public HashSet() {
       buckets = (Node<T>[]) new Node[DEFAULT_SIZE];
       size = 0;
   }

   public HashSet(T[] items) {
       //************************************************************* TO-DO
       // Make a call to your empty constructor and then somehow fill
       // this set with the items sent in

   }
  
   //============================================================================= Methods
   @Override
   public boolean add(T item) {
       //************************************************************* TO-DO
       // Check to see if item is in the set. If so return false. If not,
       // check if the LOAD_FACTOR has already been exceeded by the previous
       // add and if so, call the resize() before adding.
      

       return true; // returns true because we know it's been added
   }

   @Override
   public boolean remove(T item) {
       //************************************************************* TO-DO
       // To remove an item, you are removing from a linked chain of nodes.
       // Our algorithm is to copy the data from that head node to the node to be
       // removed, and then remove the head node.
       boolean success = false;

       return success;
   }

   @Override
   public boolean contains(T item) {
       //************************************************************* TO-DO
       // A one-line method that calls
       // the find() method
       return false;
   }

   @Override
   public void clear() {
       //************************************************************* TO-DO
       // sets all items in the array to null
   }

   @Override
   public int size() {
       return size;
   }

   @Override
   public boolean isEmpty() {
       return size == 0;
   }

   @Override
   public Object[] toArray() {
       Object[] result = new Object[size];

       // The structure of this is similar to the structure of toString
       //************************************************************* TO-DO

      
       return result;
   }

   // Return a string that shows the array indexes, and the items in each bucket
   public String toString() {
       String result = "";
       String format = "[%" + ("" + buckets.length).length() + "d] ";
      
       // Loop through the array of buckets. A bucket is just a chain of linked nodes.
       // For each bucket, loop through the chain, displaying the contents of the bucket
       for (int i = 0; i < buckets.length; i++) {
           result += String.format(format, i);
          
           // add the data in bucket i
           Node curr = buckets[i];
           while (curr != null) {
               result += curr.data + " ";
               curr = curr.next;
           }
           result += "\n";
       }
       return result;
   }

   // helper methods

   // Adds all items in an array to this set.
   // resize() could make use of this.
   // One of the constructors can make use of this too.
   private void addAll(T[] items) {
       //************************************************************* TO-DO
       // loop to add each item to the set (calls add())
   }

   private void resize() {
      
       T[] allData = (T[]) toArray();   // toArray() is method above
       buckets = (Node<T>[]) new Node[ firstPrime(2 * buckets.length) ];
       size = 0;
      
       //************************************************************* TO-DO
       // now, allData contains all the data from the set
       // and buckets points to a new empty array
       // call addAll to do the adding
       // double-check size when you are done

   }

   // Very important
   // Returns the node containing a particular item, or null if not found.
   // Useful for add, remove, and contains. This is a PRIVATE helper method
   private Node<T> find(T item) {
       // Step 1:    find the index of where this T would be...
       int index = getHashIndex(item);
      
       // Step 2:    using the index, check the linked nodes at that array index
       // by looping through all nodes of the bucket      
       Node<T> curr = buckets[index];  
       while(curr != null && !curr.data.equals(item))
           curr = curr.next;
      
       return curr;   // we will either be returning null (not found) or the node
                       // that contains the node we are looking for
   }

   // Gets the index of the bucket where a given string should go,
   // by computing the hashCode, and then compressing it to a valid index.
   private int getHashIndex(T item) {
       // item will always have the hashCode() method.
       // From the
       int hashCode = item.hashCode();
       int index = -1;   // calculate the actual index here using the
                       // hashCode and length of of the buckets array.
      
       //************************************************************* TO-DO
      
       return index;
   }

   // Returns true if a number is prime, and false otherwise
   private static boolean isPrime(int n) {
       if (n <= 1)   return false;
       if (n == 2)   return true;

       for (int i = 2; i * i <= n; i++)
           if (n % i == 0)   return false;
      
       return true;
   }

   // Returns the first prime >= n
   private static int firstPrime(int n) {
       while (!isPrime(n)) n++;
       return n;
   }

}


public class Tester {
  
   public static void main(String[] args) {

       HashSet<String> set = new HashSet<>();
       System.out.println("true? " + set.isEmpty());
       System.out.println("true? " + set.add("cat"));
       System.out.println("true? " + set.add("dog"));
       System.out.println("false? " + set.add("dog"));
       System.out.println("2? " + set.size());
       System.out.println("false? " + set.isEmpty());
       System.out.println(set.toString());

       for(char c : "ABCDEFGHIJKLMNOPQUSTUVWXYZ".toCharArray())
           set.add("" + c);
      
       System.out.println(set.toString());
   }
  
}


In: Computer Science

Make sure you are using the appropriate indentation and styling conventions Open the online API documentation...

Make sure you are using the appropriate indentation and styling conventions

Open the online API documentation for the ArrayList class, or the Rephactor Lists topic (or both). You may want to refer to these as you move forward.

Exercise 1 (15 Points)

  • In BlueJ, create a new project called Lab7
  • Create a class in that project called ListORama
  • Write a static method in that class called makeLists that takes no parameters and returns no value
  • In makeLists, create an ArrayList object called avengers that can hold String objects.

Exercise 2 (15 Points)

  • Add the following names to the avengers list, one at a time:

Chris, Robert, Scarlett, Clark, Jeremy, Gwyneth, Mark

  • Print the avengers object. You will notice that the contents are displayed in between two brackets [] and separated by a comma. This is how the toString() method of the ArrayList class is implemented!
  • Then use a for-each loop to print each person in the list, one per line.

Exercise 3 (15 Points)

  • Print a blank line.
  • Print the current size of the ArrayList:

Current size of avengers: xxx

  • Now use a regular for loop to print the elements of the list, one per line.

Exercise 4 (15 Points)

  • Now remove the "Clark" and "Gwyneth" elements from the ArrayList. Remember, the list "closes the gaps" when something is removed.
  • Print the current size again.

Now the size is: xxx

  • Print the entire list object again.
  • Make sure you removed the right people!

Exercise 5 (20 Points)

  • Add "Chris H." to the end of the ArrayList.
  • Change the first element "Chris" to "Chris E."
  • Insert "Loki" between "Robert" and "Scarlett"
  • Print the size of the ArrayList again.
  • Print the entire list again.

Exercise 6 (20 Points)

  • Print the elements of the ArrayList again, this time on one line separated by commas.
  • Don't print a comma after the last name!
  • To do this, use a regular for loop and the ArrayList get method to get each name to print.
  • Use an if statement to decide whether to print a comma after each name

In: Computer Science

Find a company or organization which provide cloud computing and services, analyze the information by listing...

Find a company or organization which provide cloud computing and services, analyze the information by listing and commenting their:

a. Services to provide

b. Major clients

c. Benefits

d. Issues and problems

In: Computer Science

I have a set of 100,000 random integers. How long does it take to determine the...

I have a set of 100,000 random integers. How long does it take to determine the maximum value within the first 25,000, 50,000 and 100,000 integers? Will processing 100,000 integers take 4 times longer than processing 25,000? You may use any programming language/technique. It is possible the time will be very small, so you might need to repeat the experiment N times and determine an average value for time. Complete this table. Source code is not needed.

Number

Time

25,000

50,000

100,000

Language/Tool used:

Technique used:

In: Computer Science

Cuda Marine Engines, Inc. must develop the relevant cash flows for a replacement capital investment proposal....

Cuda Marine Engines, Inc. must develop the relevant cash flows for a replacement capital investment proposal. The proposed asset costs $50,000 and has installation costs of $3,000. The asset will be depreciated using a five-year recovery schedule. The existing equipment, which originally cost $25,000 and will be sold for $10,000, has been depreciated using an MACRS five- year recovery schedule and three years of depreciation has already been taken. The new equipment is expected to result in incremental before-tax net profits of $15,000 per year. The firm has a 40 percent tax rate.

a. The book value of the existing asset is ________.
b. The tax effect on the sale of the existing asset results in ________.
c. The initial outlay equals ________.
d. The incremental depreciation expense for year 1 is ________.
e. The annual incremental after-tax cash flow from operations for year 1 is ________.

PLEASE SHOW WORK thank you

In: Finance

Python: The goal is to reverse the order of month and date. # For example, #...

Python:

The goal is to reverse the order of month and date.

# For example,
# output: I was born on 24 June
print(reverse("I was born on June 24"))

# output: I was born on June two
print(reverse("I was born on June two"))

#output: I was born on 1 January, and today is 9 Feb.
print(reverse("I was born on January 1, and today is Feb 9."))

My code (so far, works for first two not the last):

def reverseOrder(string):
newString = []
count = 0
for word in string.split():
count = count+1
if word.isdigit():
count = count+1
newString.append(word)
newString[count-3], newString[count-2] = newString[count-2], newString[count-3]
else:
newString.append(word)
  
return ' '.join(newString)

In: Computer Science

Depreciation by Three Methods; Partial Years Perdue Company purchased equipment on April 1 for $37,530. The...

Depreciation by Three Methods; Partial Years

Perdue Company purchased equipment on April 1 for $37,530. The equipment was expected to have a useful life of three years, or 4,860 operating hours, and a residual value of $1,080. The equipment was used for 900 hours during Year 1, 1,700 hours in Year 2, 1,500 hours in Year 3, and 760 hours in Year 4.

Required:

Determine the amount of depreciation expense for the years ended December 31, Year 1, Year 2, Year 3, and Year 4, by (a) the straight-line method, (b) units-of-output method, and (c) the double-declining-balance method.

Note: FOR DECLINING BALANCE ONLY, round the multiplier to four decimal places. Then round the answer for each year to the nearest whole dollar.

a. Straight-line method

Year Amount
Year 1 $
Year 2 $
Year 3 $
Year 4 $

b. Units-of-output method

Year Amount
Year 1 $
Year 2 $
Year 3 $
Year 4 $

c. Double-declining-balance method

Year Amount
Year 1 $
Year 2 $
Year 3 $
Year 4 $

In: Accounting

Stock A has an expected return of 18% and a standard deviation of 26%. Stock B...

Stock A has an expected return of 18% and a standard deviation of 26%. Stock B has an expected return of 13% and a standard deviation of 20%. The risk-free rate is 6.7% and the correlation between Stock A and Stock B is 0.6. Build the optimal risky portfolio of Stock A and Stock B. What is the standard deviation of this portfolio?

In: Finance

Following the laws of quantum Mechanics: Calculate the number of orbitals and number of electrons in...

Following the laws of quantum Mechanics: Calculate the number of orbitals and number of electrons in different kinds of orbitals for n = 5 to 9. Explain what two electrons are allowed per orbital, and calculate the number of orbitals and total number of electrons for a given n. Does the calculation indicate a Pi or Sigma bond? Would this these natural atomic orbitals have an overlap?

In: Chemistry