Escolar Documentos
Profissional Documentos
Cultura Documentos
On
Bachelor of Engineering
In
Computer Science and Engineering
Submitted by
CERTIFICATE
This is to Certify that A Mini Project report entitled “MODERN
PERIODIC TABLE” is being submitted by Bojja Yamini (1608-16-733-
064), M. Sathwik (1608-16-733-082), N. Krishna Dheeraj (1608-16-733-
078) in partial fulfilment of the requirement of the award for the degree of
Bachelor of Engineering in “Computer Science and Engineering” O. U. ,
Hyderabad during the year 2017-2018 is a record of bonafide work carried
out by him/her under my guidance. The results presented in this mini project
report have been verified and are found to be satisfactory.
External Examiner(s)
P a g e | III
CONTENTS
Acknowledgement iv
Abstract v
List of Figures vi
S. No Chapter Page No
1. INTRODUCTION 1
1.2 Disadvantages 2
1.4 Objectives 3
1.5 Scope 3
1.8.1 Files 10
1.8.2 Arrays 10
1.8.3 Strings 11
1.8.4 Functions 11
P a g e | IV
2.1 Modules 12
2.1 Code 13
3. SCREENSHOTS 17
4. CONCLUSION 21
5. FUTURE ENHANCEMENT 22
6. REFERENCES 23
Page |V
ACKNOWLEDGEMENT
It is our privilege and pleasure to express our profound sense of respect, gratitude
and indebtedness to our guide Mr. M. Praveen Kumar, Assistant professor, Department
of Computer Science and Engineering, Matrusri Engineering College, for his/her
indefatigable inspiration, guidance, cogent discussion, constructive criticisms and
encouragement throughout this dissertation work.
We extend our sincere thanks to all the teaching and non-teaching staff of CSE
Department for their support and encouragement.
Last but not least, we wish to acknowledge our friends and family members for
giving moral strength and helping us to complete this dissertation.
P a g e | VI
ABSTRACT
The Modern Periodic Table project is a simple console application built without
the use of Graphics. It is developed using the C programming language for the purpose of
storing name, symbol, atomic number, atomic weight, a some important properties as well
as to display them as per requirement of the user.
This project will help you to understand file handling in C++ i. e. creating a file
and accessing the stored data in the file. It will also help you to understand the use of
functions as different parameters of C++ programming language.
The main function of this project is to explore or to display the stored information.
You can search an element by using any of the following methods:
1. By atomic number of element.
2. By symbol of element.
P a g e | VII
LIST OF FIGURES
1. INTRODUCTION
The project is based on the “Modern Periodic Table of Elements” which everyone has
come across in the field of Chemistry. It is a useful tabular arrangement of the chemical
elements ordered by their atomic number, electronic configuration and properties etc.
This project showcases all the elements and their properties including name, symbol,
atomic number, atomic mass, group and period. At present there are 118 elements.
The “Modern Periodic Table” has been developed to override the problems prevailing
in the practicing manual system. This project is supported to eliminate and in some cases
reduce the hardships faced by this existing system.
The main reason to undertake this project is to overcome problems in present existing
system and to help students who face challenge in remembering all elements and their
properties which everyone has faced in school days.
1. 1 EXISTING SYSTEM
If you have to get information regarding any elements of periodic table then you
have to use either periodic table which is made of paper or if you are going to use any
software then you have to wait to download that particular software. Sometimes you get
irritated because the downloaded software are not getting the exact information as per
your requirement. In the existing system, users do not get details of all elements which
are available in the periodic table till date. Under the existing system all elements are not
available under the same screen and you have to press next button or previous button to
get details of your desired elements. All elements are not easily visible clearly so you
have to scroll down the screen to get the entire information. There is no simple way to
quit the program and some program takes more disk space just for getting few
information on time.
Page |2
1. 2 DISADVANTAGES
The disadvantages of the present existing system are :
User’s do not get the details of all the elements which are available in the periodic
table till date.
All elements are not available under the same screen and you have to press next
button or previous button to get details of your desired elements.
Users who have no internet connection can’t get the information.
Requires more space for downloading the software as they use GUI’s.
1. 4 OBJECTIVES
This project will help students to get details regarding each elements which are
available within the periodic table. It will enable the students to get the details of each
element by just clicks of keyboard. This program is easy to run and get details of each
elements. User have to just select the particular option and press enter to get information
such as atomic number, their atomic value, their location in the periodic table. To start
getting details wait for the next instruction generated by the command line. It will ask you
to enter as per the requirement. So the main objectives of this project is:
To help students get the details regarding each elements which are available
within the periodic table.
To bring about curiosity and promote education in the fields of Chemistry as
well as Computer Science.
To avoid problems of students from browsing over various websites to get
details of the elements.
1. 5 SCOPE
It may help all the properties required by the user. In a very short time, the
collection will be obvious,simple and sensible.
It satisfy the user requirement.
Easy to understand by the user.
Easy to operate.
Have a good user interface.
1. 6 SYSTEM REQUIREMENTS
Hardware requirements
Processor: PENTIUM (4) and above
RAM : 1 GB
Memory: 50 GB
Software requirements
Operating System: Windows or LINUX
Compiler: C++
Page |4
The table also shows four rectangular blocks: s-, p-, d- and f-block. In general,
within one row (period) the elements are metals on the left hand side, and non-metals on
the right hand side. The rows of the table are called periods; the columns are called
groups.
In the year 1800, only 30 elements were known. Now, at present, there are 118
elements known. So, it became difficult for the scientist to remember all the properties of
elements.
Therefore, there was a need to classify elements. Many scientist tried to classify
elements based different criteria. Some brought success while some did not.
Dobereiner’s Triads
Dobereiner could only find three such triads from the elements known at that time.
Thus this system of classification was not found to be useful.
Page |5
• He found out that every eight elementhad properties similar to first. This came to
be known as Newlands’ law of octave.
Limitations
• Law of octave was only applicable up to calcium as after every eight element did not
have same properties to that of first.
• He assumed that only 56 element existed and no more elements were to be discovered.
• In order to fit elements into the table, Newlands’ adjusted two elements like cobalt and
nickel in the same slot and also put some unlike elements under the same note.
So this law only worked well with lighter elements hence it was not applicable with
elements have atomic mass above 40u.
Page |6
• He selected hydrogen and oxygen and reacted every elements with it and formed its
compounds.
• Compounds of hydrides and oxides were treated as one of the basic properties of an
element for its classification.
Fig. 1.7.2 – Mendeleev’s Periodic Table.
Page |7
Achievements of Mendeleev
Predicted existence of some elements that were not discovered at that time.
• Nobel gases which were discovered later could fit in his table.
• Hydrogen was not assigned correct position. It had properties of both alkali and
Halogens.
In 1913, Henry Moseley showed that atomic number of an element was more
fundamental property than atomic mass.
Trends :-
3. Valency : From left to right Valency increases from 1 to 4 and then decrease to 0.
7. Nature of oxides : From left to right basic character decreases and then acidic
character increases.
Trends in Groups
Page |9
Trends :-
Benefits of C++
C++ is a highly portable language and is often the language of choice for multi-
device, multi-platform app development.
P a g e | 10
1. 8. 1 FILES
The file we used is “properties.txt” which serves as a database. This file contains
data of the properties of all 118 elements. This file is used in sub selection module
whenever the user wants the properties of elements. In this the properties of each element
are separated from other elements by ‘*’.
1. 8. 2 ARRAYS
Since arrays store multiple items of same data type under a single variable name,
it is convenient to store the periodic table elements under a single variable name for
displaying the elements on the console.
1. 8. 3 STRINGS
P a g e | 11
Strings are collection of characters. In our project strings are used to access the
data from the database i.e. file where the data regarding to the properties of elements are
stored.
1. 8. 4 FUNCTIONS
We used a function stringtoint(string) which converts integer that is given as a
string data type into a real integer data type. For this purpose we used a pre-defined class
stringstream object which can be used for both input and output to a string.
1. 8. 5 CONTROL STRUCTURES
within which are one or more case statements executed if the control expression matches
the case . The syntax for a case label and expression follows:
case constant-expression : statement
The constant expression must have an integral type. No two case labels can specify the
same value. There is no limit on the number of case labels in a switch statement.
Only one statement in the compound statement can have the following label:
default :
The case and default labels can occur in any order, but it is common practice for
the default statement to follow the case statements. Note that execution flows from the
selected case into the cases following unless explicit action is taken, such as
a break statement.
Ierative Statements- The statements that cause a set of statements to be
executed repeatedly either for a specific number of times or until some
condition is satisfied are known as iteration statements. That is, as long as
the condition evaluates to True, the set of statement(s) is executed. The
various iteration statements used in C++ are for loop, while loop and do
while loop.
The “for” Loop- The for loop is one of the most widely used loops in C+
+. The for loop is a deterministic loop in nature, that is, the number of
times the body of the loop is executed is known in advance. The syntax of
the for loop is
for(initialize; condition; update)
{
Body for the loop
}
for loop using comma operator : :
for loop allows multiple variables to control the loop using comma
operator. That is, two or more variables can be used in the initialize and the
update parts of the loop. For example, consider this statement.
for ( ( i=1, j=50 ; i<10; i++, j - -)
This statement initializes two variables, namely i and j and updates them.
Note that for loop can have only one condition.
P a g e | 13
The “while” Loop- The while loop is used to perform looping operations
in situations where the number of iterations is not known in advance. That
is, unlike the for loop, the while loop is non deterministic in nature. The
syntax of the while loop is
while(condition)
{
/ / body of while loop
}
These points should be noted about the while loop.
Unlike for loops where explicit initialize and update expressions are
specified, while loops do not specify any explicit initialize and update
expressions. This implies that the control variable must be declared and
initialized before the while loop and needs to be updated within the body
of the while loop.
The while loop executes as long as condition evaluates to True. If
condition evaluates to False in the first iteration, then the body of while
loop never executes.
while loop can have more than one expression in its condition. However,
such multiple expressions must be separated by commas and are executed
in the order of their appearance.
P a g e | 14
2. 1 MODULES
The “Modern Periodic table” project is divided into three main modules. The modules
are:
Selection module
Information module
Display module
2. 1. 1 SELECTION MODULE
This module allows the user to select the operation of his requirement i.e. either to
get the properties of the element or to display the whole periodic table or to exit the
program.
If the user selects the option 1 i.e look for the properties of elements then the user
is provided to enter the atomic number or symbol to get the properties. So if the user
wants to get properties of Hydrogen he can enter either ‘H’ or 1.
2. 1. 2 INFORMATION MODULE
According to the choice of the element chosen this module contains and
displays the properties of element which include name, number, group, period, mass,
charge, formula and special.
2. 1. 3 DISPLAY MODULE
If the user chooses option 2 i.e. display the table then the whole periodic table
will be displayed on the console. This module provides all 118 with their symbols and
their period.
P a g e | 15
2. 2 CODE
#include<iostream>
#include<fstream>
#include<cstdlib>
#include<sstream>
using namespace std;
int stringtoint(string ep)
{
stringstream ss(ep);
int x=0;
ss>>x;
return x;
}
string elements[]={"H ","He","Li","Be","B ","C ","N ","O ", "F", "Ne", "Na", "Mg", "Al",
"Si", "P ","S ","Cl","Ar","K ","Ca","Sc","Ti","V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu",
"Zn", "Ga","Ge","As","Se","Br","Kr","Rb","Sr","Y","Zr","Nb","Mo","Tc","Ru","Rh",
"Pd","Ag","Cd","In","Sn","Sb","Te","","Xe","Cs","Ba","La","Hf","Ta","W","Re","Os","I
r","Pt","Au","Hg","Tl","Pb","Bi","Po","At","Rn","Fr","Ra","Ac","Rf","Db","Sg","Bh","
Hs","Mt","Ds","Rg","Cn","Nh","Fl","Mc","Lv","Ts","Og"};
stringl_a[]={"Ce","Pr","Nd","Pm","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb","Lu
","Th","Pn","U ","Np","Po","Am","Cm","Hh","Cf","Es","Fm","Md","No","Lr"};
int main()
{
string ep,s,prev;
while(1)
{
int k=2,n=0,count=0;
int x;
ifstream fp;
cout<<"\t\t\tPERIODIC TABLE\n\n";
fp. open("properties. txt");
P a g e | 16
}
system("pause");
system("cls");
break;
/*To display the periodic table*/
case 2:cout<<"1 | "<<elements[0]<<" |\t\t\t\t\t\t\t\t\t |
"<<elements[1]<<" |\n";
cout<<"\n\n";
k=0;
for (int i = 0; i < 2; ++i)
{
if (i==0)
{
cout<<"Lanthanoids: | ";
}
if (i==1)
{
cout<<"Actinoids: | ";
}
for (int j=0; j<14; ++j)
{
cout<<l_a[k++]<<" | ";
}
cout<<"\n";
}
system("pause");
system("cls");
break;
case 3: exit(0);
/* default:cout<<"\nInvalid option\n";
system("pause");
system("cls");
break;*/
}
}
}
P a g e | 19
3. SCREENSHOTS
As soon as the program is executed the main screen appears as shown below . It
has three options. If the user wants to get properties option 1 has to be entered. If the user
wants the periodic table to be displayed option 2 has to be entered. To exit the program
option 3 has to be entered.
P a g e | 20
Whenever the user enters the atomic symbol, the properties of the particular
element will be displayed as shown below.
Whenever the user enters the atomic number, the properties of the particular
element will be displayed as shown below.
Output after user enters option. 2, the entire periodic table is displayed as shown
below.
4. CONCLUSION
The users get to know the information of the periodic table by simple clicks of the
keyboard and can also easily operate this application due to its user friendly
interface.
It helps students getting properties of all elements at one place without referring to
different websites or books.
It overcomes most of the limitations of existing system.
It is easy to run and get details of each elements.
P a g e | 24
5. FUTURE ENHANCEMENTS
Nothing is perfect in this world. So, we want are also no exception. Although, we
have tried our best to present the information effectively, yet, there can be further
enhancements in the report.
At present there are 118 elements. But in future there may be many elements
which will be discovered by scientists. So we want to work on this project to add
properties of the elements dynamically as soon as they are found and also provide the
users with an option to add more properties of the elements which they feel to be
important other than the properties we provided.
One more enhancement we have to work in future is when the user gives some
property the program should be designed in such a way that it must output all elements
which exhibit the given property. So many details can be added to these project in future.
P a g e | 25
6. REFERENCES
Books
Walter Savitch, “Problem Solving with C++”, 6 th Edition, Pearson
Education Publishing, 2009.
Bjarne Stroustrup, “The C++ Programming Language”, 3 rd Edition,
Pearson Education.
Reema Thareja, Object Oriented Programming with C++, First
Edition, Oxford University Press, 2015
Website
https://www. geeksforgeeks. org/c-plus-plus/
https://www.cplusplus.com