Questions
Identify all private and shared variables in the following code snippet. What is the output of...

Identify all private and shared variables in the following code snippet. What is the output of the program (e.g. the value of res)?

// =========

int A[100];

int count;

void work(int index[])

{

float B[10];

……

}

void main(){

int res = 10;

#pragma omp parallel  

{

int index[10], i=0, IS=0;

                        work(index);

                        #pragma omp for

                        for(i=0;i<100;i++)

                        {

IS = IS + i;

                        }

#pragma omp critical

res += IS;

}

cout << res << endl;

}

View keyboard shortcuts

In: Computer Science

"How can guilt or innocence have little or no importance to death sentences?" (Philosophy)

"How can guilt or innocence have little or no importance to death sentences?" (Philosophy)

In: Psychology

Sales (7,000 safety checks) $560,000 Production costs (7,010 safety checks) Direct labor 392,560 Shop overhead Variable...

Sales (7,000 safety checks) $560,000

Production costs (7,010 safety checks)

Direct labor 392,560

Shop overhead

Variable 89,728

Fixed 56,080

Operating expenses

Variable 16,824

Fixed 12,800

c. Assume that you must decide quickly whether to accept a special one-time order for 20 safety checks on local police cars for $64 per safety check. Which income statement presents the most relevant data? Answer Determine the apparent profit or loss on the special order based solely on these data. Use a negative sign with your answer if the special order creates an apparent loss. Round answer to the nearest whole number.

In: Accounting

Explain two interpretations of the 2nd amendment. Which do you agree with and why?

Explain two interpretations of the 2nd amendment. Which do you agree with and why?

In: Operations Management

1)​ ​Masaru Ibuka, founder and chairman of Japan's Sony Corp, was asked in an interview, "What...

1)​ ​Masaru Ibuka, founder and chairman of Japan's Sony Corp, was asked in an interview, "What is the secret of your success?" He said he had a ritual.
Preceding a business decision, he would drink herbal tea. Before he drank, he asked himself, "Should I make this deal or not?" If the tea gave him indigestion, he wouldn't make the deal. "I trust my gut, and I know how it works," he said.
"My mind is not that smart, but my body is."
"My mind is not that smart, but my body is"​,​ which way of thinking does this quote reflects? Explain your answer. .
Is it always right to do so? If not, what is the other way of thinking to be followed? .

2) When German car manufacturer Volkswagen (VW) was discovered in 2015 to have cheated on emissions test, the company’s reputation was very badly affected. The company’s employees reported a drop in trust for their company. It was the first time this happens. ​VW
Employees’ feelings have changed as VW won
back the respect of its personnel
What is the type of problem Volkswagen was facing? Why? ​And ​how this problem was solved?
made sure that everyone knew what happened and also what would happen next. The company
also publicly admitted guilt. VW encouraged employees to express their feelings and concerns.
Volkswagen’s efforts seem to have paid off. ​
​and its image among the public also ​seems to have recovered.

In: Operations Management

This is an Inorganic C question. Answer all parts and show all work for full credit....

This is an Inorganic C question. Answer all parts and show all work for full credit.

7. The bond angles of NH3, PH3, and AsH3 are 106.6°, 93.7°, 92.8°, respectively.  

    1. Briefly describe what may be causing the difference in these angles.
    1. Your fellow classmate wrote for part of his answer for 2a above is: “the lone pair is bigger for As than for P than for N.”  Based on your answer to 2a, is his statement correct? Explain why or why not.

In: Chemistry

Suppose individual X scores in the population follow a normal distribution N(38, 20). A researcher draws...

Suppose individual X scores in the population follow a normal distribution N(38, 20). A researcher draws numerous samples of sample size n = 100 from the population, and in each sample, she calculates the sample mean. Then 68% of these sample means should approximately fall within Group of answer choices (A) 34 and 40 (B) 34 and 38 (C) 38 and 44 (D) 36 and 40

In: Math

I want answers of the following questions My lab assingment: its a program written in netbean...

I want answers of the following questions

My lab assingment:

its a program written in netbean ide 8.2

My topic: Bank Account

Program code:

class Account{
int acc_no;
String name;
float amount;
void insert(int a,String n,float amt){
acc_no=a;
name=n;
amount=amt;
}
void deposit(float amt){
amount=amount+amt;
System.out.println(amt+" deposited");
}
void withdraw(float amt){
if(amount<amt){
System.out.println("Insufficient Balance");
}else{
amount=amount-amt;
System.out.println(amt+" withdrawn");
}
}
void checkBalance(){System.out.println("Balance is: "+amount);}
void display(){System.out.println(acc_no+" "+name+" "+amount);}
}

class TestAccount{
public static void main(String[] args){
Account a1=new Account();
a1.insert(832345,"Ali",1000);
a1.display();
a1.checkBalance();
a1.deposit(40000);
a1.checkBalance();
a1.withdraw(15000);
a1.checkBalance();
}}


Task: Each one of you was given a Lab assignment of choosing a real world object to be represented as a programming object and writing a class code for that object. You have been asked to mimic at least 3 states and 3 behaviors of that object.

Your theory assignment is to provide the detail analysis on your part while you selected and mimic that object in programing language. You are to provide brief insight and analysis you have done in each the following:

1. What was your inspiration to choose that object?

2. Which 3 states you choose and why?

3. Do all the behaviors correspond directly to your states or not?

4. What were the challenges you faced with selecting the object?

5. If you were to asked to choose another object, which object will you choose and why?

In: Computer Science

The dominant culture in the US can be described in many fashions. From a sociological standpoint...

The dominant culture in the US can be described in many fashions. From a sociological standpoint we suggest the dominant culture often reflects the dominant group in society. Dominance in this case is based on social, economic, and political power, not the size of the group. We will discuss more about dominant culture and subcultures in class this week. The dominant culture in the US would be white, European descent. Aspects of the dominant culture are present all over society. What I would like you to do for this assignment is to discuss aspects of culture that are not from the dominant group. Pick at least 2 cultural items, that you interact with on a regular basis, that come from a subculture or counter-culture. A great example of this would be food. Many types of American food are from other cultures. Many people like to eat Mexican, Indian, Thai, or other types of food. These are cultural elements that are not from the dominant US culture. Music, movies, language, etc. could be examples for some of you.

In: Psychology

The client needs this program written in Java. Your team is tasked to create a program...

The client needs this program written in Java. Your team is tasked to create a program that converts Fahrenheit to Celsius. Fahrenheit temperature of 87.6 degrees. Convert it to Celsius, and display the temperature in both units. Your output should look similar to the following:

Fahrenheit Temperature: 87.6
Celsius Temperature: 30.88

In: Computer Science

Define and explain naturalistic methodology. How is it different from a naturalistic cosmology (theory of how...

Define and explain naturalistic methodology. How is it different from a naturalistic cosmology (theory of how the universe began) and worldview?

In: Psychology

Identify the four sides of sustainable development and provide one example of each.

Identify the four sides of sustainable development and provide one example of each.

In: Operations Management

How would you find if numbers in an array element add up to a certain sum...

How would you find if numbers in an array element add up to a certain sum so for example if my array element consists of:

INPUT: 200, 10, 50, 20

and my output asks if these elements add to:

210? YES (200+10)

260? YES (200+10+50)

30? NO

What method would you suggest to look through the elements in an array (which im going to add through a text file) and determine if these sums exist in O(n^2)?

In: Computer Science

1) Fun Colors Inc. is a firm selling supplies for home improvement and decorating projects. At...

1) Fun Colors Inc. is a firm selling supplies for home improvement and decorating projects. At their founding in 1920, they chose to compete in the market by ensuring high product availability and variety. To support this strategy, they decided to keep 1-gallon cans of 75 different colors in the store with sufficient inventory that they would be able to meet customer demand for any color 98% of the time. A marketing study had shown that the demand for each color was more or less the same and independent of each other. The weekly demand forecast per color followed a normal distribution with a mean of 100 cans/week and a standard deviation of 40. The store ordered each colors from the factory located in Cincinnati, and the delivery time was around 2 weeks. Fun Colors paid $3.50/can.

a) How much safety stock of each color was required to support Fun Colors planned availability? (10 points)

b) Cost of capital for Fun Colors is 20% per year. What was Fun Colors’ annual holding cost for safety stock across all colors?

c) Shortly after Fun Colors entered the market, the industry’s technology changed tremendously. The competition was now implementing a new technology that enabled instant in-store customization of a color from one base-tone paint. To match the competition, Fun Colors examined switching to this new method of customization. To implement it, they would need to lease the mixing equipment. They would then stock a single base tone. (The dyes for coloring the base were produced locally and would only require a trivially small amount of in-store inventory.) The base paint would cost $3.50/gallon. Since the delivery for the base color would again be from Cincinnati, the lead-time would be 2 weeks.

There is a single vendor leasing the mixing equipment. What is the maximum Fun Colors should be willing to pay per month to lease the new machine?

In: Operations Management

This is my last assignment in a programming class I had to take as a prerequisite...

This is my last assignment in a programming class I had to take as a prerequisite for a database course (seems odd). The instructor has been awful and I haven't learned much of anything. I use VBA at work and just can't follow C++. I'm stuck on this assignment and have no idea what I'm doing. I'm a database guy at work, I'm not a programmer. Please help.

In C++, a program that performs the following tasks:

1.      Design a Book class that has three data members:

string title

int   pages

double price

2.      Add constructors and methods (as well as method parameters when necessary):

Book()         // constructor(s)

getBookInfo()   // print title, pages, price

setPrice()     // change price

3.      In the main() function, create two Book objects:

b1("C++ Programming", 834, 93.53)

b2("Data Structures", 217, 64.42)

4.      Change the price of b2 to 55.46 using the setPrice() method.

5.     Using cout, Print out book information using the getBookInfo() method as shown below:

C++ Programming 834 93.53

Data Structures 217 55.46

IN C++, a program that performs the following tasks:

1.      Derive a TextBook class (child) from the Book class (parent).

2.      Add new data members:

string school

double discount

3.      Add new constructors and methods (as well as method parameters when necessary):

TextBook()           // constructor(s)

compTextBookPrice()  // price = price - discount

4.      Override inherited methods:

getBookInfo()        // print title, pages, price, school, discount

5.      In the main() function, create two Book objects and two TextBook objects:

b1("C++ Programming", 834, 93.53)

b2("Data Structures", 217, 64.42)

tb1("Database", 365, 74.41, "YSU", 20.00)

tb2("Networks", 522, 92.58, "YSU", 20.00)

6.      Using cout, print out book information as shown below:

C++ Programming  834  93.53

Data Structures  217  64.42

Database         365  54.41 YSU 20.00

Networks         522  72.58 YSU 20.00

In: Computer Science