Questions
1.) A particle is uncharged and is thrown vertically upward from ground level with a speed...

1.) A particle is uncharged and is thrown vertically upward from ground level with a speed of 20.1 m/s. As a result, it attains a maximum height h. The particle is then given a positive charge +q and reaches the same maximum height h when thrown vertically upward with a speed of 27.3 m/s. The electric potential at the height h exceeds the electric potential at ground level. Finally, the particle is given a negative charge −q. Ignoring air resistance, determine the speed with which the negatively charged particle must be thrown vertically upward, so that it attains exactly the maximum height h. In all three situations, be sure to include the effect of gravity.

2.) A moving particle encounters an external electric field that decreases its kinetic energy from 9190 eV to 6350 eV as the particle moves from position A to position B. The electric potential at A is -51.0 V, and the electric potential at B is +26.7 V. Determine the charge of the particle. Include the algebraic sign (+ or −) with your answer.

3.) Identical +2.22 µC charges are fixed to adjacent corners of a square. What charge (magnitude and algebraic sign) should be fixed to one of the empty corners, so that the total electric potential at the remaining empty corner is 0 V? .

4) A charge of -2.75 µC is fixed in place. From a horizontal distance of 0.0465 m, a particle of mass 6.85 10-3 kg and charge -7.40 µC is fired with an initial speed of 59.5 m/s directly toward the fixed charge. How far does the particle travel before its speed is zero?

5.) The inner and outer surfaces of a cell membrane carry a negative and a positive charge, respectively. Because of these charges, a potential difference of about 0.062 V exists across the membrane. The thickness of the cell membrane is 8.80 10-9 m. What is the magnitude of the electric field in the membrane?

6.) A spark plug in an automobile engine consists of two metal conductors that are separated by a distance of 0.65 mm. When an electric spark jumps between them, the magnitude of the electric field is 5.30 107 V/m. What is the magnitude of the potential difference ΔV between the conductors?

In: Physics

1. The correct mathematical models for the first four seconds of the motion map below are:...

1. The correct mathematical models for the first four seconds of the motion map below are: ( can have multiple answers)

http://tinypic.com/view.php?pic=20u4v4o&s=8#.U62fWF6aL1o << graph that goes to the question

A) x(m)=1/2(-10m/s^2)t^2(s^2)+(10m/s)t(s), 0 < t <3s

B) v(m/s)=(-10m/s^2)t(s)+(20m/s), 0 < t <3s

C) x(m)=(-10m/s) delta t(s) +5m ,3 < t <4s

D) v^2(m^2/s^2) = 2(-10m/s^2) delta x(m) +(400m^2/s^2), 0 < t <3s

2. Examine the velocity versus time graph below. Select the mathematical models that COULD describe the graph from the choices below. COULD is the operative word - is there any information about the starting point in the velocity versus time graph? (could have muliple answers)

http://tinypic.com/view.php?pic=2j3jipi&s=8#.U62g3F6aL1o <<imagae of graph

A) x(m)=1/2(+4m/s/s)t^2(s^2)-(10m/s)t(s)+5m

B) v(m/s)=(+4m/s/s)t(s)+(-10m/s)

C) delta x(m)=1/2(v(m/s)-10m/s)t(s)

D) v^2(m/s)^2=2(4m/s/s) delta x(m)+100(m/s)^2

3. A mountain goat starts a rock-slide and the rocks crash down the slope 196 m. Down hill is the positive x direction. If the rocks reach the bottom in 3 s, what is the acceleration of the rock-slide? Please remember to include units but do NOT use "^" for "raise to the power". Use ratios only.

4.NBA player Michael Jordan had one of the longest hang times in the league, about 0.92s. In general if a person has a hang time of 0.93 how high do they jump? Please use 9.81m/s/s to solve this problem.

In: Physics

Im trying to figure out the errors as to why these test case will not work...

Im trying to figure out the errors as to why these test case will not work for myvector.h. The issue I have with these test cases is the fact that when I implement these test cases into a grader the program declares that it is not working. So I need help in myvector.h to make the test cases work for my function.

myvector.h

#pragma once

#include // print debugging
#include // malloc, free

using namespace std;

template
class myvector
{
private:
   T* A;
   int Size;
   int Capacity;

public:
   // default constructor:
   myvector()
   {
       Size = 0;

       Capacity = 1000;

       A = new T[Capacity];
   }

   // constructor with initial size:
   myvector(int initial_size)
   {
       Capacity = initial_size;

       Size = initial_size;

       A = new T[Capacity];
   }

   // copy constructor for parameter passing:
   myvector(const myvector& other)
   {
       //
       // we have to make a copy of the "other" vector, so...
       //
       A = new T[other.Capacity]; // allocate our own array of same capacity
       Size = other.Size; // this vector is same size and capacity
       Capacity = other.Capacity;

       // make a copy of the elements into this vector:
       for (int i = 0; i < Size; ++i)
           A[i] = other.A[i];
   }

   int size()
   {
       //
       //
       //
       return Size;
   }

  

   T& at(int i)
   {

       return A[i]; // this is WRONG, but compiles
   }

   void push_back(T value)
   {
       if (Size >= Capacity) {

           int *temp = new int[2 * Capacity];

           for (int i = 0; i < Size; i++)

               temp[i] = A[i];

           A = temp;

       }
       Capacity = 2 * Capacity; // Correction in your code

       A[Size] = value;

       Size++;
   }
  
   T erase(int i)
   {
        T temp = A[i]; // copying data from ith index
       for (int j = i; j < Size-1; j++)
       {
           A[j] = A[j + 1];   // moving data forward
       }
       Size--; // size reduction
       return temp;
   }
  
   T& operator[](int i)
   {
       return A[i];
   }
  
   T* rangeof(int i, int j)
   {
       int sz = j - i + 1;
       T* arr = new T[sz]; //dynamically array allocation.
       for (int k = i; k <= j; k++)
       {
           arr[k - i] = A[k];
       }
       return arr;
   }

};

.rangeof for int vector

test case 12.cpp

#include <iostream>

#include <string>

#include <cstdlib>

#include <cmath>

#include "myvector.h"

#include "catch.hpp"

using namespace std;

TEST_CASE("Test 12", "[Project01]")

{

  myvector V;

  int N = 100;

  for (int i = 0; i < N; i++)

    V.push_back(i * 10);

  REQUIRE(V.size() == N);

  // range of 10 elements [0..9]:

  int* A = V.rangeof(0, 9);

  for (int i = 0; i < 10; ++i)

    REQUIRE(A[i] == (i * 10));

}

test15.cpp

#include <iostream>

#include <string>

#include <cstdlib>

#include <cmath>

#include "myvector.h"

#include "catch.hpp"

using namespace std;

TEST_CASE("Test 15", "[Project01]")

{

  myvector V;

  int N = 100;

  for (int i = 0; i < N; i++)

    V.push_back(i * 10);

  REQUIRE(V.size() == N);

  // range of 10 elements [2..12]:

  int* A = V.rangeof(2, 12);

  // just one element:

  int* B = V.rangeof(99, 99);

  // all 100 elements:

  int* C = V.rangeof(0, 99);

  for (int i = 2; i <= 12; ++i)

    REQUIRE(A[i-2] == (i * 10));

  REQUIRE(B[0] == (99 * 10));

  for (int i = 0; i <= 99; ++i)

    REQUIRE(C[i] == (i * 10));

}

test20.cpp

#include <iostream>

#include <string>

#include <cstdlib>

#include <cmath>

#include "myvector.h"

#include "catch.hpp"

using namespace std;

TEST_CASE("Test 20", "[Project01]")

{

  myvector V;

  int N = 10;

  for (int i = 0; i < N; i++)

    V.push_back(i*2);

  REQUIRE(V.size() == N);

  // remove them all:

  for (int i = 0; i < N; ++i)

  {

    int x = V.erase(0); // keep erasing the first element:

    REQUIRE(x == (i*2));

  }

  REQUIRE(V.size() == 0);

  V.push_back(123);

  REQUIRE(V.size() == 1);

  REQUIRE(V[0] == 123);

  V.push_back(456);

  REQUIRE(V.size() == 2);

  REQUIRE(V[1] == 456);

  REQUIRE(V[0] == 123);

  V.push_back(999);

  REQUIRE(V.size() == 3);

  REQUIRE(V[1] == 456);

  REQUIRE(V[0] == 123);

  REQUIRE(V[2] == 999);

}

In: Computer Science

Professional Practices and Ethics Case study 1: Violation of privacy Marcus is a computer engineer who...

Professional Practices and Ethics

Case study 1: Violation of privacy

Marcus is a computer engineer who has recently developed an application which helps users keep track of medical information, doctor’s appointments, and prescriptions. Information about the user is stored in this application, including what prescriptions they are taking and how frequently they schedule doctor’s appointments. As the developers of the application, Marcus and his company have access to this information. The marketing department requests Marcus to supply them with customer-specific information so they can better target advertisements and application suggestions to the users. Marcus understands that he is part of a company, but also feels that the privacy of the app users should be protected. Additionally, Marcus feels that as an engineer, he should be responsible to those who use his technology.

Source: Clare Bartlett was a 2014-2015 Hackworth Fellow in Engineering Ethics at the Markkula Center for Applied Ethics at Santa Clara University

Question 1: Read case study 1[Violation of privacy] to answer the following questions.

  1. How does Marcus determine how much of the user’s information should be shared with marketing? [Answer considering internal / external pathway of conflict resolution]
  2. Is this an ethical use of information or a violation of the user’s privacy? [Answer considering moral principles of respect]

In: Operations Management

Suppose that vehicles taking a particular freeway exit can turn right (R), turn left (L), or...

Suppose that vehicles taking a particular freeway exit can turn right (R), turn left (L), or go straight (S). Consider observing the direction for each of three successive vehicles. (Enter your answers in set notation. Enter EMPTY or ∅ for the empty set.)

(a) List all outcomes in the event A that all three vehicles go in the same direction.
A =  

  

(b) List all outcomes in the event B that all three vehicles take different directions.
B =  

  

(c) List all outcomes in the event C that exactly two of the three vehicles turn right.
C =  

  

(d) List all outcomes in the event D that exactly two vehicles go in the same direction.
D =  

  

(e) List outcomes in D'.
D' =  

  

List outcomes in CD.
CD =  

  

List outcomes in CD.
CD =  

  

In: Statistics and Probability

Exercise 2: Write a program in Java to manipulate a Double Linked List: 1. Create Double...

Exercise 2:
Write a program in Java to manipulate a Double Linked List:

1. Create Double Linked List
2. Display the list
3. Count the number of nodes
4. Insert a new node at the beginning of a Double Linked List.
5. Insert a new node at the end of a DoubleLinked List
6. Insert a new node after the value 5 of Double Linked List
7. Delete the node with value 6.
8. Search an existing element in a Double linked list (the element of search is given by the user)
9. Call all methods above in main method with the following data:

Test Data :
Input the number of nodes : 4
Input data for node 1 : 5
Input data for node 2 : 6
Input data for node 3 : 7

Input data for node 4 : 9

In: Computer Science

Using C++, you will create a program, where you will create two doubly linked lists. These...

Using C++,

you will create a program, where you will create two doubly linked lists. These doubly linked lists will contain integers within them. Using the numbers in both of these linked lists, you add the numbers together, and insert the addition of the two numbers into a singly linked list.

the input can be from the user or you just write the input.

for example, if one number in the doubly linked list is 817 and in the other linked list has 43, you would add these two numbers, 860 and insert this number into the single linked list

(If you want some ideas: You can traverse the list backwards to add the numbers. the void add function can be: void add(node* tail of linked list1, node* tail of linked list 2, node*head of singly linked list)

In: Computer Science

This all has to be in javascript Use this linked list to answer the questions below:...

This all has to be in javascript

Use this linked list to answer the questions below:

var list = new LinkedList();

list.append(1);

list.append(2);

list.append(3);

list.append(4);

1. We are going to extend LinkedList with a sum method. As the name implies, all elements in the linked list should be summed together. First, write a few tests that will eventually show your code works correctly (after you implement the function in (2)). Note: see the LinkedList implementation above for more details. Hint: note that the sum of the elements in list above is 10.

2. Finish the implementation of the sum function below. As the name implies, all elements in the linked list should be summed together. Return null if there are no elements in the list. Make sure to validate your code using the tests from (1).

LinkedList.prototype.sum = function() {

note: use 'this' to refer to the linked list, e.g., this.getHead()

};

In: Computer Science

All functions are written in python Write a function cube_evens_lc(values) that takes as input a list...

All functions are written in python

  1. Write a function cube_evens_lc(values) that takes as input a list of numbers called values, and that uses a list comprehension to create and return a list containing the cubes of the even numbers in values (i.e., the even numbers raised to the third power). For example:

    >>> cube_evens_lc([2, 5, 6, 4, 1])
    result: [8, 216, 64]
    

    This version of the function may not use recursion.

  2. Write a function cube_evens_rec(values) that takes as input a list of numbers called values, and that uses recursion to create and return a list containing the cubes of the even numbers in values. In other words, this function will do the same thing as the previous function, but it must use recursion instead of a list comprehension. For example:

    >>> cube_evens_rec([2, 5, 6, 4, 1])
    result: [8, 216, 64]
    

    This version of the function may not use a list comprehension.

In: Computer Science

Consider the following database schema: LIKE(person, sport), PRACTICE(person, sport), where person and sport are keys in...

Consider the following database schema:

LIKE(person, sport),

PRACTICE(person, sport),

where person and sport are keys in both tables. The table LIKE gives the sports a person likes, the table PRACTICE gives the sports a person practices. We assume that a person likes at least one sport and practices at least one sport. We assume also that a person does not like a sport if the sport is not listed among the sports that person likes.

Express the following queries in relational algebra

  1. List the people who practice at list one sport they like
  2. List the people who practice at least one sport they do not like
  3. List pairs of people who practice at least one common sport
  4. List the people who like all the sports they practice
  5. List the people who practice all the sports they
  6. List the people who practice all the sports John

In: Computer Science