You will notice that a class named PeriodicTable has been provided to you. Inside the class is a static, two-dimensional array of strings named ELEMENTS that contains information about every element in the periodic table, so:  ELEMENTS[0] is { "1", "Hydrogen", "H", "1.007" };   ELEMENTS[1] is { "2", "Helium", "He", "4.002" } and so on ...     Add a static method to this class that uses the array to build a data structure of elements such that it is fast and easy to find an element using only its symbol. Your method should match the following signature, but replace DataStructure with your chosen data structure. public static DataStructure makeFastPeriodicTable() {} Hint: you can use the Integer.parseInt("2") and Double.parseDouble("1.23") methods to create numeric values from strings. _____________________________________________________ public class PeriodicTable { public static final String[][] ELEMENTS = { { "1", "Hydrogen", "H", "1.007" }, { "2", "Helium", "He", "4.002" }, { "3", "Lithium", "Li", "6.941" }, { "4", "Beryllium", "Be", "9.012" }, { "5", "Boron", "B", "10.811" }, { "6", "Carbon", "C", "12.011" }, { "7", "Nitrogen", "N", "14.007" }, { "8", "Oxygen", "O", "15.999" }, { "9", "Fluorine", "F", "18.998" }, { "10", "Neon", "Ne", "20.18" }, { "11", "Sodium", "Na", "22.99" }, { "12", "Magnesium", "Mg", "24.305" }, { "13", "Aluminum", "Al", "26.982" }, { "14", "Silicon", "Si", "28.086" }, { "15", "Phosphorus", "P", "30.974" }, { "16", "Sulfur", "S", "32.065" }, { "17", "Chlorine", "Cl", "35.453" }, { "18", "Argon", "Ar", "39.948" }, { "19", "Potassium", "K", "39.098" }, { "20", "Calcium", "Ca", "40.078" }, { "21", "Scandium", "Sc", "44.956" }, { "22", "Titanium", "Ti", "47.867" }, { "23", "Vanadium", "V", "50.942" }, { "24", "Chromium", "Cr", "51.996" }, { "25", "Manganese", "Mn", "54.938" }, { "26", "Iron", "Fe", "55.845" }, { "27", "Cobalt", "Co", "58.933" }, { "28", "Nickel", "Ni", "58.693" }, { "29", "Copper", "Cu", "63.546" }, { "30", "Zinc", "Zn", "65.38" }, { "31", "Gallium", "Ga", "69.723" }, { "32", "Germanium", "Ge", "72.64" }, { "33", "Arsenic", "As", "74.922" }, { "34", "Selenium", "Se", "78.96" }, { "35", "Bromine", "Br", "79.904" }, { "36", "Krypton", "Kr", "83.798" }, { "37", "Rubidium", "Rb", "85.468" }, { "38", "Strontium", "Sr", "87.62" }, { "39", "Yttrium", "Y", "88.906" }, { "40", "Zirconium", "Zr", "91.224" }, { "41", "Niobium", "Nb", "92.906" }, { "42", "Molybdenum", "Mo", "95.96" }, { "43", "Technetium", "Tc", "98" }, { "44", "Ruthenium", "Ru", "101.07" }, { "45", "Rhodium", "Rh", "102.906

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

You will notice that a class named PeriodicTable has been provided to you.

Inside the class is a static, two-dimensional array
of strings named ELEMENTS that contains information about every element in the
periodic table, so:
 ELEMENTS[0] is { "1", "Hydrogen", "H", "1.007" }; 
 ELEMENTS[1] is { "2", "Helium", "He", "4.002" } and so on ...    

Add a static method to this class that uses the array to build a data
structure of elements such that it is fast and easy to find an element using
only its symbol. Your method should match the following signature, but replace
DataStructure with your chosen data structure.

public static DataStructure makeFastPeriodicTable() {}

Hint: you can use the Integer.parseInt("2") and Double.parseDouble("1.23")
methods to create numeric values from strings.

_____________________________________________________

public class PeriodicTable {
public static final String[][] ELEMENTS = {
{ "1", "Hydrogen", "H", "1.007" },
{ "2", "Helium", "He", "4.002" },
{ "3", "Lithium", "Li", "6.941" },
{ "4", "Beryllium", "Be", "9.012" },
{ "5", "Boron", "B", "10.811" },
{ "6", "Carbon", "C", "12.011" },
{ "7", "Nitrogen", "N", "14.007" },
{ "8", "Oxygen", "O", "15.999" },
{ "9", "Fluorine", "F", "18.998" },
{ "10", "Neon", "Ne", "20.18" },
{ "11", "Sodium", "Na", "22.99" },
{ "12", "Magnesium", "Mg", "24.305" },
{ "13", "Aluminum", "Al", "26.982" },
{ "14", "Silicon", "Si", "28.086" },
{ "15", "Phosphorus", "P", "30.974" },
{ "16", "Sulfur", "S", "32.065" },
{ "17", "Chlorine", "Cl", "35.453" },
{ "18", "Argon", "Ar", "39.948" },
{ "19", "Potassium", "K", "39.098" },
{ "20", "Calcium", "Ca", "40.078" },
{ "21", "Scandium", "Sc", "44.956" },
{ "22", "Titanium", "Ti", "47.867" },
{ "23", "Vanadium", "V", "50.942" },
{ "24", "Chromium", "Cr", "51.996" },
{ "25", "Manganese", "Mn", "54.938" },
{ "26", "Iron", "Fe", "55.845" },
{ "27", "Cobalt", "Co", "58.933" },
{ "28", "Nickel", "Ni", "58.693" },
{ "29", "Copper", "Cu", "63.546" },
{ "30", "Zinc", "Zn", "65.38" },
{ "31", "Gallium", "Ga", "69.723" },
{ "32", "Germanium", "Ge", "72.64" },
{ "33", "Arsenic", "As", "74.922" },
{ "34", "Selenium", "Se", "78.96" },
{ "35", "Bromine", "Br", "79.904" },
{ "36", "Krypton", "Kr", "83.798" },
{ "37", "Rubidium", "Rb", "85.468" },
{ "38", "Strontium", "Sr", "87.62" },
{ "39", "Yttrium", "Y", "88.906" },
{ "40", "Zirconium", "Zr", "91.224" },
{ "41", "Niobium", "Nb", "92.906" },
{ "42", "Molybdenum", "Mo", "95.96" },
{ "43", "Technetium", "Tc", "98" },
{ "44", "Ruthenium", "Ru", "101.07" },
{ "45", "Rhodium", "Rh", "102.906" },

}

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education