Questions
This exercise I will list a series of words I want you to give me both...

This exercise I will list a series of words I want you to give me both denotative (actual dictionary definition) & connotative (personal meaning or reaction to the word).

Word List:

Work, loyalty, parent, education, professionalism, family, partner, student, tradition, infidelity, boss, & love

In: Psychology

In Python, Complete the longestWord() function to take a list as a parameter and return the...

In Python,

Complete the longestWord() function to take a list as a parameter and return the length of the longest word in that list.

Examples:

longestWord(['Python', 'rocks']) returns 5

longestWord(['Casey', 'Riley', 'Jessie', 'Jackie', 'Jaime', 'Kerry', 'Jody']) returns 6

longestWord(['I', 'a', 'am', 'an', 'as', 'at', 'ax', 'the']) returns 3

In: Computer Science

How to make a random word generator from a list of array? string word ={ "RD","BL",...

How to make a random word generator from a list of array?

string word ={ "RD","BL", "YW", "GR","OR","VL","WH","BL" }

The output should produce 4 random words from the list like;

Expected output: RD YW OR BL

CODE USED: C++

In: Computer Science

I need this in java using textpad. I am missing a few lines where I added...

I need this in java using textpad. I am missing a few lines where I added in comments. I don't know what I need to add in. Here are the two programs as pasteable code.The comments in the code say what I need done. The two programs are below. I need it to work with the generic version of SLLNode. It is posted at the bottom.

public class ListDemoHw {

        public static void printLinkedList(SLLNode node) {
                // display all elements in the linked list
                while(node != null) {
                        System.out.print(node.info + " ");
                        node = node.next; // move to the next node
                }       
                System.out.println();
        }
        static SLLNode generateLL1() {
                // Create/return a linked list that has {3, 4, 1, 2}
                // Note that this is not quite a useful function. Just for practice purpose
        }
        static SLLNode generateLL2(int a, int b) {
                // Create/return a linked list that has {a, b, a, b}
                // eg) generateLL2(10,20) returns a list {10,20,10,20}
        }
        static SLLNode generateLL_with_array(int[] nums) {
                // Creat/return a linked list using the given int array
                // Return null if the array is empty (size is zero).
                // eg) generateLL3(new int[]{2,3,4}) returns a list {2,3,4}
        }
        static void attach(SLLNode ls1, SLLNode ls2) {
                // Given two linked lists, attach the second list at the end of the first list
                // eg) Suppose ls1={1,2,3}, ls2={50,60} as lists, attach(ls1, ls2) makes ls1 = {1,2,3,50,60}
                // Assume ls1 is not empty.
                // Hint: You need to go to the last node of ls1 and make a connection from it to the ls2
        }
        public static void main(String[] args) {
                printLinkedList(generateLL1()); // 3 4 1 2
                printLinkedList(generateLL2(20,30)); // 20 30 20 30
                printLinkedList(generateLL_with_array(new int[] {2})); // 2
                printLinkedList(generateLL_with_array(new int[] {2,3,4,5})); // 2 3 4 5
                SLLNode ls1 = generateLL1();
                attach(ls1,generateLL2(20,30));
                printLinkedList(ls1); // 3 4 1 2 20 30 20 30
        }
}

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

public class SLLNode<E> {
        E info;
        SLLNode<E> next;
        public SLLNode(E val) {
                info = val;
                next = null;
        }
}

In: Computer Science

What is a fiduciary relationship? What are the differences between an employee and an independent contractor?...

What is a fiduciary relationship?

What are the differences between an employee and an independent contractor?

What is an agency relationship?

List and define the ways an agency can be formed.

What are the agent’s duties to the principal?

What are the principal’s duties to the agent?

List and define the types of authority.

What are the three categories of principals and how do those categories effect liability?

When is an principal liable for the torts of the agent?

What is respondent superior?

What are the factors that the court considers in deciding whether someone is acting in the course and scope of their employment?

What is the difference between a detour and a frolic?

Is a principal responsible for the intentional torts of the agent?

Is a principal responsible for the torts of an independent contractor?

What are some of the provisions included in the Fair Labor standards Act?

What is Family Medical Leave?

What is the Occupational Safety and Health Act?

What is Worker’s Compensation?

What is COBRA?

What are some of the unfair labor practices for an employer? For an employee?

What is a lockout? What is a strike?

(26)When is electronic monitoring allowed in a place of business?

Does HIPAA require employers to provide insurance?

How does the immigration law limit employment?

What are the three categories of torts?

What does the UCC Section 2 cover? What does the UCC Section 2a cover?

What are the differences between contract law and UCC law?

What is a sale? What is a merchant?

What is the difference between goods and services?

What is the predominant rule?

What terms does the UCC allow to be open? What cannot be open?

What is a merchant’s firm offer?

What are a person’s alternatives if they are sent non-conforming goods?

What happens under the UCC if additional terms are included in the acceptance?

What are the requirements for modifications under the UCC?

What is the perfect tender rule?

List and define the exceptions to non-conforming goods being considered a breach.

List the obligations of the Buyer.

List the obligations of the seller.

What is anticipatory repudiation?

List and define the Seller’s remedies.

List and define the Buyer’s remedies.

What is a warranty of title?

List and define the types of implied warranties.

What are warranty disclaimers?

In: Accounting

The file has some functions incomplete/empty. Please read the description from each of those functions and...

The file has some functions incomplete/empty. Please read the description from each of those functions and add your code to complete.
You also need to test those functions in the main().

ListDemoHw.java

package hw;

public class ListDemoHw {

   public static void printLinkedList(SLLNode<Integer> node) {
       // display all elements in the linked list
       while(node != null) {
           System.out.print(node.info + " ");
           node = node.next; // move to the next node
       }  
       System.out.println();
   }
   static SLLNode<Integer> generateLL1() {
       // Create/return a linked list that has {3, 4, 1, 2}
       // Note that this is not quite a useful function. Just for practice purpose
      
   }
   static SLLNode<Integer> generateLL2(int a, int b) {
       // Create/return a linked list that has {a, b, a, b}
       // eg) generateLL2(10,20) returns a list {10,20,10,20}
   }
   static SLLNode<Integer> generateLL_with_array(int[] nums) {
       // Creat/return a linked list using the given int array
       // Return null if the array is empty (size is zero).
       // eg) generateLL3(new int[]{2,3,4}) returns a list {2,3,4}
   }
   static void attach(SLLNode<Integer> ls1, SLLNode<Integer> ls2) {
       // Given two linked lists, attach the second list at the end of the first list
       // eg) Suppose ls1={1,2,3}, ls2={50,60} as lists, attach(ls1, ls2) makes ls1 = {1,2,3,50,60}
       // Assume ls1 is not empty.
       // Hint: You need to go to the last node of ls1 and make a connection from it to the ls2
   }
   public static void main(String[] args) {
       printLinkedList(generateLL1()); // 3 4 1 2
       printLinkedList(generateLL2(20,30)); // 20 30 20 30
       printLinkedList(generateLL_with_array(new int[] {2})); // 2
       printLinkedList(generateLL_with_array(new int[] {2,3,4,5})); // 2 3 4 5
       SLLNode<Integer> ls1 = generateLL1();
       attach(ls1,generateLL2(20,30));
       printLinkedList(ls1); // 3 4 1 2 20 30 20 30
   }
}

SLLNode.java to test

package hw;

public class SLLNode<E> {
   E info;
   SLLNode<E> next;
   public SLLNode(E val) {
       info = val;
       next = null;
   }
}

In: Computer Science

Java program to implement circular linked list. NO COPY PASTE ANSWERS plz follow the given template......

Java program to implement circular linked list. NO COPY PASTE ANSWERS plz follow the given template...

public class CircularLinkedList  {

    
    private Node tail;
    private int size;
    
    public CircularLinkedList() {
        tail= null;
        size = 0;

    }



     public int size(){
        return size;
    }

 
    public boolean isEmpty()
    {
        return size==0;
    }
    
        
        //if list is not empty return the first element
     
    public E first() {
        if (isEmpty()) return null;
        //code here
        return 0;
    }
  

    
        
        //if list not empty return last element
     
    public E last() {
        if (isEmpty()) return null;
        return tail.getElement();
    }

    /*
        move tail to the next node
     */
    public void rotate()
    {
    }

    /*
        add element to the first of the linked list
        increase the size
     */
    public void addFirst(E e)
    {
        
    }

    /*
        add element to the end of the linked list
        increase size
     */
    public void addLast(E e)
    {
    }

    /*
        take out the first element
        decrease the size
        return first element or null


     */
    public E removeFirst()
    {
        return null;
    }
public String toString()
{
    String s;
    Node<E> n;
    if ( tail == null )
        return "null";
    s = "[";
    n = tail.getNext();
    if (n==null)
    {
        return s+ "empty list]";
    }
    int iter =0;
//change the while loop below for circular list instead of singly linked list
    while (n!=null&&iter<2*size)
    {
        iter++;
        s = s+ n.getElement();
        if (n.getNext()!=null) s = s + ", ";
        n = n.getNext();
    }
    return s+"]";

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

implements....

public class Node {
    // Instance variables:
    //element = data
    private E element;
    private Node next;
    /** Creates a node with null references to its element and next node. */
    public Node() {
        this(null, null);
    }
    /** Creates a node with the given element and next node. */
    public Node(E e, Node n) {
        element = e;
        next = n;
    }
    // Accessor methods:
    public E getElement() {
        return element;
    }
    public Node getNext() {
        return next;
    }
    // Modifier methods:
    public void setElement(E newElem) {
        element = newElem;
    }
    public void setNext(Node newNext) {
        next = newNext;
    }
}
 

In: Computer Science

Instructions: Complete the following queries using the Colonial Adventure Tours database. You will find the description...

Instructions: Complete the following queries using the Colonial Adventure Tours database. You will find the description including data of this database in page 16 to page 20 in Chapter 1 in your Concepts of Database Management textbook. For each following question, create a query using the Query Design option in Access. Make sure that you save and name each query in the following manner: Query1, Query2......Query14. Query Questions:

Queries:

1. List the name of each trip that does not start in New Hampshire (NH).

2. List the last name of each guide that does not live in Massachusetts (MA).

3. List the name and start location for each trip that has the type Biking.

4. List the name of each trip that has the type Hiking and that has a distance greater than six miles.

5. List the name of each trip that has the type Paddling or that is located in Vermont (VT).

6. List the customer number, customer last name, and customer first name of each customer that lives in New Jersey (NJ), New York (NY) or Pennsylvania (PA).

7. How many trips have a type of Hiking or Biking?

8. List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state.

9. How many trips originate in each state?

10. How many reservations include a trip with a price that is greater than $20 but less than $75?

11. Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the result by the number of persons included in the reservation. List the reservation ID, trip ID, customer number, and total price for all reservations where the number of persons is greater than four. Use the column name TOTAL_PRICE for the calculated field.

12. What is the average distance and the average maximum group size for each type of trip?

13. How many current reservations does Colonial Adventure Tours have and what is the total number of persons for all reservations?

In: Computer Science

Write a class named GroceryList that represents a list of items to buy from the market,...

Write a class named GroceryList that represents a list of items to buy from the market, and another class named GroceryItemOrder that represents a request to purchase a particular item in a given quantity (example: four boxes of cookies). It also has client class called GroceryClient which creates objects of GroceryList and GroceryItemOrder. (For this assignment, you will have to submit 3 .java files: one for each class and 3 .class files associated with these .java files. So in total you will be submitting 6 files for this problem.) The GroceryList class should use an array field to store the grocery items and to keep track of its size (number of items in the list so far). Assume that a grocery list will have no more than 10 items. A GroceryList object should have the following methods: public GroceryList() Constructs a new empty grocery list. public void add(GroceryItemOrder item) Adds the given item order to this list if the list has fewer than 10 items. public double getTotalCost() Returns the total sum cost of all grocery item orders in this list. The GroceryItemOrder class should store an item quantity and a price per unit. A GroceryItemOrder object should have the following methods: public GroceryItemOrder(String name, int quantity, double pricePerUnit) Constructs an item order to purchase the item with the given name, in the given quantity, which costs the given price per unit. public double getCost() Returns the total cost of this item in its given quantity. For example, four boxes of cookies that cost 2.30 per unit have a total cost of 9.20. public void setQuantity(int quantity) Sets this grocery item’s quantity to be the given value. The GroceryClient class has static main(..) method and initializes objects for GroceryItemOrder class by adding different items along with their unit item price and available quantity and then creates a GroceryList class object and adds the required grocery list using add() method and determines the total cost using getTotalCost() method and displays it on the console.

In: Computer Science

I need this in java using textpad. I am missing a few lines where I added...

I need this in java using textpad. I am missing a few lines where I added in comments. I don't know what I need to add in. Here are the two programs as pasteable code.The comments in the code say what I need done. The two programs are below.

public class ListDemoHw {

        public static void printLinkedList(SLLNode node) {
                // display all elements in the linked list
                while(node != null) {
                        System.out.print(node.info + " ");
                        node = node.next; // move to the next node
                }       
                System.out.println();
        }
        static SLLNode generateLL1() {
                // Create/return a linked list that has {3, 4, 1, 2}
                // Note that this is not quite a useful function. Just for practice purpose
        }
        static SLLNode generateLL2(int a, int b) {
                // Create/return a linked list that has {a, b, a, b}
                // eg) generateLL2(10,20) returns a list {10,20,10,20}
        }
        static SLLNode generateLL_with_array(int[] nums) {
                // Creat/return a linked list using the given int array
                // Return null if the array is empty (size is zero).
                // eg) generateLL3(new int[]{2,3,4}) returns a list {2,3,4}
        }
        static void attach(SLLNode ls1, SLLNode ls2) {
                // Given two linked lists, attach the second list at the end of the first list
                // eg) Suppose ls1={1,2,3}, ls2={50,60} as lists, attach(ls1, ls2) makes ls1 = {1,2,3,50,60}
                // Assume ls1 is not empty.
                // Hint: You need to go to the last node of ls1 and make a connection from it to the ls2
        }
        public static void main(String[] args) {
                printLinkedList(generateLL1()); // 3 4 1 2
                printLinkedList(generateLL2(20,30)); // 20 30 20 30
                printLinkedList(generateLL_with_array(new int[] {2})); // 2
                printLinkedList(generateLL_with_array(new int[] {2,3,4,5})); // 2 3 4 5
                SLLNode ls1 = generateLL1();
                attach(ls1,generateLL2(20,30));
                printLinkedList(ls1); // 3 4 1 2 20 30 20 30
        }
}

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

public class SLLNode {
        E info;
        SLLNode next;
        public SLLNode(E val) {
                info = val;
                next = null;
        }
}

In: Computer Science