System.out.println("Enter a temperature in Fahrenheit:
");
double fahrenheit = input.nextDouble();
double celsius = (5.0 / 9) * (fahrenheit - 32);
System.out.println("Fahrenheit " + fahrenheit + " is "
+ celsius + " in Celsius");
the above code i would like to print to 2 decimal places for celsius please
this is in JAVA
In: Computer Science
in Java, I need to create an array of animals. The user is going to be prompted to enter the size of the array where a valid size is 10-30(inclusive). Then I have to populate only half of this array. I am not sure how to do that so can you please write comments explaining.
Thank you
In: Computer Science
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)
In: Psychology
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?
In: Operations Management
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.
7. The bond angles of NH3, PH3, and AsH3 are 106.6°, 93.7°, 92.8°, respectively.
In: Chemistry
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 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
In: Psychology
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 the universe began) and worldview?
In: Psychology
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 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