Two in-phase loudspeakers are located at (x, y) coordinates (-2.5 m, +2.0 m) and (-2.5 m,...

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...

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...

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...

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...

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 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...

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:

  1. 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.

  2. 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:

  1. This program returns (not prints!) a string.
  2. For this function and the other part of this lab you are required to put in a docstring. That will be checked by a TA/grader reading the program.
  3. Every one of the occurrences of triangle_char should have a single space after it, including the ones at the ends of lines.
  4. This is not too complex to write either using while or using for and range(). If you're comfortable with for() and range(), that might be a little easier.
  5. The two ways we thought of to do this are either using two loops, one nested inside the other, or using one loop and string multiplication.
  6. `\n' is the newline character. Your returned string should have triangle_char of them. (One at the end of every "line".)

In: Computer Science

For each of the following: draw a supply/demand graph for the currency market in question.  Label axes,...

  1. For each of the following: draw a supply/demand graph for the currency market in question.  Label axes, the supply and demand curves, and equilibrium exchange rate.  Then show and explain with words what will happen to the market after the shock described.  Include the effect on the foreign exchange rate.  Explain.

  1. The market for Russian Rubles.  Foreigners significantly increase their tourism/travel into Russi
  2. The market Japanese Yen. Japanese imports from the United States increase significantly.
  3. The market for European Euros.  The EU lowers its interest rate.
  4. The market for Mexican Pesos.  Investors speculate that the Peso will soon appreciate.
  5. The market for British pounds.  Brexit scares investors, so investors leave the UK.
  6. The market for Korean won.  Americans buy many more Korean cars.

In: Economics

The Kimm Company had the following assets and liabilities on the dates indicated. Kimm began business...

The Kimm Company had the following assets and liabilities on the dates indicated.
Kimm began business on January 1, 2013, with an investment of $600,000 (60,000 shares, par value = $10).

December 31

Total Assets

Total Liabilities

2013

$1,700,000

300,000

2014

1,900,000

100,000

2015

2,500,000

1,700,000

  1. In 2013, Kimm paid $50,000 dividends and no additional investment was made. Other comprehensive income was $1,000
  2. In 2014, Kimm paid $100,000 dividends, additional investment of $200,000 (20,000 shares, par value = $10) was made by shareholders on September 1, 2014. Other comprehensive income (loss) was $(2,000).
  3. In 2015, Kimm had zero dividends and no additional investment was made. Other comprehensive income (loss) was $(500,000).

P1. Determine net income in 2013, 2014 and 2015. (Show work clearly)

P2. Determine basic earnings per share in 2013, 2014 and 2015. (Show work clearly)

P3. Determine comprehensive income in 2013, 2014 and 2015. (Show work clearly)

P4. Determine the balance of retained earnings at the end of 2015. (Show work clearly)

P5. Determine the balance of common stock at the end of 2015. (Show work clearly)

P6. Determine the balance of accumulated other comprehensive income at the end of 2015. (Show work clearly)

Hint : Use Equity = CS +RE+AOCI, along with A = L + E. No preferred stock (thus no preferred div, net income to common stockholders = net income)

In: Accounting

Using kinematic relation s = v_0t +(1/2)at^2 , I got the 2 equations: 172.8m = 5.682V_0...

Using kinematic relation s = v_0t +(1/2)at^2 , I got the 2 equations: 172.8m = 5.682V_0 + 16.143a and 140.3m = 4.930V_0 + 12.152a. How do I get Initial velocity and acceleration out of that? m=meters and t is seconds

In: Physics

In conducting interviews and observing factory operations to implement an activity-based costing system, you determine that...

In conducting interviews and observing factory operations to implement an activity-based costing system, you determine that several activities are unnecessary or redundant. For example, warehouse personnel was inspecting purchased components as they were received at the loading dock. Later that day, the components were inspected again on the shop floor before being installed in the final product. Both of these activities caused costs to be incurred but were not adding value to the product. If you include this observation in your report, one or more employees who perform inspections will likely lose their jobs. Page 804 Required As a plant employee, what is your responsibility to report your findings to superiors? Should you attempt to determine if the redundancy is justified? Explain. What is your responsibility to the employees whose jobs will likely be lost because of your report? What facts should you consider before making your decision to report or not??

Please do not answer in jpg format. kindly use word or txt.

In: Accounting

Determine the magnitude of the electric field at the surface of a lead-206 nucleus, which contains...

Determine the magnitude of the electric field at the surface of a lead-206 nucleus, which contains 82 protons and 124 neutrons. Assume the lead nucleus has a volume 206times that of one proton and consider a proton to be a sphere of radius 1.20 ? 10-15 m.  ??? N/C

In: Physics

The neutralization of 50.0 mL of 1.00 M hydrochloric acid with 50.0 mL of 1.00 M...

The neutralization of 50.0 mL of 1.00 M hydrochloric acid with 50.0 mL of 1.00 M sodium hydroxide causes a 6.7°C increase in temperature. Predict how the following changes to the experimental protocol would affect the value of the change in temperature.

The temperature change depends on the moles of water produced (moles of reaction) and the mass of the solution. Assume that the density of each solution is 1.0 g/mL.
a. using 100.0 mL of 1.00 M hydrochloric acid and 100.0 mL of 1.00 M sodium hydroxide
b. using 50.0 mL of 2.00 M hydrochloric acid and 50.0 mL of 2.00 M sodium hydroxide
c. using 25.0 mL of 1.00 M hydrochloric acid and 75.0 mL of 1.00 M sodium hydroxide
d. using 25.0 mL of 1.00 M sulfuric acid and 75.0 mL of 1.00 M sodium hydroxide (Be careful. Think about the value of n!)

In: Chemistry

What are the changes in thoracic volume and sequence of events during inspiration and expiration? Explain....

What are the changes in thoracic volume and sequence of events during inspiration and expiration? Explain.

Note: Please write or type all answers in a way that is understandable and legible. hank you for taking the time to answer my question!

In: Biology

According to researchers at Stanford Medical School (as cited in Medical Self Care), the ideal weight...

According to researchers at Stanford Medical School (as cited in Medical Self Care), the ideal weight for a woman is found by multiplying her height in inches by 3.5 and subtracting 108. The ideal weight for a man is found by multiplying his height in inches by 4 and subtracting 128. Using PHP and HTML 5, design and build a web page that calculates the ideal weight given the person’s gender and height. The user selects the gender from a drop down list and enters the height in a text box. Your PHP script should read all the input and calculate and display the ideal weight.

In: Computer Science