Q1: There are different kinds of atoms with having neutrons, protons and electrons with their specific...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q1: There are different kinds of atoms with having neutrons, protons and electrons with their specific atomic mass asses. Hydrogen is one of them. [4 marks] A) In Java language of your choice, write a definition for an atom class that contains: Fields for storing the numbers of protons, neutrons and electrons with appropriate visibility. Setter and getter methods for manipulating these fields, ensuring that the minimum value for electrons and protons is 1, and the minimum value for neutrons is 0. (i) (ii) (iii) Aparameterized constructor that initializes new objects of atom to be the smallest element (Hydrogen), for which the number of protons is 1, the number of neutrons is 0, and the number of electrons is 1. B) Write a new method for the atom class called islon that will return true or false, depending upon whether the atom is an ion. An atom is an ion if it is charged (i.e., if the number of electrons # the number of protons). C) Write a new method for the atom class called getAtomicMassNumber that will calculate and return the atomic mass number of the atom. Atomic mass number of an atom (often denoted A) is defined as the number of protons plus the number of neutrons. Q2: Write a class named Sorting with sort function in order to sort the following array as pakistan Call sort function in main function. [4 marks] char[] p= {'a'. p'.ï.k.t.a'.n'.'s'}; Output as = pakistan Q3: Write a class with name ArrayDemo. This class has an array which should be initialized by user. write a function with name numFind in this class with working logic as to find the mid number of an array. After finding this number calculate its factorial and display it.Don't use / operator. [4 marks] Q1: There are different kinds of atoms with having neutrons, protons and electrons with their specific atomic mass asses. Hydrogen is one of them. [4 marks] A) In Java language of your choice, write a definition for an atom class that contains: Fields for storing the numbers of protons, neutrons and electrons with appropriate visibility. Setter and getter methods for manipulating these fields, ensuring that the minimum value for electrons and protons is 1, and the minimum value for neutrons is 0. (i) (ii) (iii) Aparameterized constructor that initializes new objects of atom to be the smallest element (Hydrogen), for which the number of protons is 1, the number of neutrons is 0, and the number of electrons is 1. B) Write a new method for the atom class called islon that will return true or false, depending upon whether the atom is an ion. An atom is an ion if it is charged (i.e., if the number of electrons # the number of protons). C) Write a new method for the atom class called getAtomicMassNumber that will calculate and return the atomic mass number of the atom. Atomic mass number of an atom (often denoted A) is defined as the number of protons plus the number of neutrons. Q2: Write a class named Sorting with sort function in order to sort the following array as pakistan Call sort function in main function. [4 marks] char[] p= {'a'. p'.ï.k.t.a'.n'.'s'}; Output as = pakistan Q3: Write a class with name ArrayDemo. This class has an array which should be initialized by user. write a function with name numFind in this class with working logic as to find the mid number of an array. After finding this number calculate its factorial and display it.Don't use / operator. [4 marks]
Expert Answer:
Answer rating: 100% (QA)
Question 1 Question 2 Question 3 Answer Step 1 Required Electrons are negatively charged protons are ... View the full answer
Related Book For
Cornerstones of Managerial Accounting
ISBN: 978-0324660135
3rd Edition
Authors: Mowen, Hansen, Heitger
Posted Date:
Students also viewed these programming questions
-
To start us off, create an abstract ChessPiece class. What instance data would all chess pieces have? Knowing that all the chess pieces move in different ways, declare an abstract method called move....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A hospital is in the process of implementing an ABC system. A pilot study is being done to assess the effects of the costing changes on specific products. Of particular interest is the cost of caring...
-
Which of the following is not an element of the fraud triangle? (a) Rationalization. (b) Financial pressure. (c) Segregation of duties. (d) Opportunity.
-
Canandaigua Container Company manufactures recyclable soft-drink cans. A unit of production is a case of 12 dozen cans. The following standards have been set by the production- engineering staff and...
-
During the year ended 30 June 2019, Beautiful Bottles Pty Ltd incurred the following costs. The company charges factory overhead costs to work in process inventory and finished goods inventory, using...
-
In general, what procedures does an auditor apply during the subsequent period to identify significant subsequent events?
-
Mather sells a snowboard, EZslide, that is popular with snowboard enthusiasts. Below is information relating to Mather's purchases of EZslide snowboards during September. During the same month, 102...
-
Give two examples and give a brief description of pseudoscientific claims made published materials about the frequencies of electromagnetic radiation may have when absorbed by matter. Chose on...
-
What would the contingency for a mobile marketing strategy? I've created a mobile marketing strategy focusing on a specific bank's app and optimisation of their website for smartphones to attract...
-
Write the function of the following: (a) Nozzle (b) Moving blade (c) Guide blades in steam turbine
-
Explain the working of closed cycle gas turbine.
-
In a gas turbine cycle, the condition of air at the entrance of compressor is 1 bar and \(27^{\circ} \mathrm{C}\). Pressure ratio is 6 . Maximum temperature is \(700^{\circ} \mathrm{C}\). The exhaust...
-
As technology improves over time, fewer workers are needed to produce the same goods as before. Do you think this might have an implication for payas-you-go systems?
-
How does the Dodd-Frank Act of 2010 compare to the Glass-Steagall Act of 1933?
-
For a water cooled ammonia condenser find the heat extracted if con- denser surface area 3 m, steel tube thickness 3 mm, condenser temperature 25C, average water temperature 18C, overall coeffi-...
-
Charles owns an office building and land that are used in his trade or business. The office building and land were acquired in 1978 for $800,000 and $100,000, respectively. During the current year,...
-
Process costing works well whenever a. heterogeneous products pass through a series of processes and receive similar doses of materials, labor, and overhead. b. homogeneous products pass through a...
-
Explain the role of a sales forecast in budgeting. What is the difference between a sales forecast and a sales budget?
-
The second stage of ABC entails the assignment of a. resource costs to departments. b. activity costs to products or customers. c. resource costs to a plantwide pool. d. resource costs to individual...
-
Form small groups of four to five individuals. Using the worksheet Be the Best We Can Be Team Norms, discuss how the answers to the questions can assist the group with developing team norms so that...
-
Explain why teams and groups are not the same.
-
List the teams of which you are a member. Select one of these teams to analyze. Is it a high performing team? If so, why is it? If not, why isnt it? What changes need to be made to increase the the...
Study smarter with the SolutionInn App