Questions
Add 011 0011 to 010 1100 and show the V and C bits (seven bits and...

Add 011 0011 to 010 1100 and show the V and C bits (seven bits and show work)

In: Computer Science

how did tax immunity affect the relationship between the United States v. Mexico case in 1982?

how did tax immunity affect the relationship between the United States v. Mexico case in 1982?

In: Accounting

In your best argument, what makes Terry v. Ohio so important to law enforcement officers.

In your best argument, what makes Terry v. Ohio so important to law enforcement officers.

In: Psychology

Find the second virial coefficient for the Dieterici equation of state p = (RT/V-b) exp (-a/RTV)

Find the second virial coefficient for the Dieterici equation of state

p = (RT/V-b) exp (-a/RTV)

In: Chemistry

An AC generator with an output rms voltage of 18 V at a frequency of 60...

An AC generator with an output rms voltage of 18 V at a frequency of 60 Hz is connected across a 3

In: Physics

Describe the symptomology of AUD (per current DSM-V criteria) and distinguish it from normal alcohol use

Describe the symptomology of AUD (per current DSM-V criteria) and distinguish it from normal alcohol use

In: Psychology

Research Dothard v. Rawlinson and discuss the decision by the U.S. Supreme Court. Do you agree...

Research Dothard v. Rawlinson and discuss the decision by the U.S. Supreme Court. Do you agree with their reasoning?

In: Psychology

C++ Using an appropriate definition of ListNode, design a simple linked list class with only two...

C++

  1. Using an appropriate definition of ListNode, design a simple linked list class with only two member functions and a default constructor:

void add(double x);

boolean isMember(double x);

LinkedList( );

The add function adds a new node containing x to the front (head) of the list, while the isMember function tests to see if the list contains a node with the value x. Test your linked list class by adding various numbers to the list and then testing for membership.

  1. List Copy Constructor Modify your list class of Previous Programming to add a copy constructor. Test your class by making a copy of a list and then testing membership on the copy.
  2. List Print Modify the list class you created in the previous programming challenges to add a print member function. Test the class by starting with an empty list, adding some elements, and then printing the resulting list out.
  3. Recursive Member Check Modify the list class you created in the previous programming challenges to use a recursive method to check for list membership. Test your class.
  4. List Member Deletion Modify the list class you created in the previous programming challenges by adding a function to remove an item from the list and by adding a destructor:

        void remove(double x);

       ~LinkedList();

Test the class by adding a sequence of instructions that mixes operations for adding items, removing items, and printing the list.

  1. List Reverse Modify the list class you created in the previous programming challenges by adding a member function for reversing the list:

         void reverse();

The member function rearranges the nodes in the list so that their order is reversed. You should do this without creating or destroying nodes.

In: Computer Science

11. Print the length of the new list out to the screen. Ensure the new list...

11. Print the length of the new list out to the screen. Ensure the new list has a length of 25. 12. Append the integer value 42 to the new list. Print the new list to the screen.   13. Permanently sort the new list. Print the new list to the screen. 14. Remove the integer value 42 from the new list. Print the new list to the screen. 15. Implement a for loop to iterate through the new list. For each list value in the for loop, print the value to the screen after dividing the value by 10 and adding 1. Don’t permanently change the list item value in this process. Note: The math is, as an example, 200/10 + 1 = 21. 16. Print the new list out to the screen one more time to demonstrate the list values did not change during the for loop execution. in python

In: Computer Science

A Java question. Write the class Staff. It contains methods that manipulate an ArrayList of Strings...

A Java question. Write the class Staff. It contains methods that manipulate an ArrayList of Strings representing the names of staff members. The constructor takes an ArrayList of String names as a parameter. In addition to the constructor, you need to implement the following methods

The methods

1. public boolean equals(Staff other) - Determines if the other Staff contains all the same elements in the same order as this Staff
2. public boolean sameContents(Staff other) - Determines if the other Staff and this Staff contain exactly the same elements but in any order
3. public void replaceVowelsWith(String text) Replaces each vowel in every ArrayList element with the replacement value text. Assume the vowels are aeiouyAEIOUY
4. public String mostVowels() Gets the staff member whose name has the most vowels. If more than one has that number of vowels, return the first. Return null if the list is empty. Assume the vowels are aeiouAEIOU
5. public String toString() gets a string represent ion using ArrayList's toString method

(set different vowel strings for both of aeiouyAEIOUY and aeiouAEIOU)

---------------------------------------------------------------------------------------------------------------------

Use the following file:

StaffTester.java

import java.util.ArrayList;
/**
 * Tester
 */
public class StaffTester
{
    public static void main(String[] args)
    {
        ArrayList list = new ArrayList<>();
        list.add("Goodyear");
        list.add("Sathyanantha");
        list.add("Keomahavong");
        list.add("Addison");
        list.add("Smith");
        
        ArrayList list2 = new ArrayList<>();
        list2.add("^aeiouy$");
        list2.add("^AEIOUY$");
        
        
        Staff lister = new Staff(list);
        Staff lister2 = new Staff(list2);
        Staff empty = new Staff(new ArrayList()); //test an empty list
        
        
        lister.replaceVowelsWith("*");
        System.out.println(lister);
        System.out.println("Expected: [G**d***r, S*th**n*nth*, K**m*h*v*ng, *dd*s*n, Sm*th]");
        
        lister2.replaceVowelsWith("#");
        System.out.println(lister2);
        System.out.println("Expected: [^######$, ^######$]");
        
        empty.replaceVowelsWith("*");
        System.out.println(empty);
        System.out.println("Expected: []");

        
        //testing equals
        list.clear();
        list.add("Goodyear");
        list.add("Sathyanantha");
        list.add("Keomahavong");
        list.add("Addison");
        list.add("Smith");
        lister = new Staff(list);
        
        list2.clear();
        list2.add("Goodyear");
        list2.add("Sathyanantha");
        list2.add("Keomahavong");
        list2.add("Addison");
        list2.add("Smith");
        lister2 = new Staff(list2);
        
        System.out.println("equal?: " + lister.equals(lister2));
        System.out.println("Expected: true");

        
        list2.remove(list2.size() - 1);
        System.out.println("equal?: " + lister.equals(lister2));
        System.out.println("Expected: false");
        
        System.out.println("contains?: " + lister.sameContents(lister2));
        System.out.println("Expected: false");
        
        list2.add(1, "Smith");
        System.out.println("contains?: " + lister.sameContents(lister2));
        System.out.println("Expected: true");

        
        list2.set(1, "smith");
        System.out.println("equal?: " + lister.equals(lister2));
        System.out.println("Expected: false");
        
        System.out.println("equal?: " + empty.equals(empty));
        System.out.println("Expected: true");
        
        System.out.println(lister.mostVowels());
        System.out.println("Expected: Keomahavong");
        
        list.remove(2);
        System.out.println(lister.mostVowels());
        System.out.println("Expected: Goodyear");
        
        System.out.println(empty.mostVowels());
        System.out.println("Expected: null");
        
    }
    
}

In: Computer Science