Monday, January 24, 2011

SALARY MANAGEMENT SYSTEM

TABLE OF CONTENTS

1. Introduction

2. Requirement Analysis

3. System Design

4. Source code

5. Future scope of project


INTRODUCTION

In the existing system, most of the records are maintained on paper. It becomes very inconvenient to modify the data. In the existing system, here is a possibility that the same data in different registers may have different values which means the entries of the same data do not match. This inconsistent state does not supply the concrete information which poses a problem in the case information related to particular search record.

Our project is very useful. User is no longer required to check his register in search of records, as now it can be searched over the software by choosing some options. The user need not to type in most of the information. He/she is just required to enter the desired options. On the whole it liberates the user from keeping lengthy manual records. In a nutshell, it abates the work load of an organization.

In today’s world, no one likes to perform calculations on calculator or manually when computer is there. Everyone wants his/her work to be done by computer automatically and displaying the result for further manipulations.

This term paper project is just an application of the language C in developing softwares. This is the program for keeping records of the salary ,that is the entire details of the customer ,savings ,how much money he/she can deposit and withdraw from the bank, to open the new account ,create a new account ,display all account holders, balance enquiry etc.

REQUIREMENT ANALYSIS

This process is adopted when management of the system development, Personnel decide that the particular system needs improvement. The system development life cycle is the set of activities, carried out by the analyst, designers and users to develop and implement a system. The systems that are present in the nature follow common life cycle pattern. For example consider the raining system. Initially the rain falls into the river, river flows into sea, the sea water evaporates to form vapors, the vapors form clouds which again bring rain. Similarly consider a man made system initially a system is analyzed, designed and made operational by the efforts of system analysis. After successful operation or a number of users, the system becomes less and less effective by change in the environment. So these changes have to be incorporated in to the system by minor modifications. So the general activities from the life cycle of the system are given below:

  • Select ion and identification of the system to be studied
  • Preliminary study
  • Defining the system
  • Design and development of the system

Implementation of the system

#include //header file that contains printf and scanf function

#include//header file contains functions of string

typedef struct Employee//convert any identifier to a data type

{

char fname[20];//Structured declared variable of some data type

char lname[20];

char sub_taken[20];

char last_edu[20];

char join_date[20];

int id;

int age;

float bsal;

}Employee;//Structure Variable

int main(void)//void type of argument is passed

{

int id, check;

FILE *fp,*ft;//File Pointer

char another,choice;

Employee emp;

char fname[20];

char lname[20];

long int recsize;

fp=fopen("EMP.DAT","rb+");//file is opened at read mode

if(fp==NULL)

{

fp=fopen( "EMP.DAT","wb+");//file is opened at write mode

if(fp==NULL)//checking the whether the file exists or not

{

printf("Can't Open File");

}

}

recsize=sizeof(emp);//gives the size of emp variable using structure

while(1)

{

printf("1.Add Records 2.Delete Records 3.Modify Records 4.ListRecords 5.Exit");

printf("Enter your choice");

fflush(stdin);//If the given stream has a buffered output,fflush writes the output for the stream to the associated file

scanf("%c",&choice);

switch(choice)//checking entered choice

{

case'1':

fseek(fp,0,SEEK_END);//sets the file pointer associated with the stream to a new pointer

another='Y';

while(another=='Y'|| another=='y')

{

printf("Enter the first name,last name,age and basic salary : ");

scanf("%s %d %f",emp.fname,&emp.age,&emp.bsal);

printf("Enter joining date,id,last education,subject taken");

scanf("%s %d %s %s",emp.join_date,&emp.id,emp.last_edu,

emp.sub_taken);

fwrite(&emp,recsize,1,fp);//writes to a stream

printf(" Add another Record (Y/N): ");

fflush(stdin);

another=getchar();

}

break;

case '2':

another='Y';

while(another=='Y'|| another=='y')

{

printf("Enter the id of the employee to be deleted : ");

scanf("%d",&id);

ft=fopen("TEMP.DAT","wb");//another file is opened

rewind(fp);//Reposition file pointers to stream’s beginning

while(fread(&emp,recsize,1,fp)==1)

{

if(emp.id!=id)

fwrite(&emp,recsize,1,ft);//Contents are added if the file does not have that data

}

fclose(fp);//Fp File is closed

fclose(ft);//Ft File is closed

remove("EMP.DAT");//removes data if found

rename("TEMP.DAT","EMP.DAT");//renames the file

fp=fopen("EMP.DAT","rb+");

printf("Delete another Record(Y/N): ");

fflush(stdin);

another=getchar();

}

break;

case '3':

another='Y';

while(another=='Y'|| another=='y')

{

printf(" Enter name of employee to modify : ");

scanf("%s",emp.fname);

rewind(fp);

while(fread(&emp,recsize,1,fp)==1)

{

if(emp.id!=id)

{

printf("Enter new fname,new lname,age,basicsalary,joining_date,subject taken and last education : ");

scanf("%s%s%d%f%s%s%s",emp.fname,emp.lname,&emp.age,&emp.bsal,emp.join_date,emp.sub_taken,emp.last_edu);

fseek(fp,-recsize,SEEK_CUR);

fwrite(&emp,recsize,1,fp);

break;

}

}

printf("Want to Modify another record(Y/N): ");

fflush(stdin);

another=getchar();//taking Input

}

break;

case '4':

rewind(fp);

while(fread(&emp,recsize,1,fp)==1)

printf("%s %s %d%g",emp.fname,emp.lname,emp.age,emp.bsal,emp.join_date,emp.last_edu,emp.sub_taken);

break;

case '5':

fclose(fp);//File is closed

return 0;

}

}

}

FUTURE SCOPE OF THE PROJECT

Our project will be able to implement in future after making some changes and modifications as we make our project at a very low level. So the modifications that can be done in our project are:-

This project can be implement only at small bank branches. It cannot be used for large scale bank purposes.

No comments:

Post a Comment