public static BagInterface<String> intersection (BagInterface<String> bagA, BagInterface bagB) This method must return a new bag which...

public static BagInterface<String> intersection (BagInterface<String> bagA, BagInterface bagB)

This method must return a new bag which is the intersection of the two bags: bagA and bagB. An element appears in the intersection of two bags the minimum of the number of times it appears in either. For example, {1,1,2} ∩{1,1,2,2,3}= {1,1,2}. Do not forget to state the big Oof your method implementation.

two file java main and test

by netbeans java

data structure and algorithem

In: Computer Science

Create a research paper that lists and explains the methods available to a business for opening...

Create a research paper that lists and explains the methods available to a business for opening a business in a foreign country. In other words, what avenues can be sued to enter the market in another country. Do some research being attentive to APA source citation and referencing guidelines.

In: Operations Management

QUESTION 1. Kroger management and Meijer management decide to have a sit down face to face...

QUESTION 1. Kroger management and Meijer management decide to have a sit down face to face meeting. The Kroger people agree NOT to open any stores north of the stores in Midland and Mt. Pleasant. Further, any new stores that will be opened in Michigan will not be within 12 miles of any Meijer Stores. In exchange, Meijer agrees NOT to open any stores in Indiana. Further, Meijer agrees NOT to open any stores west of the western border of Ohio and to stay out of the Southwest area of Michigan from St. Joe’s to Big Rapids.

You work for IGA and you hear rumors about this agreement between your competitors. You consult with your friends at Wal-Mart and they have not only heard the same rumors, but, they have obtained documentation evidencing the agreement. You, acting on behalf of IGA as well as a rep from Wal-Mart, contact Tom Terrific, (TT), your favorite anti-trust attorney. Please share with us what advice he gave you as well as any specific cases, statutes, or principals of law in support of the attorney’s position.

In: Operations Management

C Programming Language Question The following program sums up a number from a user input argv[1]...

C Programming Language Question

The following program sums up a number from a user input argv[1] by using a single thread. For example, argv[1] of 100 is going to give us a sum of 5050 using just a single thread.

I need to modify it so that it takes 2 command lines args, argv[2] for number of threads. In other words, the program needs to use multi-threads to solve it. The number of threads is going to divide the work between them and then join together to sum the numbers.

For example, a command line of 100 10 will give us a sum of 5050 using 10 threads.

#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>

int sum; // this data is shared by the threads
void *runner(void *param); // threads call this function

int main(int argc, char *argv[])
{
pthread_t tid; // thread identifier
pthread_attr_t attr; // set of thread attributes

// set the default attributes of the thread
pthread_attr_init(&attr);
// create the thread
pthread_create(&tid, &attr, runner, argv[1]);
// wait for the thread to exit
pthread_join(tid, NULL);

printf("Sum = %d\n", sum);
}

void *runner(void *param)
{
int i, upper = atoi(param);
sum = 0;

for (int i = 1; i <= upper; i++)
sum += i;

pthread_exit(0);
}

In: Computer Science

Using initial rate, in Chemical Kinetics, what is the missing number in the table? No other...

Using initial rate, in Chemical Kinetics, what is the missing number in the table? No other information is given. Could you also please explain how you got the answer? I will rate your answer. :D

[A] M Initial Rate (M/s)

0.100

0.00160
0.200 0.0128
0.300 0.0432
0.400 0.102
0.250 ???????

Thanks in advance.

In: Chemistry

what do you think are some factors that allowed this system of racial control to simply...

what do you think are some factors that allowed this system of racial control to simply evolve and replicate itself for the 150 years?

In: Psychology

Low birth weights are considered to be less than 2500 g for newborns. Birth weights are...

Low birth weights are considered to be less than 2500 g for newborns. Birth weights are normally distributed with a mean of 3150 g and a standard deviation of 700 g.

a) If a birth weight is randomly selected what is the probability that it is a low birth weight?

b) Find the weights considered to be significantly low using the criterion of a probability of 0.02 or less. That is, find the weight ranked as the lowest 2%.

c) Find the weight ranked as the highest 2%

d) Find the probability of a birth weight between 2600 g and 3500 g.

In: Math

IN JAVA Create an array and add random values to it, and then find the sum...

IN JAVA

Create an array and add random values to it, and then find the sum of the values using recursion.

In: Computer Science

Is the Calphalon acquisition a way to enhance Newell's capabilities, or a violation of its strategy?...

Is the Calphalon acquisition a way to enhance Newell's capabilities, or a violation of its strategy? Will the same strategy that worked well in the past work here? The strategy is the cost leadership strategy.

In: Operations Management

Balloons By Sunset (BBS) is considering the purchase of two new hot air balloons so that...

Balloons By Sunset (BBS) is considering the purchase of two new hot air balloons so that it can expand its desert sunset tours. Various information about the proposed investment follows:  

Initial investment (for two hot air balloons) $ 338,000
Useful life 8 years
Salvage value $ 42,000
Annual net income generated 31,434
BBS’s cost of capital 11 %


Assume straight line depreciation method is used.
  

Required:
Help BBS evaluate this project by calculating each of the following:  

1. Accounting rate of return. (Round your answer to 1 decimal place.)

        

2. Payback period. (Round your answer to 2 decimal places.)

         

3. Net present value (NPV). (Future Value of $1, Present Value of $1, Future Value Annuity of $1, Present Value Annuity of $1.) (Use appropriate factor(s) from the tables provided. Do not round intermediate calculations. Negative amount should be indicated by a minus sign. Round the final answer to nearest whole dollar.)

         

4. Recalculate the NPV assuming BBS's cost of capital is 14 percent. (Future Value of $1, Present Value of $1, Future Value Annuity of $1, Present Value Annuity of $1.) (Use appropriate factor(s) from the tables provided. Do not round intermediate calculations. Negative amount should be indicated by a minus sign. Round the final answer to nearest whole dollar.)

    

In: Accounting

Why is it important that materials handling be aligned with an organization’s objectives, customers, and products?...

  1. Why is it important that materials handling be aligned with an organization’s objectives, customers, and products?
  2. Please use example to explain what environmentally friendly packaging mean? How should a firm adopt the environmentally friendly packaging strategies?

In: Operations Management

Answer the following questions about computer operating systems: 1. Which of the following conditions must exist...

Answer the following questions about computer operating systems:

1.

Which of the following conditions must exist for deadlock to occur?

Group of answer choices

All of these.

No preemption

Circular wait

Hold and wait

Mutual exclusion

2.

Which of the following is not a method for dealing with deadlock?

Group of answer choices

deadlock prevention

deadlock deletion

deadlock detection and recovery

deadlock avoidance

3.

A state where deadlock might occur is known as a(n) ________________.

Group of answer choices

safe state

dead state

unsafe state

critical state

4.

A resource allocation graph can indicate if deadlock might occur if there is a _______________ in the graph.

Group of answer choices

bear

cycle

detached subgraph

petri net

In: Computer Science

Sudject: Music. Hello I want to do the piano. Find and submit ten (10) Web sites...

Sudject: Music. Hello I want to do the piano.

Find and submit ten (10) Web sites related to ONE instrument you'd like to research. You may choose from any of the instruments featured in the course. Examples of valid instruments include (but are not limited to): the oboe, the mezzo-soprano voice, and the guitar.

Your submission must include:

Two sites for each one of the categories listed below

A short paragraph presenting your research in each category

The categories are:

History and/or Manufacturers:
Information about well-known makers and the instrument's history. If you choose the voice as your instrument, concentrate on its history.

Two Famous Performers for your Instrument:
Do not restrict yourself to any particular period or style. For example, if your favorite instrument is guitar, you may choose Eric Clapton and John Williams.

Two Famous composers for your Instrument:
Again, do not restrict yourself to any particular period or style. An example of a relevant web site is the Leonard Bernstein site at the Library of Congress. Did Bernstein write any pieces for your favorite instrument?

Six Repertoire Pieces for your Instrument and their Composers' Names:
What are the most famous pieces written for your chosen instrument? Submit a list of six famous pieces written for the instrument, and two (2) sites that were sources for the information. Here's a site that might help: www.naxos.com.

Two Famous Symphony Orchestras:
Your favorite instrument will likely be part of a traditional symphony orchestra, such as the one you studied in the Orchestral Timbres class. This should not be confused with a piece of music called a symphony, or a concerto, which is a piece of music for a solo instrument and orchestra. I am looking for the performing group. Please submit and comment on two (2) symphony orchestra websites. Even if the instrument you choose is not a regular member of the symphony orchestra, search two symphony orchestra websites and include what you find in your report.

In: Psychology

In Euripides Medea, which moments, scenes, and ideas contributed to your understanding of your own culture...

In Euripides Medea, which moments, scenes, and ideas contributed to your understanding of your own culture and the values of your society? In what ways? Be specific

In: Psychology

The best IT support technicians are the ones who continually teach themselves new skills. You can...

The best IT support technicians are the ones who continually teach themselves new skills. You can teach yourself to use and support Windows by using the web, a couple of apps in Windows 10 called Get Help and Tips, or the Windows Help and Support utility in Windows 8/7. To start the apps in Windows 10, type get help in the search box or type tips in the search box. In Windows 8, type Help and Support on the Start screen. In Windows 7, click Start and then click Help and Support. If you are connected to the Internet, clicking links can take you to the Microsoft website, where you can find information and watch videos about Windows.

Do the following to research a topic so you can become an independent learner about Windows:

1. The Windows 10/8/7 Snipping Tool can help you take screenshots of the Windows desktop. These screenshots are useful when documenting computer problems and solutions. Use Get Help or Windows Help and Support to find out how to use the Snipping Tool. Use it to take a screenshot of your Windows desktop. Save the screenshot into a file on a USB flash drive or on the hard drive. Print the file contents.

2. Access the support.microsoft.com website for Windows support. Save or print one article from the Knowledge Base that addresses a problem when installing Windows 10/8/7.

3. Search the web to learn the purpose of the pagefile.sys file. What website did you use to find your answer? Why is the Microsoft website considered the best source for information about the page file sys file?

In: Computer Science