You may need to use the appropriate appendix table or technology to answer this question. The state of California has a mean annual rainfall of 22 inches, whereas the state of New York has a mean annual rainfall of 42 inches. Assume that the standard deviation for both states is 4 inches. A sample of 32 years of rainfall for California and a sample of 48 years of rainfall for New York has been taken.
b.What is the probability that the sample mean is within 1 inch of the population mean for California? (Round your answer to four decimal places.)
c.What is the probability that the sample mean is within 1 inch of the population mean for New York? (Round your answer to four decimal places.)
d.In which case, part (b) or part (c), is the probability of obtaining a sample mean within 1 inch of the population mean greater? Why?
In: Math
1. According to the Ricardian equivalence theorem, an increase in government spending (G) would:
Increase aggregate demand as consumer spending would not change
Decrease aggregate demand as consumer spending would decrease more than the increase in G
Not change aggregate demand as consumer spending would decrease by the opposite amount as the increase in G
Not change aggregate demand as household savings would decrease
2. From a functional finance perspective, when the economy is in an inflationary gap the government should:
do nothing
run a deficit
run a surplus
run a balanced budget
In: Economics
explain 8 specific example in which lifestyle and the environment contribute to diseases
In: Biology
Define each of them and show the process of solving them with Excel.
What is critical value/standardized test statistic z/standardized test statistic t/P-value?
In: Math
Draw and explain the P-V graph for both adiabatic and isothermal processes and explain the difference.
In: Physics
Apex Computing is preparing for a Secret Santa gift exchange. Certain information will be gathered from each employee. Although it would be more realistic to write a program that asks a user for input, this program will just be a practice for using structures and functions so we will create the information by assigning values to the variables.
Write a program that uses a structure named EmpInfo to store the following about each employee:
Name
Age
Favorite Food
Favorite Color
The program should create three EmpInfo variables, store values in their members, and pass each one, in turn, to a function that displays the information in a clear and easy-to-read format. (Remember that you will choose the information for the variables.)
Here is an example of the output:
Name………………………………Mary Smith
Age ……………………………….. 25
Favorite food ………………… Pizza
Favorite color ……………….. Green
In: Computer Science
NEED TO BE IN PYTHON!!!
Make sure to put the main section of your code in the following if
block:
# Type code for classes here
if __name__ == "__main__":
# Type main section of code here
(1) Build the Account class with the following specifications:
Attributes
Create a constructor that has 3 parameters (in addition to self) that will be passed in from the user. (no default values)
Define a __str__() method to print an Account like the following
Account Name: Trish Duce
Account Number: 90453889
Account Balance: $100.00
Define a deposit() method that has 1 parameter (in addition to self) that will be passed in from the user. (no default values) The method deposits the specified amount in the account.
Define a withdraw() method that has 2 parameters (in addition to self) that will be passed in from the user. (no default values) The method withdraws the specified amount (1st parameter) and fee (2nd parameter) from the account.
(2) In the main section of your code, create 3 accounts.
(3) Print the 3 accounts using print(acct1)…
(4) Deposit 25.85, 75.50 and 50 into accounts 1, 2 and 3.
(5) Print the 3 accounts.
(6) Withdraw 25.85 (2.50 fee), 75.50 (1.50 fee), 50.00 (2.00 fee).
(7) Print the 3 accounts.
Output should look like the following:
Account Name: Trish Duce
Account Number: 90453889
Account Balance: $100.00
Account Name: Donald Duck
Account Number: 83504837
Account Balance: $100.00
Account Name: Joe Smith
Account Number: 74773321
Account Balance: $100.00
Account Name: Trish Duce
Account Number: 90453889
Account Balance: $125.85
Account Name: Donald Duck
Account Number: 83504837
Account Balance: $175.50
Account Name: Joe Smith
Account Number: 74773321
Account Balance: $150.00
Account Name: Trish Duce
Account Number: 90453889
Account Balance: $97.50
Account Name: Donald Duck
Account Number: 83504837
Account Balance: $98.50
Account Name: Joe Smith
Account Number: 74773321
Account Balance: $98.00
In: Computer Science
You will use the definition of the linked-queue from lab6, and re-write it as a template for a linked-queue (I hope you finished the function definitions)
In the driver file, create and use queues of different types to show it works.
In the documentation, indicate if there are any types it won’t work for, and why not.
driver.cpp
#include <iostream>
using namespace std;
#include "LQueue.h"
void print(Queue q)
{
q.display(cout);
}
int main()
{
Queue q1;
cout << "Queue created. Empty? " << boolalpha <<
q1.empty() << endl;
cout << "How many elements to add to the queue? ";
int numItems;
cin >> numItems;
for (int i = 1; i <= numItems; i++)
q1.enqueue(100 * i);
cout << "Contents of queue q1 (via print):\n";
print(q1); cout << endl;
Queue q2;
q2 = q1;
cout << "Contents of queue q2 after q2 = q1 (via
print):\n";
print(q2); cout << endl;
cout << "Queue q2 empty? " << q2.empty() <<
endl;
cout << "Front value in q2: " << q2.front() <<
endl;
while (!q2.empty())
{
cout << "Remove front -- Queue contents: ";
q2.dequeue();
q2.display(cout);
}
cout << "Queue q2 empty? " << q2.empty() <<
endl;
cout << "Front value in q2?" << endl <<
q2.front() << endl;
cout << "Trying to remove front of q2: " << endl;
q2.dequeue();
return 0;
}
LQueue.h
#include <iostream>
#ifndef LQUEUE
#define LQUEUE
typedef int QueueElement;
class Queue
{
public:
/***** Function Members *****/
/***** Constructors *****/
Queue();
/*-----------------------------------------------------------------------
Construct a Queue object.
Precondition: None.
Postcondition: An empty Queue
object has been constructed.
(myFront and myBack are initialized to null pointers).
-----------------------------------------------------------------------*/
Queue(const Queue & original);
/*-----------------------------------------------------------------------
Copy Constructor
Precondition: original is the queue
to be copied and is received
as a
const reference parameter.
Postcondition: A
copy of original has been constructed.
-----------------------------------------------------------------------*/
/***** Destructor *****/
~Queue();
/*-----------------------------------------------------------------------
Class destructor
Precondition: None.
Postcondition: The linked list
in the queue has been deallocated.
-----------------------------------------------------------------------*/
/***** Assignment *****/
const Queue & operator= (const Queue &
rightHandSide);
/*-----------------------------------------------------------------------
Assignment Operator
Precondition: rightHandSide is the
queue to be assigned and is
received as a const reference parameter.
Postcondition: The
current queue becomes a copy of rightHandSide
and a reference to it is returned.
-----------------------------------------------------------------------*/
bool empty() const;
/*-----------------------------------------------------------------------
Check if queue is empty.
Precondition: None.
Postcondition: Returns true if
queue is empty and false otherwise.
-----------------------------------------------------------------------*/
void enqueue(const QueueElement & value);
/*-----------------------------------------------------------------------
Add a value to a queue.
Precondition: value is to be
added to this queue.
Postcondition: value is added at
back of
queue.
-----------------------------------------------------------------------*/
void display(ostream & out) const;
/*-----------------------------------------------------------------------
Display values stored in the queue.
Precondition: ostream out is
open.
Postcondition: Queue's contents,
from front to back, have been
output to out.
-----------------------------------------------------------------------*/
QueueElement front() const;
/*-----------------------------------------------------------------------
Retrieve/Peep value at front of queue (if
any).
Precondition: Queue is
nonempty.
Postcondition: Value at front of
queue is returned, unless the queue
is empty; in that case, an error
message is displayed and a
"garbage value" is
returned.
-----------------------------------------------------------------------*/
void dequeue();
/*-----------------------------------------------------------------------
Remove value at front of queue (if any).
Precondition: Queue is
nonempty.
Postcondition: Value at front of
queue has been removed, unless
queue is empty; in that case, an
error message is displayed
and execution allowed to
proceed.
-----------------------------------------------------------------------*/
private:
void delete_q(); // utility/helper function to delete queues
for
// destructor and assignment
operator
/*** Node class for the
queue***/
class Node
{
public:
QueueElement data;
Node * next;
//--- Node constructor
Node(QueueElement value, Node * link = 0)
/*-------------------------------------------------------------------
Precondition: value and link are received
Postcondition: A Node has been constructed with value in its
data part and its next part
set to link (default 0).
------------------------------------------------------------------*/
{
data = value; next = link;
}
}; //for Node class
typedef Node * NodePointer;
/***** Data Members *****/
NodePointer myFront, // pointer to
front of queue
myBack;
// pointer to back of queue
}; // end of class declaration
#endif
LQueue-Incomplete.cpp
#include <new>
using namespace std;
#include "LQueue.h"
//--- Definition of Queue constructor
Queue::Queue()
: myFront(0), myBack(0)
{}
//--- Definition of Queue copy constructor
Queue::Queue(const Queue & original)
{
myFront = myBack = 0;
if (!original.empty())
{
// Copy first node
myFront = myBack = new Node(original.front());
// Set pointer to run through original's linked
list
NodePointer origPtr = original.myFront->next;
while (origPtr != 0)
{
myBack->next = new
Node(origPtr->data);
myBack = myBack->next;
origPtr = origPtr->next;
} //while
} //if
}
void Queue::delete_q(void) {
// Set pointer to run through the queue
NodePointer prev = myFront, // node to be released/deleted
ptr; // points to the front node
while (prev != 0)
{
ptr = prev->next;
delete prev;
prev = ptr;
}
}
//--- Definition of Queue destructor
// delete queue from the front
Queue::~Queue()
{
delete_q();
}
//--- Definition of assignment operator
const Queue & Queue::operator=(const Queue &
rightHandSide)
{
if (this !=
&rightHandSide)
// check that not q = q
{
this->delete_q();
// destroy current linked list
if
(rightHandSide.empty()) //
empty queue
myFront = myBack = 0;
else
{
// copy rightHandSide's list
//
Copy first node
myFront = myBack = new
Node(rightHandSide.front());
// Set pointer to run through rightHandSide's
linked list
NodePointer rhsPtr =
rightHandSide.myFront->next;
while (rhsPtr != 0)
{
myBack->next = new
Node(rhsPtr->data);
myBack = myBack->next;
rhsPtr = rhsPtr->next;
}
}
}
return *this;
}
//--- Definition of empty()
bool Queue::empty() const
{
return (myFront == 0);
}
//--- Definition of enqueue()
void Queue::enqueue(const QueueElement & value)
{
NodePointer newptr = new Node(value);
if (empty())
myFront = myBack = newptr;
else
{
myBack->next = newptr;
myBack = newptr;
}
}
//--- Definition of display()
void Queue::display(ostream & out) const
{
NodePointer ptr;
for (ptr = myFront; ptr != 0; ptr = ptr->next)
out << ptr->data << " ";
out << endl;
}
//--- Definition of front()
// Peep the first element of the queue
QueueElement Queue::front() const
{
if (!empty())
return (myFront->data);
else
{
cerr << "*** Queue is empty "
" -- returning garbage ***\n";
QueueElement * temp = new(QueueElement);
QueueElement garbage = *temp;
// "Garbage" value
delete temp;
return garbage;
}
}
//--- Definition of dequeue()
// simply decrement the queue
void Queue::dequeue()
{
if (!empty())
{
NodePointer ptr = myFront;
myFront = myFront->next;
delete ptr;
if (myFront == 0) // queue is
now empty
myBack = 0;
}
else
cerr << "*** Queue is empty -- can't remove a
value ***\n";
}
In: Computer Science
A box with an inertia of 2kg is held on a 1m high table against a spring with k = 75N which is initially compressed 0.5m. The coefficient of friction between the box and the table is 0.2. The spring is released, and it pushes the box until it reaches its equilibrium length. At this point, the spring is stopped by a stopper and the box continues to slide across the table with only the force of friction acting on it. After losing contact with the spring, the box travels the distance of the rest of the table, another 0.5m, where it then flies off the end of the table and lands on the floor. Assuming no air resistance,
(a) What was the net work done on the box while it was being pushed by the spring?
(b) What was the net work done on the box from the time it left the spring until it reached the edge of the table?
(c) How fast was the box moving when it flew off the table?
(d) How far from the table did the box land?
In: Physics
Construction project requires an intial investment of $900,000,
has a nine-year life, and salvage value is Zero. Sales are
projected at 75,000 units per year. Price per unit is $47, variable
cost per unit is $34, and fixed costs are $825,000 per year. The
tax rate is 35%, and discount rate is 15%. Using straight-line
depreciation method:
1. Calculate the accounting break-even point in number of units,
what is the degree of operating leverage at the accounting
break-even point
2. Calculate the OCF, NPV
3. Calculate the financial break-even point in number of
units
In: Accounting
In: Biology
Q1) Pennell Company gathered the following information for the year ended December 31, 2014:
|
Fixed costs: |
|
|
Manufacturing |
$300,000 |
|
Marketing |
100,000 |
|
Administrative |
50,000 |
|
Variable costs: |
|
|
Manufacturing |
$230,000 |
|
Marketing |
90,000 |
|
Administrative |
100,000 |
During the year, Pennell produced and sold 70,000 units of product at a sale price of $15.00 per unit. There was no beginning inventory of product on January 1, 2014.
Required:
______________________________________________________________
Q2)Print House, Inc., produces and sells laser jet printers for $1,400 each. The variable costs of each printer total $1,000 while total annual fixed costs are $300,000. Company’s profit for 2008 is $200,000.
Required:
a) Compute the Company’s break-even point in units and dollars.
b) What is the Company’s margin of safety in units, dollars, and percentage?
c) Compute the Company’s Sales for 2008.
In: Accounting
1. When 100.0 mL of a 0.135 M Ca(NO3)2 (MM = 164.088 g/mol) solution is added to 50.0 mL of a 0.575 M K3PO4 (MM = 212.27 g/mol) solution, what mass of calcium phosphate (MM = 310.17 g/mol) will precipitate?
2. What is the final Na+ concentration if 17.0 mL of a 3.12 M NaCl solution is added to 83.0 mL of a 1.18 M Na2SO4 solution?
In: Chemistry
In: Chemistry
Hello,
How can we create two buttons in a single page side by side through html?And how can we enter different data for different buttons, so that if i click 1st button it should show specific data and if i click second it should show other data?
In: Computer Science