Monday, January 24, 2011

FERTILIZER Management system

TABLE OF CONTENTS

S.No

Content

1

INTRODUCTION

2

Proposed system

(a) Description

(b) System Requirements

3

Requirement analysis

4

System Design

5

Source code

6

Testing

7

Future scope of project

OVERVIEW TO C

HISTORY OF C:

C is a popular general purpose programming language. It is one of the most popular computer languages today, because it is a structured, high level, machine independent language.

The root of all modern language is ALGOL, introduced in early 1960’s. ALGOL was the 1st computer language to use a block structure. Subsequently, several other languages were announced after 1960’s. In 1967, Martin Richard developed a language called BCPL i.e. basic combined programming language mainly for writing system software. In 1970, Ken Thompson created a language using many features of BCPL and called it simply B. B was used to create early version of UNIX operating system.

C was evolved from ALGOL, BCPL, and B by Dennis Ritchie at the Bell Laboratories in 1972, strongly associated with UNIX. During 1970’s, C had evolved into the “TRADITIONAL C”. With the publication of the book ‘The C Programming language’ by Brian Kernighan and Dennis Ritchie in 1978, it becomes more powerful.

In 1983, American National Standards Institutes (ANSI) appointed a technical committee to define a standard for C. The committee approved a version of C in December 1989, which is now known as ANSI C. It was then approved by International Standard Organization (ISO) in 1990.

IMPORTANCE OF C:

The increasing popularity of C is probably due to its many desirable qualities. The C compiler combines the capabilities of an assembly language with the features of a high level language and therefore it is well suited for writing both system software and business packages. In fact many of the C compilers available in the market are written in C. Programs written in C are efficient and fast. This is due to its variety of data types and powerful operators. It is many times faster than BASIC.

There are only 32 key words in ANSI C and its strength lies in its built in functions. C is highly portable; this means that C programs written for one computer can be run on another with little or no modifications. C language is well suited for structured programming, thus requiring the user to think of a problem in terms of function modules or blocks. This modular structure makes program de-bugging, testing and maintenance easier. Another important feature of C is its ability to extend itself. We can continuously add our own functions to C library, thus our programming task becomes so easier and simple.

INTRODUCTION:

We have discussed so far various features of C language and are ready to write and execute program of modest complexity. However, before attempting to develop complex programs, it is worthwhile to consider some programming techniques that would help design efficient and error free.

The program development process includes three important stages, namely, program design, program coding and program testing. All the three stages contribute to the production of high quality program.

In “FURTILIZER MANAGEMENT SYSTEM” we have done system design, source coding, and program testing and added many more features to facilitate the user with the best. We have given the user the facility to enter the Student’s record and see whether the user is provided with the complete information.

We can improve the efficiency of the system, thus overcome the drawbacks of the existing system.
· Less human error
· Strength and strain of registers and papers can be reduced
· High security
· Data consistency
· Easy to handle
· Easy data updating
· Easy record keeping
· Backup data can be easily generated

Introduction of program management system

We can make this Student record management system in C language by using three or more than three header files or many data types such as:

1. #include : this header file will contain Scanf() , Printf () And, there are many header files which are used in this program….

2. #include: this header file will contain Clrscr(); , Getch(); , and many more….

3. #include : this header file will contain string function.

4. #include.h>

SYSTEM REQUIREMENTS

Operating System: Windows 2000/NT/Xp/Vista

RAM: 256 MB or more

HARD DISK 40 GB or more

Processor P3 or High

Compiler Standard C++ Compiler

SYSTEM DESCRIPTION

THE OPERATING SYSTEM USED IN THIS PROJECT IS WINDOWSXPIT HAS MICROSOFT OFFICE INSTALLED IN IT. IT HAS RAM OF 2GB. HARD DISK CAPACITY OF OPERATING SYSTEM IS 250GB. IT CONSISTS OF PENTIUM-4 PROCESSOR.THE OPEREATING SYSTEM ALSO HAS C++ COMPILER. THE SYSTEM ALSO HAS TYPE CONVERSIONS WHICH CONVERT LOWER TO UPPER TYPE. THE OPERATING SYSTEM HAVE 1GB RAM FOR MICROSOFT WORLD.

SOURCE CODE

#include

#include

#include

#include

#include

#include

FILE *fp;

struct furtilizer

{

char snum[13];

char fname[20];

char sname[20];

char mi;

char ccode;

}record;

void Temp1(void);

void twolinebox(int x1,int y1,int x2,int y2)

{

int x,y;

gotoxy(x1,y1); printf("É");

gotoxy(x2,y1); printf("»");

for(y=y1+1;y

gotoxy(x1,y); printf("º");

gotoxy(x2,y); printf("º");

}

gotoxy(x1,y2); printf("È");

gotoxy(x2,y2); printf("¼");

for(x=x1+1;x

gotoxy(x,y1); printf("Í");

gotoxy(x,y2); printf("Í");

}

gotoxy(x1+1,y1+1);

}

void printxy(int x,int y,char string[])

{

gotoxy(x,y); printf("%s",string);

}

void center(int y,char string[])

{

int x=(80-strlen(string)+1)/2;

gotoxy(x,y);printf("%s",string);

}

void Create(void)

{

char opt;

center(21,"WARNING!!!");

center(22,"You are about to create a new file");

center(23,"This will erase all records in the file...");

center(24,"Are you sure you want to proceed?[Y/N] ");

opt=getche(); opt=toupper(opt);

if(opt=='Y')

{

fp=fopen("Group4.txt","w");

center(24," ");

center(24,"File created!");

}

getch();

fclose(fp);

}

void Add(void){

char opt;

fp=fopen("Group4.txt","a");

clrscr();

Temp1();

gotoxy(19,8); scanf(" "); gets(record.snum);

gotoxy(19,10); scanf(" "); gets(record.fname);

gotoxy(19,12); scanf(" "); gets(record.sname);

gotoxy(19,14); record.mi=getche(); record.mi=toupper(record.mi);

gotoxy(19,16); record.ccode=getche();

record.ccode=toupper(record.ccode);

gotoxy(5,22); clreol(); printxy(79,22,"º");

fprintf(fp,"%s %s %s %c %c",record.snum,record.fname,record.sname,record.mi,record.ccode);

gotoxy(5,21); clreol(); center(21,"Record successfully added!");

printxy(79,21,"º"); gotoxy(53,22); delay(1000);

center(22,"Press any key to go to main menu..."); getch();

fclose(fp);

}

void Temp1(void)

{

twolinebox(2,6,79,20);

twolinebox(2,20,79,24);

twolinebox(2,2,79,24);

center(4,"ADD RECORD");

printxy(6,8,"Student no: ");

printxy(6,10,"First Name: ");

printxy(6,12,"Last Name: ");

printxy(6,14,"Middle init:");

printxy(6,16,"Course code: ");

center(22,"Course code: [A]-CompSci, [B]-for InfoTech, [anykey]-Sevices");

gotoxy(19,7);

}

void List(void)

{

int count=0,i,x=0,page=1,CS=0,IT=0,Serv=0;

fp=fopen("Group4.txt","r");

clrscr();

center(2,"ADDRESS");

center(3,"ADDRESS");

center(5,"DEPARTMENT");

printxy(10,7,"Record ");

for(i=1;i<80;i++){>

while(fscanf(fp,"%s %s %s %c %c",&record.snum,&record.fname,&record.sname,&record.mi,&record.ccode)!=EOF)

{

if(count!=0&&count%5==0){ printxy(5,23, "Press any key to continue..."); getch(); x=0;

for(i=10;i<=24;i++){gotoxy(1,i); clreol();}

page++;

}

gotoxy(70,4); printf("Page %d",page);

gotoxy(13,10+x); printf("%d",count+1);

gotoxy(19,10+x); printf("%s",record.snum);

gotoxy(37,10+x); printf("%s, %s %c.",record.sname,record.fname,record.mi);

gotoxy(62,10+x);

switch(record.ccode){

case 'A': printf("CompSci"); CS++; break;

case 'B': printf("InfoTech"); IT++; break;

default : printf("Services"); Serv++; break;

}

x++;

count++;

}

printxy(25,17,"TOTAL");

gotoxy(15,18); printf("Comp Sci: %d",);

gotoxy(15,19); printf("InfoTech: %d",);

gotoxy(15,20); printf("Services: %d",);

printxy(5,23,"Press any key to go to main menu...");

getch();

fclose(fp);

}

void Quit(void){

clrscr();

twolinebox(2,2,79,24);

center(8,"furtilizer");

center(9,"BY");

center(11," ARPAN JOSEPH");

center(13,"name");

center(14,"ISHANT ");

center(15,"57");

delay(5000);

exit(1);

fclose(fp);

}

void Err_mess(void){

sound(1000);

center(22,"Invalid Input!");

delay(1000);

nosound();

}

void main(){

char choice;

do{

clrscr();

twolinebox(29,6,51,8);

twolinebox(20,5,60,18);

twolinebox(2,20,79,25);

twolinebox(2,2,79,25);

center(7,"MAIN MENU");

printxy(30,9,"Press:");

printxy(30,11,"[A]-Create File");

printxy(30,12,"[B]-Add Record");

printxy(30,13,"[C]-List Record");

printxy(30,14,"[D]-Quit Program");

printxy(30,16,"Enter your choice..."); gotoxy(50,16);

choice=getch(); choice=toupper(choice);

switch(choice){

case 'A': Create(); break;

case 'B': Add(); break;

case 'C': List(); break;

case 'D': Quit(); break;

default: Err_mess(); break;

}

}while(choice!='D');

}

No comments:

Post a Comment