0% found this document useful (0 votes)
182 views

Batch8 - Modern Periodic Table

This document is a lab report submitted by four students at KL University for their freshman engineering project on the modern periodic table. It includes an introduction to the project, which is a console application built in C without graphics to store and display information about elements. It outlines the key functions for adding new element data, exploring stored data, and the main menu screen. It also provides details on the software and hardware used, a data flow diagram, algorithms for each module, and testing and integration of the system.

Uploaded by

Mohan Sai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
182 views

Batch8 - Modern Periodic Table

This document is a lab report submitted by four students at KL University for their freshman engineering project on the modern periodic table. It includes an introduction to the project, which is a console application built in C without graphics to store and display information about elements. It outlines the key functions for adding new element data, exploring stored data, and the main menu screen. It also provides details on the software and hardware used, a data flow diagram, algorithms for each module, and testing and integration of the system.

Uploaded by

Mohan Sai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

ma

K L UNIVERSITY
FRESHMAN ENGINEERING DEPARTMENT
A Project Based Lab Report

On

Modern Periodic Table

SUBMITTED BY:

I.D NUMBER NAME

190030739 KANYADHARA AKASH

190030754 SAI MANASWINI KASTURI

190030758 KATAKAM GAYATHRI

190030759 KATAKAM KRISHNA PREMIKA

UNDER THE ESTEEMED GUIDANCE OF

Amara S A L G Gopala Gupta

Assistant Professor

KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES

CERTIFICATE

This is to certify that the project based laboratory report entitled


“Modern Periodic Table” submitted by Mr./Ms. KANYADHARA
AKASH , SAI MANASWINI KASTURI , KATAKAM GAYATHRI,
KATAKAM KRISHNA PREMIKA bearing Regd. No. 190030739 ,
190030754 , 190030758, 190030759 to the Department of Basic
Engineering Sciences, KL University in partial fulfillment of the
requirements for the completion of a project based Laboratory in
“Technical Skills-I(Coding)” course in I B Tech I Semester, is a bonafide
record of the work carried out by him/her under my supervision during
the academic year 2019 – 2020.

PROJECT SUPERVISOR HEAD OF THE DEPARTMENT

Amara S A L G Gopala Gupta Dr. D.HARITHA


ACKNOWLEDGEMENTS

It is great pleasure for me to express my gratitude to our honorable


President Sri. Koneru Satyanarayana, for giving the opportunity and platform
with facilities in accomplishing the project based laboratory report.

I express the sincere gratitude to our Director Dr. A. Jagdeesh for his
administration towards our academic growth.

I express sincere gratitude to our Coordinator and HOD-BES Dr.


D.Haritha for her leadership and constant motivation provided in successful
completion of our academic semester. I record it as my privilege to deeply
thank for providing us the efficient faculty and facilities to make our ideas into
reality.

I express my sincere thanks to our project supervisor Amara S A L G Gopala


Gupta for his/her novel association of ideas, encouragement, appreciation and
intellectual zeal which motivated us to venture this project successfully.

Finally, it is pleased to acknowledge the indebtedness to all those who


devoted themselves directly or indirectly to make this project report success.

I.D NUMBER NAME

190030739 KANYADHARA AKASH

190030754 SAI MANASWINI KASTURI

190030758 KATAKAM GAYATHRI

190030759 KATAKAM KRISHNA PREMIKA


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, and some important properties as well as to display them as per
requirement of the user.
INDEX
S.NO TITLE PAGE NO

1 Introduction 1

2 Aim of the Project 2

2.1 Advantages & Disadvantages 2

2.2 Future Implementation 2

3 Software & Hardware Details 3

4 Data Flow Diagram 4

5 Implementation 6-14

6 Algorithm for each module 5

7 Integration and System Testing 15-16

8 Conclusion 17
INTRODUCTION

This project will help you to understand file handling in C i.e. creating a file and accessing
the stored data in the file, modifying and removing the stored data. It will also help you to
understand the use of functions as well as different parameters of C programming language.

The main functions used in designing the Modern Periodic Table project are:

• void add(): This function is used to input or add the information of new element
to the program.
• void explor(): This function is used to explore the stored information in the file
created.
• void main screen(): It is included in source code of project file in order to print
the text style and to control its color. This function is used to print the main
screen or menu of the project.

The key features of Modern Periodic Table mini project in C are briefly described below:

• Storage of Element Information: In the project, you can add any new element
with its name, symbol, atomic number, atomic weight and its some important
properties. When new element information is to be added to this Modern
Periodic Table, you have to enter 1 in the main menu and input information in
given format. This information is stored in file created on the hard disk of
computer by program itself.

• Exploration of element Information: Another 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 method:

• By name of element
• By symbol of element
• By atomic number of element
• By atomic weight of element

1|Page
AIM

Advantages:-

• This project will help you to understand file handling in C i.e.


creating a file and accessing the stored data in the file,
modifying and removing the stored data. It will also help you
to understand the use of functions as well as different
parameters of C programming language
• The table is simple, systematic and easy way for remembering
the properties of various elements.

Disadvantages:-

• If you want to search by Atomic weight, you have to mention


the exact weight
• Modification of the program is difficult

Future enhancements:-

• With this program we can easily search any element and know
about its properties. We don’t need to reach any book for that
• We can also add new elements into the table very easily in
future

2|Page
SYSTEM REQUIREMENTS

➢ SOFTWARE REQUIREMENTS:
The major software requirements of the project are as follows:
Language : Turbo-C
Operating system: Windows Xp or later.

➢ HARDWARE REQUIREMENTS:
The hardware requirements that map towards the software are as follows:

RAM : 8GB RAM

Processor : INTEL i7 8th gen

3|Page
DATA FLOW DIAGRAM

4|Page
Algorithm

Step1: Start.

Step 2: Enter new element, explore, exit program.

Step 3: If section is correct it goes to step 4 otherwise step 5.

Step 4: Enter information of elements, name, symbol, atomic number, atomic weight.

Step 5: If section 2 is correct it goes to step 6 otherwise step 7.

Step 6: Enter the corresponding numbers, search by name, Search by symbol, search by atomic
number, search by atomic, Weight, return by main menu.

Step 7: Selected name, if steep 7 is correct it goes to step 8 otherwise step 9.

Step 8: Enter the name of the compound.

Step 9: Selected symbol, if step 9 is correct it goes to step 11

Otherwise step 10.

Step 10: Selected symbol, if step 10 is correct it goes to step 11 otherwise step12.

Step 11: Enter the symbol of compound.

Step 12: Selected atomic number, if step 12 is correct it goes to step 13 otherwise step 14.

Step 13: Enter the atomic number of compound.

Step 14: Selected atomic weight, if step 14 is correct it goes to step 15 otherwise step 16.

Step 15: Enter the atomic weight of compound.

Step 16: Section 6.

Step17: If step16 is correct it goes to step 18 otherwise step19.

Step 18: Go to stop.

Step 19: Section is 3, if step 19 is correct it goes to step 18

Step 20:print “thank you bye”.

5|Page
Step 21: Stop.

IMPLEMENTATION
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
struct element{
char name[20];
char sb[5];
int atm;
float atms;
char block;
char atc[20];
}p,q;
int rw,cl;
FILE*fp;
void add();
void explor();
void print();
void mainscreen();
void main()
{
int a,i,n,y;
char c,d;
char date1[15],date2[15],string1[20];
unsigned int tsz;

clrscr();
mainscreen();
label1:

textcolor(15);
gotoxy(22,15);textcolor(14);
cprintf("Enter the corresponding no");gotoxy(22,19);textcolor(10);
cprintf("1.Add new Element Information");gotoxy(22,21);
cprintf("2.Explore");gotoxy(22,23);
cprintf("3.Quit");gotoxy(22,25);

fflush(stdin);
d=getch();
switch(d)
{
case '1':
{
add();

break;
6|Page
}
case '2':
{
explor();
break;

}
case '3':
{
clrscr();
mainscreen();
textcolor(14); gotoxy(30,24);
cprintf("THANK U");gotoxy(30,26);
cprintf("BYE...........");
getch();
exit(1);
break;
}

default:
{
clrscr();
mainscreen();
textcolor(12+128);gotoxy(22,11);
cprintf("Wrong choice");gotoxy(22,13);textcolor(15);
cprintf("Retype choice");
goto label1;
}

}
clrscr();
mainscreen();
goto label1;
}
void mainscreen()
{
int i,j;
clrscr();
for(i=2,j=2;i<rw;j++)
{
if(j>15)
j=2;

textcolor(j);
gotoxy(i,2);
cprintf("%c",'*');
gotoxy(i,cl-1);
cprintf("%c",'*');
i++;

7|Page
}
for(i=2,j=2;i<cl;i++,j++)
{
if(j>15)
j=2;
textcolor(j);
gotoxy(2,i);
cprintf("%c",'*');
gotoxy(rw-1,i);
cprintf("%c",'*');

}
gotoxy(30,4);textcolor(3);
cprintf("Modern Periodic Table");
gotoxy(37,6);textcolor(6);
cprintf("Digital");
gotoxy(35,7); textcolor(15);
cprintf("-----------");
}
void add()
{
char ch;
label1:
clrscr();
mainscreen();
gotoxy(15,14);textcolor(10);
cprintf("Enter the Information of Elements:");
gotoxy(15,16);
cprintf("Name:");

gotoxy(15,18);
cprintf("Symbol:");

gotoxy(15,20);
cprintf("Atomic No: ");

gotoxy(15,22);
cprintf("Atomic Wt: ");

textcolor(15);
fflush(stdin);
gotoxy(20,16);
scanf("%[^\n]",p.name);
p.name[0]=toupper(p.name[0]);

fflush(stdin);
gotoxy(23,18);
scanf("%[^\n]",p.sb);
p.sb[0]=toupper(p.sb[0]);

8|Page
fflush(stdin);
gotoxy(25,20);
scanf("%d",&p.atm);

fflush(stdin);
gotoxy(25,22);
scanf("%f",&p.atms);

fflush(stdin);
gotoxy(29,24);
scanf("%[^\n]",p.atc);

if((fp=fopen("data","ab+"))==NULL)
{
printf("Cannot open the file f1");
getch();
exit(1);
}
fwrite(&p,sizeof(p),1,fp);
fclose(fp);
printf("\n\n\n\t\tEnter 'y' for next record(y/n):");
ch=getch();
if(ch=='y')
{
goto label1;
}

}
void explor()
{
char d,c;
FILE *f;
int given_atmic_no,a,i,tsz,n;
float given_atmic_mass;
int flag;
char string[20];
startofexplore:
clrscr();
mainscreen();
label6:
gotoxy(14,14);textcolor(12);
cprintf(" Enter the corresponding no ");gotoxy(17,15);textcolor(3);
cprintf(" 1.Search by 'NAME'");gotoxy(17,17);
cprintf("2.Search by SYMBOL");gotoxy(17,19);
cprintf("3.Search by ATOMIC NUMBER");gotoxy(17,21);
cprintf("4.Search by ATOMIC WEIGHT");gotoxy(17,23);
cprintf("5.Return to main menu");gotoxy(17,25);
fflush(stdin);

9|Page
d=getch();
switch(d)
{
case '1':
{
clrscr();
mainscreen();
gotoxy(15,25);
textcolor(12);
cprintf("Enter the Name of Element:");
textcolor(3);
fflush(stdin);
scanf("%[^\n]",string);
printf("%s",string);
string[0]=toupper(string[0]);
if((fp=fopen("data","rb+"))==NULL)
{
clrscr();

printf("\n cannot open the record file 1");


getch();
exit(1);
}
flag=1;
while(fread(&p,sizeof(p),1,fp))
{
if(strcmp(p.name,string)==0)
{
print();
flag=0;
break;
}

}
if(flag==1)
{
clrscr();
mainscreen();
gotoxy(25,25);
textcolor(12);
cprintf("::No Element Available::");

fclose(fp);
getch();
break;
}
case '2':
{

10 | P a g e
clrscr();
mainscreen();
gotoxy(22,15);
textcolor(12);
cprintf("Enter the symbol:");
textcolor(3);
fflush(stdin);
scanf("%[^\n]",string);
printf("%s",string);
string[0]=toupper(string[0]);
if((fp=fopen("data","rb+"))==NULL)
{
clrscr();

printf("\n cannot open the record file 1");


getch();
exit(1);
}
flag=1;
while(fread(&p,sizeof(p),1,fp))
{
if(strcmp(p.sb,string)==0)
{
print();
flag=0;
break;
}

}
if(flag==1)
{
clrscr();
mainscreen();
gotoxy(25,25);
textcolor(12);
cprintf("::No Element Available::");

fclose(fp);
getch();
break;
}
case '5':
{
return;
}
case '3':
{
clrscr();

11 | P a g e
mainscreen();
gotoxy(15,25);
textcolor(12);
cprintf("Enter the Atomic No. Element:");
textcolor(3);
fflush(stdin);
scanf("%d",&given_atmic_no);
if((fp=fopen("data","rb+"))==NULL)
{
clrscr();

printf("\n cannot open the record file 1");


getch();
exit(1);
}
flag=1;
while(fread(&p,sizeof(p),1,fp))
{
if(p.atm==given_atmic_no)
{
print();
flag=0;

break;
}

}
if(flag==1)
{
clrscr();
mainscreen();
gotoxy(25,25);
textcolor(12);
cprintf("::No Element Available::");

fclose(fp);
getch();
break;
}
case '4':
{
clrscr();
mainscreen();
gotoxy(15,22);
textcolor(12);
cprintf("Enter the Atomic mass of Element:");
textcolor(3);
fflush(stdin);

12 | P a g e
scanf("%f",&given_atmic_mass);
if((fp=fopen("data","rb+"))==NULL)
{
clrscr();

printf("\n cannot open the record file 1");


getch();
exit(1);
}
flag=1;
while(fread(&p,sizeof(p),1,fp))
{
if(p.atms==given_atmic_mass)
{
print();
flag=0;

break;
}

}
if(flag==1)
{
clrscr();
mainscreen();
gotoxy(25,25);
textcolor(12);
cprintf("::No Element Available::");

fclose(fp);
getch();
break;
}
default:
{
clrscr();
mainscreen();
textcolor(12+128);gotoxy(22,11);
cprintf("Wrong choice");gotoxy(22,13);textcolor(15);
cprintf("Retype choice");
goto label6;
}
}
goto startofexplore;

}
void print()
{

13 | P a g e
clrscr();
mainscreen();
gotoxy(15,16);
cprintf("Name:");

gotoxy(15,18);
cprintf("Symbol:");

gotoxy(15,20);
cprintf("Atomic No: ");

gotoxy(15,22);
cprintf("Atomic Wt: ");

gotoxy(15,24);
cprintf("Atomic Config:");
fflush(stdin);
gotoxy(15,26);
cprintf("Block:");

gotoxy(15,28);
cprintf("Properties:");

textcolor(6);

gotoxy(20,16);
cprintf("%s",p.name);

gotoxy(23,18);
cprintf("%s",p.sb);

fflush(stdin);
gotoxy(25,20);
cprintf("%d",p.atm);

fflush(stdin);
gotoxy(25,22);
cprintf("%f",p.atms);

fflush(stdin);
gotoxy(29,24);
cprintf("%s",p.atc);

gotoxy(21,26);
cprintf("%c",p.block);

14 | P a g e
INTEGRATION AND SYSTEM TESTING
OUTPUTS
Screen Shots:

15 | P a g e
16 | P a g e
CONCLUSION

The project will help you to understand file handling in C i.e.


creating a file and accessing the stored data in the file, modifying
and removing the stored data. This Modern Periodic Table project
in C will also help you to understand the use of functions as well as
different parameters of C programming language.

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, and some important
properties as well as to display them as per requirement of the user.

17 | P a g e

You might also like