A mass
m = 3.27 kg
is attached to a spring of force constant
k = 60.9 N/m
and set into oscillation on a horizontal frictionless surface by stretching it an amount
A = 0.17 m
from its equilibrium position and then releasing it. The figure below shows the oscillating mass and the particle on the associated reference circle at some time after its release. The reference circle has a radius A, and the particle traveling on the reference circle has a constant counterclockwise angular speed ω, constant tangential speed
V = ωA,
and centripetal acceleration of constant magnitude
ac = ω2A.
(a) Determine the following.
maximum speed of the oscillating mass
m/s
magnitude of the maximum acceleration of the oscillating mass
m/s2
magnitude of the maximum force experienced by the oscillating
mass
N
maximum kinetic energy of the oscillating mass
J
maximum elastic potential energy of the spring attached to the
mass
J
total energy of the oscillating mass-spring system
J
(b) If the record of time starts when
x = +A
and
v = 0,
determine expressions for the displacement, velocity, and acceleration of the oscillating mass along the x-axis at any time t later. (Your expression should be in terms of the variable t and other numerical values. Assume any numerical values in your expression are in standard SI units, but do not enter units into your expression.)
| x = | |
| v = | |
| a = |
(c) If the record of time starts when
x = 0
and
v = +ωA,
determine expressions for the displacement, velocity, and acceleration of the oscillating mass along the x-axis at any time t later. (Your expression should be in terms of the variable t and other numerical values. Assume any numerical values in your expression are in standard SI units, but do not enter units into your expression.)
| x = | |
| v = | |
| a = |
In: Physics
1) Find the uncertainty in kinetic energy. Kinetic energy depends on mass and velocity according to this function E(m,v) = 1/2 m v2. Your measured mass and velocity have the following uncertainties 2.58 kg and 0.36 m/s. What is is the uncertainty in energy, , if the measured mass, m = 4.75 kg and the measured velocity, v = -3.76 m/s? Units are not needed in your answer
2)Find the uncertainty in kinetic energy. Kinetic energy depends on mass and velocity according to this function E(m,v) = 1/2 m v2. Your measured mass and velocity have the following uncertainties 0.47 kg and 2.48 m/s. What is is the uncertainty in energy, , if the measured mass, m = 3.95 kg and the measured velocity, v = -22.69 m/s? Units are not needed in your answer.
3) The propagation of uncertainty formula for the equation y = ax^2 is
where ,and . and . The values and are the uncertainties on a and x respectively.
If a = -4.5 +/- 0.4 and x = -4.7+/-0.7 then what is the uncertainty on y
4) After a million measurements of thing x, we find a sample mean of 60.45 and standard deviation of 3.24. What chance, in percent (0-100) does the next measurement have of being outside 3 standard deviations from the mean? Do not include the percent sign.
5) Find the uncertainty in a calculated average speed from the measurements of distance and time. Average speed depends on distance and time according to this function v(t,x) = x/t. Your measured distance and time have the following values and uncertainties x = 5.1 meters, 2.8 meters and t = 9.1 seconds and 0.2 seconds. What is the uncertainty in the average speed, ? Units are not needed in your answer.
In: Physics
A metallic circular plate with radius r is fixed to a tabletop. An identical circular plate supported from above by a cable is fixed in place a distance dd above the first plate. Assume that dd is much smaller than r. The two plates are attached by wires to a battery that supplies voltage V.
1) What is the tension in the cable? Neglect the weight of the plate.
Express your answer in terms of the variables d, r, V, and constants ϵ0, pi.
F=
2)
The upper plate is slowly raised to a new height 2d. Determine the work done by the cable by integrating ∫d to 2d F(z)dz, where F(z) is the cable tension when the plates are separated by a distance z.
Express your answer in terms of the variables d, r, V, and constants ϵ0,pi.
W=
3) Compute the energy stored in the electric field before the top plate was raised.
Express your answer in terms of the variables d, r, V, and constants ϵ0, pi.
U=
4) Compute the energy stored in the electric field after the top plate was raised.
Express your answer in terms of the variables d, r, V, and constants ϵ0, pi.
U=
5)
is the work done by the cable equal to the change in the stored electrical energy? If not, why not?
| The work done in separating the plates is equal to energy change in the plates. |
| The work done in separating the plates is equal to the magnitude of the energy change in the plates. This does not mean that the work done is equal to the change in the energy stored in the plates. The work done on the plates is positive but the plates lose energy. The plates are connected to the battery, so the potential difference across them remains constant as they are separated. Therefore charge is forced off of the plates through the battery, which does work on the battery. |
In: Physics
Write this program in C++
You are given a source file in your work area for this assignment.
It consists of a declaration for a Val node. There are declarations for three overloaded operator functions, which you must fill in: operator+, operator*, and operator!.
operator+ should implement addition. operator* should implement multiplication.
operator! should reverse the digits of its operand (i.e., of "this") and return the reversed integer. So for example !123 should return 321.
It should be straightforward to reverse an integer. You can extract the least significant digit by using % 10. You can remove the least significant digit by dividing by 10. Other approaches are possible as well.
These operator functions should not be a lot of code. The addition and multiplication can be written in 1-2 lines, and the reverse function within about 10 lines.
Source Code:
#include
using namespace std;
class Val {
int v;
public:
Val(int v=0) : v(v) {}
friend ostream& operator<<(ostream&
out, const Val& v) {
out << v.v;
return out;
}
Val operator+(const Val& o) const {
// FILL IN
}
Val operator*(const Val& o) const {
// FILL IN
}
Val operator!() const {
// FILL IN
}
};
int main()
{
Val values[] = { 2, 44, 19, 4391 };
const int nv = sizeof(values)/sizeof(values[0]);
for( int i=0; i<nv; i++ ) {
cout << values[i] <<
endl;
cout << "!" <<
values[i] << " == " << !values[i] << endl;
for( int j = i+1; j < nv; j++
) {
cout <<
values[j] << endl;
cout <<
values[i] << " + " << values[j] << " == "
<< values[i] + values[j] <<
endl;
cout <<
values[i] << " * " << values[j] << " == "
<< values[i] * values[j] <<
endl;
}
}
return 0;
}
In: Computer Science
You are given a source file in your work area for this assignment.
It consists of a declaration for a Val node. There are declarations for three overloaded operator functions, which you must fill in: operator+, operator*, and operator!.
operator+ should implement addition. operator* should implement multiplication.
operator! should reverse the digits of its operand (i.e., of "this") and return the reversed integer. So for example !123 should return 321.
It should be straightforward to reverse an integer. You can extract the least significant digit by using % 10. You can remove the least significant digit by dividing by 10. Other approaches are possible as well.
These operator functions should not be a lot of code. The addition and multiplication can be written in 1-2 lines, and the reverse function within about 10 lines.
***************************************************************************************************************
THIS IS THE GIVEN PROGRAM WHICH I HAVE TO FILL IN.
********************************************************************************************************************
#include <iostream>
using namespace std;
class Val {
int v;
public:
Val(int v=0) : v(v) {}
friend ostream& operator<<(ostream&
out, const Val& v) {
out << v.v;
return out;
}
Val operator+(const Val& o) const {
// FILL IN
}
Val operator*(const Val& o) const {
// FILL IN
}
Val operator!() const {
// FILL IN
}
};
int main()
{
Val values[] = { 2, 44, 19, 4391 };
const int nv = sizeof(values)/sizeof(values[0]);
for( int i=0; i<nv; i++ ) {
cout << values[i] <<
endl;
cout << "!" <<
values[i] << " == " << !values[i] << endl;
for( int j = i+1; j < nv; j++
) {
cout <<
values[j] << endl;
cout <<
values[i] << " + " << values[j] << " == "
<< values[i] + values[j] <<
endl;
cout <<
values[i] << " * " << values[j] << " == "
<< values[i] * values[j] <<
endl;
}
}
return 0;
}
In: Computer Science
Responsive web form:
Create a well laid out responsive contact me web form saved as index.html with the following labeled fields:
First name, last name, company name, email address, phone number, and comments, submit button
Validate the form so that the required fields are First name, Last name, and email address. Once validated, write the data to a results page saved as results.html.
The web pages must automatically switch between device types or browser sizes or screen resolutions. Text size, page layout, image dimensions, etc. must change across those device types and browser sizes.
In: Computer Science
In Python
This assignment involves the use of text files, lists, and
exception handling and is a continuation of the baby file
assignment.
You should now have two files … one called boynames2014.txt and one
called girlnames2014.txt - each containing the top 100 names for
each gender from 2014. Write a program which allows the user to
search your files for a boy or girl name and display where that
name ranked in 2014. For example …
>>> Enter gender (boy/girl): boy Enter the
name to search for: Michael Michael was ranked # 7 in 2014 for boy
names. >>> ================================ RESTART
================================ Enter gender (boy/girl): boy Enter
the name to search for: MIchAel MIchAel was ranked # 7 in 2014 for
boy names. >>> ================================ RESTART
================================ Enter gender (boy/girl): boy Enter
the name to search for: Jeremiah Jeremiah was ranked # 56 in 2014
for boy names. >>> ================================
RESTART ================================ Enter gender (boy/girl):
girl Enter the name to search for: olivia olivia was ranked # 2 in
2014 for girl names. >>> ================================
RESTART ================================ Enter gender (boy/girl):
girl Enter the name to search for: billie jean billie jean was not
ranked in the top 100 girl names for 2014. >>>
================================ RESTART
================================ Enter gender (boy/girl): gril
Enter the name to search for: sue Invalid gender >>>
Make sure to use try/except blocks to handle the exception if the
files are not found or unavailable.
Use the index method on the list to find the baby name. Use a
try/except block to handle the exception caused when the name is
not found in the file.
Also, check for an invalid gender entry.
Make sure to include header comments and function comments in your
program.
In: Computer Science
2
a. Write a new method for the Greeter class,
public void swapNames(Greeter other) {...}
that swaps the names of this greeter and another instance.
b. write a new method for the Greeter class:
public Greeter createQualifiedGreeter(String
qualifier) { ..... }
that returns a new Greeter object with its name being the qualifier
string followed by
" " and the executing greeter's name (i.e. this.name).
For example:
Greeter g = new Greeter("world");
Greeter g2 =
g.createQualifiedGreeter("beautiful");
g2.name will be the string "beautiful world"
c. Write a GreeterTester class that shows how the swapNames()
and the createQualifiedGreeter()
methods are used.
Write javadoc comments.
Include both java files in your solution document.
Here is the original greeter class code:
/**
A class for producing simple greetings. (Revised to include sayGoodbye)
*/
public class Greeter
{
/**
Constructs a Greeter object that can greet a person or
entity.
@param aName the name of the person or entity who should
be addressed in the greetings.
*/
public Greeter(String aName)
{
name = aName;
}
/**
Greet with a "Goodbye" message.
@return a message containing "Goodbye" and the name of
the greeted person or entity.
*/
public String sayGoodbye()
{
return "Goodbye, " + name + "!";
}
/**
Greet with a "Hello" message.
@return a message containing "Hello" and the name of
the greeted person or entity.
*/
public String sayHello()
{
return "Hello, " + name + "!";
}
private String name;
}
-----------------------------
Here is the original greeterTester code:
/**
A class for testing the methods of class Greeter.
*/
public class GreeterTester
{
/**
This method creates a greeter object and prints the strings
produced by calling both sayHello and sayGoodbye with that object.
@param args unused
*/
public static void main(String[] args)
{
Greeter worldGreeter = new Greeter("World");
String greeting = worldGreeter.sayHello();
System.out.println(greeting);
greeting = worldGreeter.sayGoodbye();
System.out.println(greeting);
}
}
In: Computer Science
Write in Java
The Vegetable class should have the usual constructors (default and parameterized), get (accessor) and set (mutator) methods for each attribute, and a toString method
Child classes should call parent methods whenever possible to minimize code duplication.
The driver program must test all the methods in the Vegetable class, and show that the new methods added to the Plant class can be called by each of the child classes. Include comments in your output to describe what you are testing, for example System.out.println(“testing Plant toString, accessor and mutator”);. Print out some blank lines in the output to make it easier to read and understand what is being output.
public class Plant {
private String name;
private String lifespan;
public Plant(){
name = "no name";
lifespan = "do not know";
}
public Plant(String newName, String newlife)
{
name = newName;
lifespan = newlife;
}
public String getName()
{
return name;
}
public String getlife()
{
return lifespan;
}
public void setName(String newName)
{
name = newName;
}
public void setLifeSpan(String newlife)
{
lifespan = newlife;
}
public void set(String newName, String newlife)
{
name = newName;
lifespan = newlife;
}
public String toString()
{
return "Name:"+name+"\nLifeSpan:"+lifespan;
}
}
In: Computer Science
I am to complete the following for Java but getting compiler errors...Implement a base class called Student that contains a name and major. Implement the subclass GraduateStudent, which adds a property called stipend.
Here is what I have for code with the compiler error following.
public class GraduateStudent extends Student {
private double stipend;
public GraduateStudent(String name, String major,
double stipend) {
super(name);
super(major);
this.stipend = stipend;
}
public void setStipend(double stipend) {
this.stipend = stipend;
}
public double getStipend() {
return stipend;
}
}
public class Student {
protected String name;
protected String major;
public Student(String name, String major) {
this.name = name;
this.major = major;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setMajor(String major) {
this.major = major;
}
public String getMajor() {
return major;
}
}
GraduateStudent.java:7: error: constructor Student in class Student cannot be applied to given types;
super(name);
^
required: String,String
found: String
reason: actual and formal argument lists differ in length
GraduateStudent.java:8: error: call to super must be first statement in constructor
super(major);
^
2 errors
[ERROR] did not compile; check the compiler stack trace field for more info
PROGRAM EXECUTION STACK TRACE
[ERROR] did not compile; check the compiler stack trace field for more info
YOUR CODE'S OUTPUT
| 1 | [ERROR] did not compile; check the compiler stack trace field for more info |
| 2 | |
| 3 | false |
In: Computer Science