Question: Your task is to construct a program that will serve as lookup for each item in the periodic table. You should provide functionality that will

Your task is to construct a program that will serve as lookup for each item in the periodic table. You should provide functionality that will allow a person to search by either element name of element number. You should construct a simple menu that will allow a person to select what they want to lookup the element by. The output of your program should be Atomic number, Symbol, Element name, atomic weight.
Specifics.
You are to create an AVL Tree that will hold the Name, Atomic Number, and Atomic weight for each value in the periodic table. Your AVL Tree should be constructed as a class and be generic so that any data type can be used. You should have another class called ElementLookup (non generic) that will load the elements from the csv file into the tree and provide the necessary functionality to lookup the element. The relationship between the AVLTree and the element lookup should be one of composition. In other words the ElementLookup class is composed of the AVLTree class.
AVLTree - The node of the AVLTree should not be modified to hold specific information about the periodic elements. What this means is that you will have to create a class or a struct to hold this information inside the AVLTree.
ElementLookup - This class will read and parse the csv file into the tree. Using an AVLTree will assure that it is balanced.
You should not use any absolute paths when reading the csv file. You simply need to put the csv file into the correct project folder so that only the name of the file without any path is used.
The lookup method / function should return a string that contains the information in the following format:
Atomic Number: 1, Name: Hydrogen, Symbol: H, Atomic Weight: 1.00797

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!