Questions
1.Create a standard Java project (i.e. not a JavaFX project) in NetBeans called Personsages 2.Declare a...

1.Create a standard Java project (i.e. not a JavaFX project) in NetBeans called Personsages

2.Declare a Scanner variable called keyboardInput and a variable called personAge as type int. Code the statement to read in an integer with a prompt to "Enter your age as an integer:".

3.Code an "if/else if" (also called a multi-way if) block to output the following text based on age ranges personAge might contain:

  • 0 through 12: Person is a pre-teen.
  • 13 through 19: Person is a Teenager.
  • 20 through 29: Person is in their 20's.
  • 30 through 39: Person is in their 30's.
  • 40 or greater: Person is 40 years or older.

4.Code an "if / else" statement to determine if the age entered in Step 9 is on/before the year 1990 or after 1990 outputting the message that the person was born on/before or after 1990.

5.Declare a String variable called aCityInNY and read in a String from the keyboard with a prompt "Enter Albany, Buffalo, New York, Rochester, or Binghampton to see its population:".

6.Code a switch block to compare the value input to the cities just mentioned. Output "Population is: " with the population of each city (you are not being tested on the actual population). If the user enters any other city or text, output an appropriate error message to the user.

7.Declare an integer variable called intInput and assign it a 0. Declare a Boolean called keepLooping and set to true. Code a while loop with keepLooping as the condition.

8.In the body of the while loop, code a prompt that says “Input a number – enter 999 to exit:”. Use a Scanner method to get an integer from the keyboard and assign it to intInput. Output the number only if it does not equal 999, else set keepLooping false.

9.Declare a variable called loopInt. Code a for loop that uses loopInt and counts from 0 to 9.

10.In the for loop body, output “For Loop Counter = “ + loopInt.

11.After the for loop, set the loopInt variable to 0. Code a do-while loop that ends after loopInt is 9.

12.In the body of the do-while, output “Do-While Loop Counter = “ + loopInt. Code a statement to increase loopInt by 1.

13.After the while loop, declare an int variable called loopIntInner and an int variable called loopIntOuter. Code a for loop that counts loopIntOuter from 0 to 4. This is the outer loop. In the body, code another for loop (this is the inner loop) that counts loopIntInner from 0 to 2. In the body of the inner loop put an output statement that outputs “loopIntOuter: “ + loopIntOuter + “ loopIntInner: “ + loopIntInner.

14.Run the program with 32 as the age prompt in Step 9.

15.Enter at least one valid city for Step 12.

16.Enter at least 2 numbers for 15 and then 999.

In: Computer Science

Please use python. Step a: Create two DataFrames df1 and df2 from the following two tables...

Please use python.
Step a: Create two DataFrames df1 and df2 from the following two tables that hold student scores. Each DataFrame has four rows and three columns.

df1:

df2:

Name

Course A

Course B

Name

Course C

Course D

Adam

80

84

Bob

65

72

Bob

74

76

David

85

82

David

78

83

Eva

76

80

Tom

85

82

Tom

90

88

Step b: Join the two DataFrames into df3 so that it only includes the students who appear in both tables. Print df3.

Step c: Set the column 'Name' as the index of df3 using df3.set_index() function. Print the updated df3. You can learn from https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.set_index.html.

Step d: Show the average score of each student in df3.

In: Computer Science

Research any literature/articles that address globalization and its challenges in the context of management…..Discuss in specific...

Research any literature/articles that address globalization and its challenges in the context of management…..Discuss in specific terms the challenges and how they are or can be overcome and their respective applicable solutions. Highlight the strategic approaches that managers develop and implement to gain a sustainable competitive advantage. Is globalization a greater challenge or threat to dynamic organizational structures than static organizational structures? Elaborate how you could device a workable method to resolving the challenges or threats. Provide logically-connected organizational management leaders who have made history in this regard.

In: Operations Management

A 100.0 m rod with a diameter of 3.0mm has a charge of 1004.0C. What is...

A 100.0 m rod with a diameter of 3.0mm has a charge of 1004.0C. What is the approximate electric field 2.0mm from the surface of the rod, not near either end?

A) 9.0*1011 r N/C

B) - 9.0*1011 r N/C

C) - 5.2*1013 r N/C

D) 5.2*1013 r N/C

The answer is D, I am not sure how they got that answer, can you please explain and show your work. Thanks in advance

In: Physics

You are exploring a distant planet. When your spaceship is in a circular orbit at a...

You are exploring a distant planet. When your spaceship is in a circular orbit at a distance of 630 km above the planet's surface, the ship's orbital speed is 5500 m/s . By observing the planet, you determine its radius to be 4.48×10^6 m. You then land on the surface and, at a place where the ground is level, launch a small projectile with initial speed 13.6 m/s at an angle of 30.8∘ above the horizontal. If resistance due to the planet's atmosphere is negligible, what is the horizontal range of the projectile? Please explain process

In: Physics

A PC store sells many types of computers. The PC can have either 16 or 8...

A PC store sells many types of computers. The PC can have either 16 or 8 gigabytes of memory.

The quality of the PCs can be either New, Refurbished, or Dented.

The price list is given as follows:

Memory size/Status New Refurbished Dented

16 gigabytes 849.99 729.99 609.99

8 gigabytes 699.99 579.99 439.99


Determine the price of a given PC dependent on the user inputs. The sale tax is 9.25% for each PC.

User input can only be 8 or 16 for memory size and 'N', 'R', or 'D' for quality (upper-case). The input quantityt should be 0 or positive.

If any user input is not correct, display an error message and skip all calculation.

All currency amount should be displayed with 2 digits in decimal fraction.


Here are several separate program sample runs. There is No need to use loop for repetition.

Enter the memory size of the PC (8 or 16 gigabytes): 16

Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): N

Enter PC quantity want to buy: 2

The item price is $1699.98

The sale tax is $157.25

The total bill is $1,857.23

----------------------

Enter the memory size of the PC (8 or 16 gigabytes): 8

Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): R

Enter PC quantity want to buy: 3

The item price is $1739.97

The sale tax is $160.95

The total bill is $1900.92

----------------------

Enter the memory size of the PC (8 or 16 gigabytes): 15

Invalid memory size!

----------------------

Enter the memory size of the PC (8 or 16 gigabytes): 8

Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): A

Invalid PC quality!

----------------------

Enter the memory size of the PC (8 or 16 gigabytes): 8

Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): (user hit Tab key)

Invalid PC quality!


----------------------

Enter the memory size of the PC (8 or 16 gigabytes): 16

Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): R

Enter PC quantity want to buy: -2

Invalid PC quantity!

[C++ PROGRAMING]

In: Computer Science

Determine Kc for the reaction (justify all your calculations): ½ N2(g) + ½ O2(g) + ½...

Determine Kc for the reaction (justify all your calculations):

½ N2(g) + ½ O2(g) + ½ Br2(g) NOBr(g)

From the following information at T=298 K

2NO(g) O2(g) + N2(g) Kc = 2.1 x 10^30

NO(g) + ½ Br2(g) NOBr(g) Kc = 1.4

In: Chemistry

What is the molality of a solution that has been prepared by mixing 53.6 g of...

What is the molality of a solution that has been prepared by mixing 53.6 g of sodium chloride with 464 g of water?

In: Chemistry

1) A 150.0 mL solution was prepared by mixing 100.0 mL of 1.00 M HONO (Ka...

1) A 150.0 mL solution was prepared by mixing 100.0 mL of 1.00 M HONO (Ka = 4.5 x 10–4 ) with 50.0 mL of 1.00 M NaNO2 . Calculate the pH, [HONO], and [NO2–], once equilibrium has been established.

2). What is the pH, [OH], [HF], [F], and the percent ionization of a solution prepared as 0.50 M HF ? (HF: Ka = 7.2 x 10-4)

50 M HF ? (HF: Ka = 7.2 x 10-4)

3. Consider the reaction:

CO(g) + H2O(g)    CO2(g) + H2(g)

At 800 K the equilibrium constant, K = 16.

If your reaction vessel initially contains 0.050 M CO, 0.050 M H2O, 0.30 M CO2 and 0.30 M H2. What are the equilibrium concentrations of all of the components?

4. What is the pH of a saturated solution of Mn(OH)2 ( Ksp = 2.0 x 10–13)?

Mn(OH)2 (s)   Mn2+ (aq) + 2 OH-(aq)     

5) The weakest strong acids is Nitric acid, with a Ka = 240. The % ionizations of strong acids are rounded off to 100%. Calculate the % ionization of 0.100 M nitric acid without rounding.

In: Chemistry

Why is good documentation important in your research reports? Explain why recommendations should be specific and...

Why is good documentation important in your research reports? Explain why recommendations should be specific and actionable. Provide at least two examples of recommendations that meet this standard.

In: Economics

what is an economic stimulus package? how do governments use this package? explain what js contained...

what is an economic stimulus package? how do governments use this package? explain what js contained and how it can affect you and your family

In: Economics

Simulate a D-Flip Flop on Xilinx using Verilog HDL | Behavioral Modelling PS: please include the...

Simulate a D-Flip Flop on Xilinx using Verilog HDL | Behavioral Modelling

PS: please include the simulation screenshot and output and the code

In: Computer Science

please write a paper that argues either for or against government intervention in foreign trade. Describe...

please write a paper that argues either for or against government intervention in foreign trade. Describe both the benefits and the problems that can occur when governments interfere with foreign trade, describing the different barriers that governments can impose and also the steps they sometimes take to encourage international trade.

In: Economics

What is the current thinking on the little hierarchy problem in light of a potential Higgs...

What is the current thinking on the little hierarchy problem in light of a potential Higgs mass above 120 GeV? A few years ago, at least, I remember various phenomenologists saying that this at least makes life rather difficult for the MSSM.

In: Physics

A migrating fish would be rapidly transferring substances across cell membranes. These substances would include sodium,...

  • A migrating fish would be rapidly transferring substances across cell membranes. These substances would include sodium, water, carbon dioxide, oxygen, and steroids. Which of those would be most likely to be moved via active transport? Why?

In: Other