Solve Quadratic Equation IN JAVA (static methods, parameters, arguments, Math functions)
Write a program that will print the real-valued solutions of a quadratic equation
ax^2+bx+c=0
For example:
Enter coefficient a: 1 Enter coefficient b: 10 Enter coefficient c: 2 The solutions are -0.2041684766872809, and -9.79583152331272
For another example:
Enter coefficient a: 1 Enter coefficient b: 2 Enter coefficient c: 3 The equation does not have real solution
The program should use the following methods.
b^2−4ac>=0
x = −b ± (√(b^2 − 4ac)) / (2a)
Notice that other than getCoeff() and the main() methods, methods should not interact with the user.
In: Computer Science
Which of the following quantities are constant for a projectile during it's flight?
Select all that are True.
a.y
b.v
c. vx
d. x
e. r
f. ay
g. vy
h. ax
In: Physics
19.26 A container holds 2.5 g of argon at a pressure of
8.0atm.
Part A
How much heat is required to increase the temperature by 100∘C at constant volume?
Express your answer to two decimal places and include the appropriate units.
Part B
How much will the temperature increase if this amount of heat energy is transferred to the gas at constant pressure?
19.53 A 10 cm -diameter cylinder contains argon gas at 10 atm pressure and a temperature of 60 ∘C . A piston can slide in and out of the cylinder. The cylinder's initial length is 21 cm . 2500 J of heat are transferred to the gas, causing the gas to expand at constant pressure.
Part A
What is the final temperature of the cylinder?
Part B
What is the final length of the cylinder?
In: Physics
1. Research and summarize the different types of Ceremonial Speeches.
2. Research and create a graphic organizer of the differenttechniques for Ceremonial speaking.
In: Psychology
Calculate the pH of a 0.0164 M solution of arginine hydrochloride (arginine·HCl, H2Arg ). Arginine has pKa values of 1.823 (pKa1), 8.991 (pKa2), and 12.01 (pKa3).
Calculate the concentration of each species of arginine in the solution.
H3Arg2+
H2Arg+
HArg
Arg-
In: Chemistry
As you prepare to view Life + Debt which has been labeled as a poor documentary, since it shows just one side of the story and makes a caricature of what is a complex issue - that of globalization. This documentary continues the conceptualization of Third World countries as passive actors in the global political economy. However armed with your knowledge of the global economy, and the place that Third World now occupy, please answer the following question.
Identify possible products that should have been sold to the caribbean region, and internationally.
In: Economics
Write a program IN C that reads all integers that are in the range of 0 to 100, inclusive from an input file named: a.txt and counts how many occurrences of each are in the file. After all input has been processed, display all the values with the number of occurrences that were in are in the input file.
Note: The program ignores any number less than 0 or greater than 100.
Note: Do not display zero if a number is not in the file.
Hints: An array of size 101 is good enough. A number in the file plays the role of an index.
For example: Suppose the content of the file: a.txt is as
follows:
99 2 99
3
-12 80 12 33
3 99 100 1234 84
The display output is:
2 has occurred: 1 times
3 has occurred: 2 times
12 has occurred: 1 times
33 has occurred: 1 times
80 has occurred: 1 times
84 has occurred: 1 times
99 has occurred: 3 times
100 has occurred: 1 times
Note that this is just a sample dialog. Your program should work
for any number of data values and you MUST match
the sample dialog as well.
In: Computer Science
What are the primary and secondary muscles involved in a pull up, bent over barbell row, quadruped single arm row, and reverse fly (dumbbell)?
Please break up the muscles into primary and secondary groups and list the exact muscles instead of groups of muscles. Thank you!
In: Anatomy and Physiology
With the development of information technology, advertising is becoming more intrusive in our daily lives.
Discuss the pros and cons of advertising of medical and pharmaceutical products? Should the government impose more restrictions on advertising on these products? If so, under what conditions?
In: Economics
Visitors at a science museum are invited to sit in a chair to the right of a full-length diverging lens (f1 = -3.30 m) and observe a friend sitting in a second chair, 1.80 m to the left of the lens. The visitor then presses a button and a converging lens (f2 = +4.50 m) rises from the floor to a position 2.10 m to the right of the diverging lens, allowing the visitor to view the friend through both lenses at once. Find (a) the magnification of the friend when viewed through the diverging lens only and (b) the overall magnification of the friend when viewed through both lenses. Be sure to include the algebraic sign (+ or -) with your answers.
In: Physics
Please type MAX 2 sentences for each question.
1) Why did the US invade Iraq in 2003?
2) Why was Hurricane Katrina a national issue in 2005?
3) What were the highlights of the George W. Bush administration?
4) What were the highlights of Barack Obama's administration?
5) What issues divided liberals from conservatives in the early 2000s?
In: Economics
A 0.30-kg ball is thrown with a speed of 7.0m/s at an upward angle of 23?. Use conservation of energy
Part A
What is its speed at its highest point?
Part B
How high does it go?
In: Physics
Consider the following CFG with starting variable S and Σ = {1, 2, 3, 4, 5, 6, 7,
8, 9, 0}:
S → X Y Z
X → 1 | 2
Y → W | ε
Z → Z Z | W
W → 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
a. [20 marks] Create a derivation tree for your student number. - 84521004
b. [20 marks] Is this grammar ambiguous or unambiguous? Briefly explain (Remember the string is 84521004)
why.
In: Computer Science