A proton travels through uniform magnetic and electric fields. The magnetic field is in the negative x direction and has a magnitude of 3.50 mT. At one instant the velocity of the proton is in the positive y direction and has a magnitude of 1830 m/s. At that instant, what is the magnitude of the net force acting on the proton if the electric field is (a) in the positive z direction and has a magnitude of 5.10 V/m, (b) in the negative z direction and has a magnitude of 5.10 V/m, and (c) in the positive x direction and has a magnitude of 5.10 V/m?
In: Physics
Billiard ball A of mass mA = 0.116 kg moving with speed vA = 2.80 m/s strikes ball B, initially at rest, of mass mB = 0.135 kg . As a result of the collision, ball A is deflected off at an angle of θ′A = 30.0∘ with a speed v′A = 2.10 m/s, and ball B moves with a speed v′B at an angle of θ′B to original direction of motion of ball A. Solve these equations for the speed, v′B, of ball B after the collision. Do not assume the collision is elastic.
In: Physics
A single-phase 300-kVA, 220/4400 V, 60 Hz transformer yielded the following information when tested: High voltage winding open: Voltage=220 V, Current=40 A Power=l 000W Low voltage terminal shorted: Voltage= 195 V, Current=68.18A Power=4000W Find the equivalent circuit of the transformer as viewed from the high voltage Calculate the .efficiency of the transformer when it delivers its rated load at rated terminal voltage and 8 power factor lagging.
In: Electrical Engineering
When the velocity v of an object is very large, the magnitude of the force due to air resistance is proportional to v squared with the force acting in opposition to the motion of the object. A shell of mass 5 kg is shot upward from the ground with an initial velocity of 500 m/sec. If the magnitude of the force due to air resistance is (0.1)v squared, when will the shell reach its maximum height above the ground? What is the maximum height? Assume the acceleration due to gravity to be 9.81 m divided by s squared.
In: Advanced Math
Trace this code:
1)
#include<iostream>
using namespace std;
class Test {
int value;
public:
Test(int v);
};
Test::Test(int v) {
value = v;
}
int main() {
Test t[100];
return 0;
}
===================================================================
2)
#include <iostream>
using namespace std;
int main()
{
int i, j;
for (i = 1; i <= 3; i++)
{
//print * equal to row number
for (j = 1; j <= i; j++)
{
cout << "* ";
}
cout << "\n";
}
system("pause");
return 0;
In: Computer Science
A real estate expert wanted to find the relationship between the sale price of houses and various characteristics of the houses. He collected data on five variables, recorded in the table, for 12 houses that were sold recently. The five variables arePrice: Sale price of a house in thousands of dollars. Lot Size: Size of the lot in acres. Living Area: Living area in square feet. Age: Age of a house in years. Type of house: town house (T) or Villa (V) Price Lot Size Living Area Age Type of house
Price 255 178 263 127 305 164 245 146 287 189 211 123
Lot Size1.4 0.9 1.8 0.7 2.6 1.2 2.1 1.1 2.8 1.6 1.7 0.5
Living area 2500 2250 2900 1800 3200 2400 2700 2050 2850 2600 2300 1700
Age 8 12 5 24 10 18 9 28 13 9 8 11
Type of the house T T T T T T T V V V V V
Find the regression equation for the town house e) Find the regression equation for the Villa f) What is the price of a town house with a lot size of 1.3, living area of 1800, and is 7 years old?
In: Statistics and Probability
Java Language
Add a method (deleteGreater ()) to the LinkedList class to delete the node with the higher value data.
Code:
class Node {
int value;
Node nextNode;
Node(int v, Node n)
{
value = v;
nextNode = n;
}
Node (int v)
{
this(v,null);
}
}
class LinkedList
{
Node head; //head = null;
LinkedList()
{
}
int length()
{
Node tempPtr;
int result = 0;
tempPtr = head;
while (tempPtr != null)
{
tempPtr = tempPtr.nextNode;
result = result + 1;
}
return(result);
}
void insertAt(int v, int position)
{
Node newNode = new Node(v,null);
Node tempPtr;
int tempPosition = 0;
if((head == null) || (position ==0))
{
newNode.nextNode = head;
head = newNode;
}
else {
tempPtr = head;
while((tempPtr.nextNode != null)&&(tempPosition < position -1))
{
tempPtr = tempPtr.nextNode;
tempPosition = tempPosition + 1;
}
if (tempPosition == (position - 1))
{
newNode.nextNode = tempPtr.nextNode;
tempPtr.nextNode = newNode;
}
}
}
public String toString()
{
Node tempPtr;
tempPtr = head;
String result = "";
while(tempPtr != null)
{
result = result + "[" + tempPtr.value + "| ]-->";
tempPtr = tempPtr.nextNode;
}
result = result + "null";
return result;
}
}
public class LinkedListDemoInsDel
{
public static void main(String[] args)
{
LinkedList aLinkedList = new LinkedList();
aLinkedList.insertAt(1,0);
aLinkedList.insertAt(9,1);
aLinkedList.insertAt(13,2);
aLinkedList.insertAt(8,1);
aLinkedList.insertAt(3,2);
System.out.println(aLinkedList);
System.out.println("Largo de lista: " + aLinkedList.length());
}
}
In: Computer Science
Complete the program used on the instructions given in the comments:
C++ lang
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
vector<float>GetTheVector();
void main()
{
vector<int> V;
V = GetTheVector(); //reads some lost numbers from the file “data.txt" and places it in //the Vector V
Vector<int>W = getAverageOfEveryTwo(V);
int printTheNumberOfValues(W) //This should print the number of divisible values by 7 //but not divisible by 3.
PrintIntoFile(W); //This prints the values of vector W into an output file “output.txt”
}
As you see in the main program, there are four functions. The first function is called “GetVector()” that reads a set of integer, place them into the vector V, and returns the vector to the main program.
The second function is called “GetAverageOfEveryTwoNumber() that takes a vector “V” and finds the average of every two consecutive numbers, place the values into another vector called “W” and returns it to the main program. For example if the Vector is:
10 20 30 40 50 60 70 80 90 100
Then vector “W” should be:
15 25 35 45 55 65 75 85 95
Because (10+20) divided by 2 is 15, and so on.
The next function takes the vector “W” and count how many of the values are divisible by “7” but not divisible by “3”
Finally the last function prints the vector “W” into an output file called “output.txt”
In: Computer Science
Java Language:
Using program created in this lesson as a starting point, create a circular list with at least four nodes. A circular list is one where the last node is made to point to the first. Show that your list has a circular structure by printing its content using an iterative structure such as a while. This should cause your program to go into an infinite loop so you should include a conditional that limits the number of nodes to be printed to a specific value, for example 20.
Code:
class Node {
int value;
Node nextNode;
Node(int v, Node n)
{
value = v;
nextNode = n;
}
Node (int v)
{
this(v,null);
}
}
class Stack {
protected Node top;
Stack()
{
top = null;
}
boolean isEmpty()
{
return( top == null);
}
void push(int v)
{
Node tempPointer;
tempPointer = new Node(v);
tempPointer.nextNode = top;
top = tempPointer;
}
int pop()
{
int tempValue;
tempValue = top.value;
top = top.nextNode;
return tempValue;
}
void printStack()
{
Node aPointer = top;
String tempString = "";
while (aPointer != null)
{
tempString = tempString + aPointer.value + "\n";
aPointer = aPointer.nextNode;
System.out.println(tempString);
}
}
public class StackWithLinkedList{
public static void main(String[] args){
int popValue;
Stack myStack = new Stack();
myStack.push(5);
myStack.push(7);
myStack.push(9);
myStack.printStack();
popValue = myStack.pop();
popValue = myStack.pop();
myStack.printStack();
}
}
In: Computer Science
Volume-Volume percent:
10 mL ice cold 4 % acetic acid in 95 % ethanol (v/v)
1. how many mL of acetic acid and how many mL of ethanol is needed to make 10 mL mixture of the two
In: Chemistry