In: Physics
In your opinion, to be considered truly ‘ethical’ how should a retailer treat its employees? Give examples to support your arguments
In: Operations Management
The physical properties of soap depend on the very different water solubility of two ends of tghe same molecule. Normally, soap is the sodium salt of a long-chain carboxylic acid.
A. Explain, using structures and words, the observation that soap does not work properly in very low pH water, or hard water which has calcium and magnesium ions.
B. would a soap make from N,N,N-trimethyl octadecyl ammonium chloride (shown below) have the same problems as a long-chain carboxylic acid? Explain.
CH3-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-N+H3 CL-
In: Chemistry
In: Biology
Consider the titration of 50.00 mL of 0.100 M trimethylamine ( (CH3)3N, Kb = 6.25 x 10-5) with 0.100 M HI. Calculate the pH at the initial point.
In: Chemistry
Inequality. There are two types of labor in the economy: skilled labor Lsk and unskilled labor Lunsk. Skilled and unskilled labor earn different real wages: Wsk/P and Wunsk/P. The production function is given by
Y =Aln(Lsk)+4ln(Lunsk).
The parameter A reflects technology. The supply of skilled labor is
given by LSsk = Wsk/P and the
supply of unskilled labor is given by LSunsk = 10.
(A) Derive the demand functions for skilled and unskilled labor, LDsk and LDunsk. Sketch the equilibrium graphically on two diagrams: the market for skilled labor and the market for unskilled labor. Don’t worry about the precise shape of the curves.
(B) The level of technology A was 25, and during the last year it went up to 36. Find the original and the new equilibria (you need to calculate two levels of employment and two real wages). What is the direction of change in GDP? Re-draw the diagrams from part B to show how the increase in A affects the equilibrium on both markets. Clearly label all axes, shifts, and curves.
(C) As the American economy has been growing, income inequality has been rising too. In the context of this problem, is inequality in incomes of skilled an unskilled workers a “fair” outcome? If you were a policymaker, would you want to eliminate this kind of inequality?
In: Economics
The two stars in a certain binary star system move in circular orbits. The first star, Alpha, has an orbital speed of 36.0km/s. The second star, Beta, has an orbital speed of 12.0km/s. The orbital period is 137d.
What is the mass of the star Alpha?
What is the mass of the star Beta?
One of the best candidates for a black hole is found in the binary system called A0620-0090. The two objects in the binary system are an orange star, V616 Monocerotis, and a compact object believed to be a black hole. The orbital period of A0620-0090 is 7.75hours, the mass of V616 Monocerotis is estimated to be 0.67 times the mass of the sun, and the mass of the black hole is estimated to be 3.8times the mass of the sun. Assuming that the orbits are circular, find the radius of the orbit of the orange star.
Find the radius of the orbit of the black hole.
Find the orbital speed of the orange star.
Find the orbital speed of the black hole.
In: Physics
Two in-phase loudspeakers are located at (x, y) coordinates (-2.5 m, +2.0 m) and (-2.5 m, -2.0 m). They emit identical sound waves with a 2.5 m wavelength and amplitude a. Determine the amplitude of the sound at the five positions on the y-axis (x = 0) with y = 0.0 m, 0.5 m, 1.5 m, and 2.0 m.
In: Physics
I am giving you some code - with basically the main function and calling a a handful of functions (one I think I've kept so you can see an example - inserting new data into the binary tree) and then displaying the tree, etc.... so basically I want you to supply the code for the corresponding functions to be called.
#include<stdio.h>
#include<stdlib.h>
/* set the Tree Structure */
struct tree {
int data;
struct tree *left;
struct tree *right;
} *root = NULL, *node = NULL, *temp = NULL;
/* Function for INSERT NEW data into the Tree */
struct tree* insert(int key,struct tree *leaf) {
if(leaf == 0) {
struct tree *temp;
temp = (struct tree *)malloc(sizeof(struct tree));
temp->data = key;
temp->left = 0;
temp->right = 0;
printf("Data inserted!\n");
return temp;
}
else {
if(key < leaf->data)
leaf->left = insert(key,leaf->left);
else
leaf->right = insert(key,leaf->right);
}
return leaf;
}
/* Function for SEARCH data from Tree */
struct tree* search(int key,struct tree *leaf)
*****COMPLETE THIS PORTION OF THE CODE FOR THE SEARCH FUNCTION*****
/* Function for FIND MINimum value from the Tree */
struct tree* minvalue(struct tree *node)
*****COMPLETE THIS PORTION OF THE CODE FOR THE FIND THE MINIMUM VALUE FUNCTION*****
/* Function for FIND MAXimum value from the Tree */
struct tree* maxvalue(struct tree *node)
*****COMPLETE THIS PORTION OF THE CODE FOR THE FIND THE MAXIMUM VALUE FUNCTION*****
/* Function for PRINT binary tree in Preorder format */
void preorder(struct tree *leaf) {
*****COMPLETE THIS PORTION OF THE CODE FOR THE PRINT PREORDER FUNCTION*****
/* Function for PRINT binary tree in Inorder format */
void inorder(struct tree *leaf)
*****COMPLETE THIS PORTION OF THE CODE FOR THE PRINT INORDER FUNCTION*****
/* Function for PRINT binary tree in Postorder format */
void postorder(struct tree *leaf)
*****COMPLETE THIS PORTION OF THE CODE FOR THE PRINT POSTORDER FUNCTION*****
/* Function for DELETE node from the Tree */
struct tree* delete(struct tree *leaf, int key)
*****COMPLETE THIS PORTION OF THE CODE FOR THE DELETE A NODE FROM THE TREE FUNCTION*****
int main() {
int key, choice;
while(choice != 7) {
printf("1. Insert\n2. Search\n3. Delete\n4. Display\n5. Min Value\n6. Max Value\n7. Exit\n");
printf("Enter your choice:\n");
scanf("%d", &choice);
switch(choice) {
case 1:
printf("\nEnter the value to insert:\n");
scanf("%d", &key);
root = insert(key, root);
break;
case 2:
printf("\nEnter the value to search:\n");
scanf("%d", &key);
search(key,root);
break;
case 3:
printf("\nEnter the value to delete:\n");
scanf("%d", &key);
delete(root,key);
break;
case 4:
printf("Preorder:\n");
preorder(root);
printf("Inorder:\n");
inorder(root);
printf("Postorder:\n");
postorder(root);
break;
case 5:
if(minvalue(root) == NULL)
printf("Tree is empty!\n");
else
printf("Minimum value is %d\n", minvalue(root)->data);
break;
case 6:
if(maxvalue(root) == NULL)
printf("Tree is empty!\n");
else
printf("Maximum value is %d\n", maxvalue(root)->data);
break;
case 7:
printf("Bye Bye!\n");
exit(0);
break;
default:
printf("Invalid choice!\n");
}
}
return 0;
}In: Computer Science
C++ programming
Program 1:
Write a program that uses a structure to store the following weather data for a particular month:
Total Rainfall
High Temperature
Low Temperature
Average Temperature
The program should have an array of 12 structures to hold weather data for an entire year. When the program runs, it should ask the user to enter data for each month (the avg temperature should be calculated.) Once the data are entered for all the months, the program should calculate and display the average monthly rainfall, the total rainfall for the year, the highest and lowest temperatures for the year (and the months they occurred in), and the average of all the monthly average temperatures.
Input validation: only accept temperatures within the range between -100 and +140 degrees Fahrenheit.
Program 2:
Modify your program so it defines an enumerated data type with enumerators for the months (JANUARY, FEBRUARY, etc.). The program should use the enumerated type to step through the elements of the array.
User interface is important!
You should post pseudocode
Your code should have appropriate comments
Your code should be well-formatted, with camel case variables
Variables should be self-descriptive
Your code should have functions (besides main!)
Your functions should only do one thing
In: Computer Science
Can someone show me a working implementation, in C source code, of a Linux shell that will use shared memory for command execution using pipes that read data from the shared memory region?
For example: you type ls -1 | wc -l into the shell and it creates child processes that read from shared memory to execute those commands.
In: Computer Science
Exception Handling in Java
In addition to what we have learned from the course materials, there are other ways to categorize exceptions in Java such as checked and unchecked exceptions. Please conduct online research on these two categories, share what you find. Of these two kinds of exceptions (checked and unchecked), which method do you prefer? Which method is easier?
In: Computer Science
A 25-year maturity bond has a 8% coupon rate, paid annually. It sells today for $887.42. A 15-year maturity bond has a 7.5% coupon rate, also paid annually. It sells today for $899.5. A bond market analyst forecasts that in five years, 20-year maturity bonds will sell at yields to maturity of 9% and that 10-year maturity bonds will sell at yields of 8.5%. Because the yield curve is upward-sloping, the analyst believes that coupons will be invested in short-term securities at a rate of 7%.
a. Calculate the expected rate of return of the 25-year bond over the five-year period. (Do not round intermediate calculations. Round your answer to 2 decimal places.)
Expected rate of return% ?
b. What is the expected return of the 15-year bond? (Do not round intermediate calculations. Round your answer to 2 decimal places.)
Expected rate of return% ?
In: Finance
Using Python:
Part 1:
Write the following function in a file called listlab.py
list4(): This function takes four formal parameters. If all four inputs are of type int and/or float, return the largest of the four inputs. Otherwise, return a list containing the four input parameters. Remember the type() function from Chapter 2.2; you may also want to use max().
Notes:
Every function must have a docstring, and variable names other than input parameters and loop control variables must have meaningful names. We will be grading for this.
Do not put a call to your function at the bottom of the file.
Part 2:
Write a Python function `make_triangle(trianglechar, triangleheight) that will return a string with an isosceles right triangle based on the two formal parameters triangle_height giving the triangle height and triangle_char that gives the symbol to be printed.
Important notes:
In: Computer Science
In: Economics