Enquiry Management System
Enquiry Management System
ARDENT COLLABORATIONS
CONTENTS:
System Feasibility Background Functional Requirements Project Goals Requirement Specifications Design Coding Index
REQUIREMENT SPECIFICATIONS:
o Background:
This C encoded software is designed for management of enquiry database systems. This application keeps record of enquiry logs regarding admission purposes & provides information data on the same. Users who can benefit are listed below: The enquirer who is interested in taking admission in a particular course or knowing all details prior to taking admission. The registrar who wants to keep a thorough & simplified track of records of enquiries & admissions. This software has the following features: A dynamic allocation system for storage of enquirer name, ID & a search & match feature at the time of admission. Option for storage of Course sought by enquirer. Feature to inform the enquirer of the corresponding fees for the course sought.
o Functional Requirement: The enquiry management system has been built on Turbo C for processing. Platform dependence & efficiency has been provided by this application. The functional requirement of the system: For ENQUIRY: Here students get their id. For ADMISSION: Here students get admission using another function (search). o Project Goals: The enquiry management system is an application based on c to be used by user which will update navigate & add the new records into the structure. User Login/ Insertion of valid choice Users have to insert valid choice according to the display. Enquiry- By enquiry users gives Id number to the individual students. Admission- Here students will be admitted with their id number by the user. Logout/Exit- User can exit by inserting valid choice according to the display.
DATA FLOW DIAGRAM Here we follow DeMarco & Yourdon Symbols: Level 0/ Context diagram
USER
0.0
I/P DATA FEEDBACK DATA
EMS
STUDENT
Level 1
USER
3.
.
1.
2.
STUDENT
4.
5.
6.
ENQUIRY
(0.0.1)
SEARCH
(0.0.1)
ADMISSION
(0.0.1)
CODE
#include<stdio.h> #include<process.h> #include<conio.h> #include<malloc.h> #include<string.h> static int i; typedef struct enquiry { int id; char name[20]; char course[20]; }ENQ; typedef struct admission { int id; char name[20]; char course[20]; float fees; }ADM; void insertENQ(FILE *fp) { ENQ *data; clrscr(); data=(ENQ *)malloc(sizeof(ENQ)); printf("\n\t Enter the name : "); fflush(stdin); gets(data->name); printf("\n\t Enter the course : "); gets(data->course); /* Generating the unique ID */ data->id=i++; printf("\n\t The id : %d", data->id); fprintf(fp,"%d%s%s",data->id,data->name,data->course); }
Contd..
ENQ *search(ENQ *t,FILE *fp,int id) { ENQ *q; ENQ *ab; char str[50]; *ab=*t; while(fread(ab,sizeof(ENQ),1,fp)==EOF)
void add(ENQ *p,FILE *fp) { ADM ob; printf("Enter fee details:--- "); fflush(stdin); scanf("%f",&ob.fees); printf("\nFees=%f",ob.fees);
{
if(ab->id==id) { printf("\n%s",ab->name); strcpy(q->name,ab->name); strcpy(q->course,ab->course); } else { printf("\nID Does not exist"); } } } return q; }
Contd..
void add(ENQ *,FILE *); ENQ *search(ENQ *,FILE *,int); void insertENQ(FILE *); void main() { FILE *fp, *fp1; int ch, id; ENQ *s,*p; clrscr(); do { printf("\n\t Enter your choice : "); printf("\n\t 1. Enquiry "); printf("\n\t 2. Admission "); printf("\n\t 3. Exit ");
case 1 : {
fp=fopen("ENQUIRY.txt", "a"); printf("ENQUIRY FORM"); insertENQ(fp); break; }
Contd..
case 2 : { fp=fopen("ADMISSION.txt", "a"); fp1=fopen("ENQUIRY.txt", "r"); printf("ADMISSION FORM"); printf("\n\t Enter your ID : "); scanf("%d",&id); p=search(s,fp1,id); add(p,fp); break; } case 3 : exit(0); default : printf("\n\n\t Invalid Choice"); } } while(ch!=3); }
CODING STANDARDS: Use proper names methods. All variables must begin with a small alphabet and follow Hungarian Notation. Avoid using variables with no proper descriptions.
Environment Requirements System Requirements: Operating System: Windows 98, Windows XP, Windows Vista, Windows 7, Linux, Mac.
Hardware: Minimum Intel Dual Core processor,256 MB RAM Software: Turbo C and Turbo C++