Question: using JAVA Important: Apply good programming practices: Provide comments for your code. Use meaningful variable and constant names. Show your name, university id and section

 using JAVA Important: Apply good programming practices: Provide comments for your

using JAVA

Important: Apply good programming practices: Provide comments for your code. Use meaningful variable and constant names. Show your name, university id and section number as a comment at the start of your code. Submit to Moodle the compressed file of your entire project (HW1_Yourld). Problem: The nuclear binding energy is the energy required to split a nucleus of an atom in its component parts: protons and neutrons, or, collectively, the nucleons. It describes how strongly nucleons are bound to each other. When a high amount of energy is needed to separate the nucleons, it means nucleus is very stable and the neutrons and protons are tightly bound to each other. + Binding energy required to separate the components Nucleus (Protons + Neutrons) Separated nucleons + 9 The approximate nuclear binding energy (EB) of an atomic nucleus with atomic number Z and mass number A is calculated using the following formula 22 Eg = a/A - azA2/3 (A-22) az A1/3 - 24 A1/2 where, a, = 15.67, a2 = 17.23, az = 0.75, ax = 93.2, and 0 if A is odd = 12.0 if A and Z are both even, -12.0 if A is even and Z is odd. And the binding energy per nucleon (BEN) is calculated by dividing the binding energy (EB) by the mass number (A). In this assignment you are asked to write a java program that asks the user for a valid atomic number (Z) then goes through all values of A from A = Z to A = 4Z to find the mass number (A) that has the largest binding energy per nucleon (BEN). If the user enters invalid atomic number that is not between 1 and 118, the program should give the user other chance to enter a valid input. -37.771 run: Please enter a valid atomic number (z) (1,118):> Please enter a valid atomic number (Z) (1,118] :> -4 Please enter a valid atomic number (z) (1,118] :> 120 Please enter a valid atomic number (2) (1,118] :> 5 Binding Binding Energy Energy per Nucleon -448.996 -89.799 -226.623 -82.990 -11.856 -3.778 -0.472 47.111 5.235 10 64.228 11 6.423 11 70.245 6.386 55.009 4.584 35.952 2.766 1.794 0.128 -32.682 -2.179 16 -78.825 17 -123.453 -7.262 18 -177.641 -9.869 19 -229.307 -12.069 20 -289.143 -14.457 -4.927 The most stable nucleos has a mass number 10 BUILD SUCCESSFUL (total time: 10 seconds) Figure 1: Sample run of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!