Вы находитесь на странице: 1из 32

Page |I

A Mini Project Report

On

“MODERN PERIODIC TABLE”


submitted in partial fulfilment of the requirements for the award of degree of

Bachelor of Engineering
In
Computer Science and Engineering
Submitted by

BOJJA YAMINI 1608-16-733-064


M. SATHWIK 1608-16-733-082
N. KRISHNA DHEERAJ 1608-16-733-078

Under the Guidance of


Mr. M. PRAVEEN KUMAR
Assistant professor

Department of Computer Science and


Engineering
Matrusri Engineering College
(Affiliated to Osmania University, Approved by AICTE)
Saidabad, Hyderabad - 500059
(2017-2018)
P a g e | II

Department of Computer Science and


Engineering
Matrusri Engineering College
(Affiliated to Osmania University, Approved by AICTE)
Saidabad, Hyderabad - 500059

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.

Project Guide Project Coordinator HOD

Mr. M. Praveen Kumar Mrs. K. Shalini Dr. P. Vijayapal


Reddy
Assistant Professor Assistant Professor Professor &Head
Dept. of CSE Dept. of CSE Dept. of CSE

External Examiner(s)
P a g e | III

CONTENTS

Acknowledgement iv

Abstract v

List of Figures vi

List of Tables vii

S. No Chapter Page No

1. INTRODUCTION 1

1.1 Existing System 1

1.2 Disadvantages 2

1.3 Proposed System and Advantages 2

1.4 Objectives 3

1.5 Scope 3

1.6 System Requirements 3

1.7 Introduction to Periodic Table 4

1.8 Technology used for Implementation 9

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

1.8.5 Control Structures 11

2. ARCHITECTURE & IMPLEMENTATION 12

2.1 Modules 12

2.1.1 Selection Module 12

2.1.2 Information Module 12

2.1.3 Display Module 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 express our sincere thanks to mini project coordinator Mrs. K. Shalini,


Assistant professor, Department of Computer Science and Engineering, Matrusri
Engineering College, for her valuable suggestions and constant help in completing the
work.

We express our sincere gratitude to Dr. P. Vijayapal Reddy, Professor& Head,


Department of Computer Science and Engineering, Matrusri Engineering College, for his
precious suggestions, motivation and co-operation.

We extend our sincere thanks to Dr. D. Hanumantha Rao, Principal, Matrusri


Engineering College, Saidabad, Hyderabad, for his encouragement and constant help.

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

S. No Fig No Name of the figure Page No


1 1.7.3 The Modern Periodic Table 11
2 3. 2 Properties Screen1 12
3 3. 3 Properties Screen2 13
4 3. 4 Display Screen 14
Page |1

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. 3 PROPOSED SYSTEM AND ADVANTAGES


As this program is written C++, so it will take a little amount of your disk space and
memory to load and execute the program. You have to just use the codes which are given
for this program and run over your computer. When you execute ,it will be taken to the
main screen of periodic table section and it will be as:
 To get properties of elements press option 1.
 To display periodic table press option 2.
 To exit option 3.
The proposed system can overcome some of the limitations of existing system. The
proposed system
 Has greater efficiency.
 User friendly and interactive.
 Requires minimum time.
Page |3

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

1. 7 INTRODUCTION TO PERIODIC TABLE


It is the tabular display of elements organized on the basis of atomic number,
Electronic configurations and chemical properties.

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.

Stepwise development of Periodic Table

Dobereiner’s Triads

Johann Dobereiner is the first person to classify elements by their properties. He


found some groups having 3 elements each. So he called these groups ‘Triads’. He
showed when three elements in a triad were written in order of increasing atomic masses,
the atomic mass of the middle element was roughly average of atomic mass of the other
two elements. He grouped them into three groups called triads.

Limitation of his Triad:

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

Newlands Laws of Octaves

In 1863, John Newlands suggested that elements can be arranged in “Octaves”,


because he found that certain properties of element repeated every 8th element.

Newlands Laws of Octaves

Newland arranged element according to their increasing atomic mass.

• He found out that every eight elementhad properties similar to first. This came to
be known as Newlands’ law of octave.

• Example: Lithium and Sodium were found to be same.

Fig. 1.7.1. – Newland’s Periodic Table

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

Mendeleev’s Periodic table.

He arranged elements on the bases of Atomic mass and chemical properties.

• 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.

• He formulated Periodic Law:

‘Properties of elements are the periodic function of their atomic mass. ’

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.

Eg: Gallium, Scandium and Germanium.

• Predict properties of elements on basis of its position.

• Nobel gases which were discovered later could fit in his table.

LIMITATIONS OF MENDELEEV’S TABLE

• Position of the Isotopes could not be explained.

• Wrong order of atomic mass could not be explained in some case.

Eg: Cobalt (58.9) came before Nickel(58.7).

• Hydrogen was not assigned correct position. It had properties of both alkali and
Halogens.

MOSELEY’S Modern Periodic Table

In 1913, Henry Moseley showed that atomic number of an element was more
fundamental property than atomic mass.

• Modern periodic law:

Properties of elements are the periodic function of their atomic number.

Modern periodic table consists of 18 groups and 7 periods.

Through the modern periodic table:

1. Position of isotope is clear.

2. Position of Nickle and cobalt is clear.

3. Position of hydrogen is well explained.


Page |8

Fig. 1. 7. 3 – The Modern Periodic Table


Trends in Periods

• Period – Horizontal rows of element in a periodic table are called periods.

Trends :-

1. Valence electron : From left to right number of valence electron increases.

2. Atomic Number : From left to right there is consecutive atomic number.

3. Valency : From left to right Valency increases from 1 to 4 and then decrease to 0.

4. Atomic size : Decreases from left to right.

5. Metallic Character : Metallic character decreases from left to right.

6. Chemical reactivity : From left to right, decreases then increases.

7. Nature of oxides : From left to right basic character decreases and then acidic
character increases.

Trends in Groups
Page |9

• Group – Vertical columns in periodic table is known as groups.

Trends :-

1. Valence Electron : Have same number of valence electron.

2. Valency : Elements in a group have a same Valency.

3. Atomic size : Increases from up to down.

4. Metallic Character : On going down metallic character increases.

5. Chemical Reactivity : On going down chemical reactivity of metal increases but


chemical reactivity of non metal decreases.

6. Nature of oxides : All elements in group has same nature of oxides.

1. 8 TECHNOLOGY USED FOR IMPLEMENTATION

C++ is a general-purpose object-oriented programming (OOP) language,


developed by Bjarne Stroustrup, and is an extension of the C language. . . . C++ is
considered to be an intermediate-level language, as it encapsulates both high- and low-
level language features.
The origin of C++ dates back to 1979 when Bjarne Stroustrup, also an employee of Bell
AT &T, started working on language C with classes. He borrowed desirable features from many
other languages like Simula, Ada, ML, CLU and ALGOL 68. Thus, in addition to features of C
language, C++ also included classes, strong type checking, default function argument and basic
inheritance. Till 1983, it was called C with classes, and in 1983 it was named C++. During 1998,
a joint ANSI-ISO committee released the specification for C++ language standards.

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

 C++ is an object-oriented programming language and includes classes,


inheritance, polymorphism, data abstraction and encapsulation.
 C++ has a rich function library.
 C++ allows exception handling, and function overloading which are not possible
in C.
 C++ is a powerful, efficient and fast language. It finds a wide range of
applications – from GUI applications to 3D graphics for games to real-time
mathematical simulations.
 Modularity: Dividing a program into small pieces 0 also called as divide and
conqueror According to their operations into small modular.
 Re-usability: write code once and use more than one time.
 Readability: Easy to read or understand.

The methodologies we used in this project are:


 Files
 Arrays
 Strings
 Functions
 Control Structures

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

Selection Statements - A selection statement selects among a set of statements


depending on the value of a controlling expression. The selection statements are
the ‘if’ statement and the’ switch’ statement, which are discussed in the following
sections.
The “ if else” Statement
The if else statement has the following syntax:
if ( expression )
statement
else(opt)
else-statement (opt)
The statement following the control expression is executed if the value of the control
expression is true (nonzero). An if statement can be written with an optional else clause
that is executed if the control expression is false (0).
The “ switch” Statement
The switch statement executes one or more of a series of cases, based on the value of a
controlling expression. The switch statement has the following
syntax:
switch ( expression )
statement
The usual arithmetic conversions are performed on the control expression,but the result
must have an integral type. The switch statement is typically a compound statement,
P a g e | 12

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. ARCHITECTURE AND IMPLEMENTATION

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

cout<<"Choose an option \n1. Look for the properties of elements. \n2.


Display the table \n3. Exit\nenter an option:";
cin>>x;
switch(x)
{
/*To get properties of elements*/
case 1:
cout<<"enter symbol or atomic number:";
cin>>ep;
x=stringtoint(ep);
while(getline(fp,s))
{
if(s==ep)
{
if(x!=0)
{
cout<<"Symbol="<<prev<<endl;
cout<<"atomic number="<<s<<endl;
}
else
{
cout<<"Symbol="<<s<<endl;
getline(fp,s);
cout<<"atomic number="<<s<<endl;
}
break;
}
prev=s;
}
while(getline(fp,s))
{
if(s=="*")
break;
cout<<s<<endl;
P a g e | 17

}
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";

for (int i = 1; i < 7; ++i)


{
if(i==1||i==2)
n=8;
if(i==3||i==4||i==5||i==6)
n=18;
cout<<i+1<<" | ";
for (int j = 0; j < n; ++j)
{
if(n==8)
{
cout<<elements[k++]<<" | ";
count++;
if(count==2)
{
cout<<"\t\t\t\t\t\t | ";
}
}
else
{
cout<<elements[k++]<<" | ";
}
}
cout<<"\n";
count=0;
}
P a g e | 18

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

Fig 3.1: Selection screen

Whenever the user enters the atomic symbol, the properties of the particular
element will be displayed as shown below.

Fig 3. 2: Properties Screen1


P a g e | 21

Whenever the user enters the atomic number, the properties of the particular
element will be displayed as shown below.

Fig 3. 3: Properties Screen 2 (when atomic no. is given)


P a g e | 22

Output after user enters option. 2, the entire periodic table is displayed as shown
below.

Fig 3. 4: Display Screen (the periodic table)


P a g e | 23

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

Вам также может понравиться