AMCY5.COM
Your Business Partner
Projects Reports Proposals Presentations Letters
Every Thing for Your Business
 
HomeProjectsReportsPresentationsLettersProposalsContact Us
 
Marketing Finance HRM IT OB Research ENT Economics

Final Project on Computerization of a Departmental Store System

Share |

We are providing Projects for your business growth and to meet new challenges. Here are some projects prepared by our team of "Developing New Projects" for the Guarantee of your business growth


Problem Background

I was given a problem to computerize a Departmental Store system of products keeping records, product record and daily entries record. So that these all functions should be carried out in efficient manner. Before this the CURRENT SYSTEM of the departmental store was based on manual approach and it was very difficult for them to record all these transactions and product records properly, so they were having great problems in maintaining such a big record. Recording was not only the problem. They were also having problems like updating, deletion and searching of records. So I was given a chance to make it computerized.

By seeing all these problems I developed a database for this departmental store and the most suitable language is C which will solve all problems in an efficient manner.

 

 

 

 

 

 

 

 

Objectives

 

 

The main objective of this program as I have discussed earlier is to change manual system of a departmental store to computerized system. I have designed this program to store the record of products and entries. It should be adding, deleting, updating, searching and viewing all the records of a particular section when required. It should be having all the qualities given below.

 

It should be easy to operate.

Its processing should be fast.

It should give accurate results.

The records could be accessed easily.

 

 

 

 

Scope Of Program

This program can process:

Code of products and supplier.

Date of products.

Name of products and supplier.

Total products available.

Rate of products.

Quantity of products.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Following are the input specifications of the program:

 

Products Record.

 

 

 

 

 

IDENTIFIERS

DESCRIPTION

DATATYPE

Product Code

A product code should be enters here.

Integer.

Products Available.

Total number of products is this.

Integer.

Product Name

A product name should be enters here.

Character.

Supplier Name

Supplier name should be enters here.

Character.

Supplier code.

Supplier code should be enters here.

Integer.

Product quantity.

Product quantity should be enters here .

Integer.

Product date

Product date should be enters here

Integer

Product rate

Product rate should be enters here

Integer

 

 

 

 

 

 

 

 

 

Jackson Structured Programming

Main Interface

Main menu

 

 

 

 

Initialization

 

F1 F9

Enter Choice *

 

F2

End

Body *

Search product record by date

Search product record by code

Delete Product record

Update product record

View product record

Add product record

C2 C3 C4 C5 C6

 

F4 F5 F6

F7 F8

C1 executes when ‘1’ is pressed

C2 executes when ‘2’ is pressed

C3 executes when ‘3’ is pressed

C4 executes when ‘4’ is pressed

C5 executes when ‘5’ is pressed

C6 executes when ‘6’ is pressed

 

 

 

 

Function List:

F1. Initialize all variables.

F2. Enter your choice.

F3. Enter Products Record.

F4. View Products Record.

F5. Update Products Record.

F6. Delete Product Record.

F7. Search product record by product code.

F8. Search product record by product date.

F9. End of program.

 

 

 

 

 

 

 

 

 

 

Pseudocode

Main

DO

Initialization

Body

End

END DO

Initialization

DO

Initialize all variables

END DO

Body

DO

Display Main Menu

END DO

Main Menu

IF (Option= 1)

DO

Add product record

END DO

IF (Choice = 2)

DO

View product record

END DO

When Choice =3

DO

Update product record

END DO

When Choice = 4

DO

Delete product record

END DO

When choice=5

DO

Search product record by product code

END DO

When choice=6

DO

Search product record by product date

END DO

When choice=7

DO

Ends the program

ENDIF

 

 

 

Add product Record

IF Choice = 1

DO

Add product Record

END DO

DO

Back To Main

ENDDO

ENDIF

Add product Record

DO

READ product code

READ product Name

READ product quantity

READ product date

READ product rate

READ supplier code

READ supplier name

ENDDO

Back To main

 

 

View product Record

DO

Display all product records

END DO

 

Update product record

DO

READ product code

IF Code is found

DO

Update the record

END DO

ELSE

DO

Display Record Not Found

END DO

END IF

END DO

 

Delete products Record

DO

READ product Code

IF product Code is found

DO

Delete the required product record

ENDDO

ELSE

DO

Display Record not Found

END DO

END IF

END DO

 

 

Search product Record by product code

DO

READ product Code

IF product Code is found

DO

Display Record

END DO

ELSE

DO

Display record not found

END DO

END IF

END DO

 

 

 

Search product record by product date

DO

READ product date

IF product date is found

DO

Display Record

END DO

ELSE

DO

Display record not found

END DO

END IF

END DO

 

 

END

DO

Exit the program

END DO

 

 

 

 

 

 

 

#include<stdio.h>

#include<conio.h>

#include<dos.h>

#include<string.h>

#include<stdlib.h>

struct product // Declearing Structure

{

int pro_id,pro_quantity,sup_id,pro_date;

char sup_name[20],pro_name[20];

float pro_rate;

};

struct product pro;

FILE *fp; // Opening or Making File

int a = sizeof(pro);

void add(void);

void view(void);

void psearch(void); // Declearing functions

void dsearch(void);

void update(void);

void delet(void);

void main(void)

{

clrscr();

textcolor(LIGHTCYAN+BLINK); //defining color for first screen

gotoxy(30,7); //printing first screen

cprintf("W E L L C O M E ");

gotoxy(15,10);

cprintf("T O A Q E E L ' s D E P A R T M E N T A L");

gotoxy(27,13);

cprintf("S T O R E S Y S T E M");

textcolor(WHITE);

gotoxy(26,20);

cprintf("Press any key to continue");

getch();

clrscr();

fp = fopen("product.txt","rb+");

if (fp == NULL)

{

fp = fopen("product.txt","wb+");

}

textcolor(WHITE); // defining color

int ans=9;

while (ans!=0) // loop for controlling function's calling

{

if (ans==1)

add();

else if (ans==2)

view();

else if (ans==3)

update();

else if (ans==4)

delet();

else if (ans==5)

psearch();

else if (ans==6)

dsearch();

else if (ans==7)

exit(0);

clrscr();

textcolor(GREEN);

gotoxy(25,1);cprintf(" ***********************");

gotoxy(25,2);cprintf(" * M A I N M E N U *"); //printing main menu

gotoxy(25,3);cprintf(" ***********************");

textcolor(WHITE);

gotoxy(10,6);cprintf("[ 1 ] Add Product Record");

gotoxy(10,8);cprintf("[ 2 ] View Product Record");

gotoxy(10,10);cprintf("[ 3 ] Update Product Record");

gotoxy(10,12);cprintf("[ 4 ] Delete Product Record");

gotoxy(10,14);cprintf("[ 5 ] Search Product Record By Product Code");

gotoxy(10,16);cprintf("[ 6 ] Search Product Record By Product Date ");

gotoxy(10,18);cprintf("[ 7 ] Exit");

textcolor(YELLOW);

gotoxy(10,21);cprintf("\n\nEnter your choice = ");

scanf("%d", & ans);

textcolor(WHITE);

}

 

getch();

}

/* Addition Of Products Record Module */

void add(void)

{

clrscr();

char ans='y';

fseek(fp,0,SEEK_END); // taking cursor to the end of record in file

textcolor(MAGENTA+BLINK); //defining color

gotoxy(30,2);cprintf("<<< ADDITION OF RECORD >>>");

while (ans == 'y' || ans == 'Y') // loop for repeating addition

{

textcolor(WHITE);

printf("\n\n\nEnter product code = "); // entering record

scanf("%d", & pro.pro_id);

fflush(stdin); // to fresh buffer of varriable

printf("\nEnter product name = ");

gets( pro.pro_name);

 

printf("\nEnter product quantity = ");

scanf("%d",&pro.pro_quantity);

 

printf("\nEnter product date = ");

scanf("%d", & pro.pro_date);

 

printf("\nEnter product rate = ");

scanf("%f", & pro.pro_rate);

 

printf("\nEnter supplier code = ");

scanf("%d",&pro.sup_id);

fflush(stdin);

printf("\nEnter supplier Name = ");

gets(pro.sup_name);

 

fwrite(&pro, sizeof(pro),1,fp); // writing record in file

gotoxy(2,50);cprintf("\n\nDo you want to Enter another Record [y/n] : ");

scanf("%c", &ans); // loop for entering more records

clrscr();

}

}

/* View Product Record Module */

void view(void)

{

clrscr();

rewind(fp);

textcolor(GREEN+BLINK); //defining color

cprintf("\n\n <<< DISPALYING PRODUCT RECORDS >>>");

printf("\n\n===================================================================");

printf("\nP.CODE\tP.NAME\tP.QUANTITY\tP.DATE\tP.RATE\t\tS.CODE\tS.NAME\n");

printf("====================================================================");

printf("\n");

while(fread(&pro,sizeof(pro),1,fp)==1) //reading from file

{

textcolor(WHITE);

printf("%d\t",pro.pro_id); //dispalying records in table form

printf("%s\t",pro.pro_name);

printf("%d\t\t",pro.pro_quantity);

printf("%d\t",pro.pro_date);

printf("%f\t",pro.pro_rate);

printf("%d\t",pro.sup_id);

printf("%s\t\n",pro.sup_name);

}

getch();

clrscr();

}

/* Product Updation Module */

void update(void)

{

clrscr();

int point=0;

rewind(fp);

textcolor(LIGHTBLUE+BLINK);

gotoxy(30,2);cprintf("<<< UPDATING PRODUCT RECORD >>>");

printf("\n\n\nEnter Product Code to be updated: ");

// taking p.code for searching record

scanf("%d", &point);

textcolor(WHITE);

while (fread(&pro,sizeof(pro),1,fp) == 1) // loop for reading records from file

{

if (pro.pro_id == point)

{

fseek(fp,-a,SEEK_CUR); // moving backward to one location from current

 

textcolor(WHITE);

printf("\nEnter New Product Code: "); // entering new record

scanf("%d", & pro.pro_id);

fflush(stdin);

printf("\nEnter New Product Name: ");

gets(pro.pro_name);

 

printf("\nEnter New Product Quantity: ");

scanf("%d",&pro.pro_quantity);

 

printf("\nEnter New Product Date: ");

scanf("%d", & pro.pro_date);

 

printf("\nEnter New Product rate: ");

scanf("%f",&pro.pro_rate);

 

printf("\nEnter New Supplier Code: ");

scanf("%d", &pro.sup_id);

fflush(stdin);

printf("\nEnter New Supplier Name: ");

gets(pro.sup_name);

fwrite(&pro,sizeof(pro),1,fp); // writing record in file

textcolor(LIGHTCYAN);

cprintf("\n\n\n* Updated Successfully *\n"); //confirm updating record

textcolor(YELLOW);

getch();

}

else

{

textcolor(LIGHTBLUE);

gotoxy(28,10);

delay(400);

cprintf("* INVALID RECORD *\n");

getch();

}

}

}

/* Deletion Module */

void delet(void)

{

clrscr();

FILE *fpr; // making new file

int point,have=0;

fpr = fopen("file.txt","wb+");

rewind(fp);

textcolor(LIGHTBLUE+BLINK);

gotoxy(30,2);cprintf("<<< DELETION OF RECORD >>>");

printf("\n\n\nEnter Product Code to be Deleted: ");

textcolor(YELLOW);

scanf("%d", & point); // entering required record

while (fread(&pro,a,1,fp) == 1) // reading record

{

if (pro.pro_id != point)

{

fwrite(&pro,a,1,fpr); // writing all records in new file

}

else

have=1;

}

fclose(fpr); // closing new file

fclose(fp); // closing old file

remove ("product.txt"); // removing old file

rename("file.txt","product.txt"); // renaming new file similar to old ones

fp = fopen("product.txt","rb+"); // opening file in read and write mode

if(have==1)

{

textcolor(BROWN);

gotoxy(28,10);

cprintf("* Record deleted *"); //confirming record deletion

textcolor(BROWN);

}

else

{

delay(300);

gotoxy(28,10);

printf("* Cannot Find Record *");

}

getch();

}

/* Product Searching By Product Code Module */

void psearch(void)

{

clrscr();

int point=0; //declaring datatype

rewind(fp);

textcolor(LIGHTCYAN+BLINK); //defining color

gotoxy(30,2);cprintf("<<< SEARCHING OF PRODUCTS >>>");

textcolor(WHITE);

printf("\n\n\nEnter Product Code to Search Record: ");

scanf("%d", & point); //entering code of product

clrscr();

while (fread(&pro,sizeof(pro),1,fp) == 1) //reading record

{

if (pro.pro_id == point) //checking code of product

{

textcolor(WHITE); //defining color

printf("\n");

printf("\n\nPRODUCT CODE = %d",pro.pro_id); //displaying search results

printf("\n\nPRODUCT NAME = %s",pro.pro_name);

printf("\n\nPRODUCT QUANTITY = %d",pro.pro_quantity);

printf("\n\nPRODUCT DATE = %d",pro.pro_date);

printf("\n\nPRODUCT RATE = %f",pro.pro_rate);

printf("\n\nSUPPLIER CODE = %d",pro.sup_id);

printf("\n\nSUPPLIER NAME = %s",pro.sup_name);

 

}

}

getch();

}

/* Product Searching By Product Date Module */

void dsearch(void)

{

clrscr();

int point=0; //declaring datatype

rewind(fp);

textcolor(LIGHTCYAN+BLINK); //defining color

gotoxy(30,2);cprintf("<<< SEARCHING OF PRODUCTS >>>");

textcolor(WHITE);

printf("\n\n\nEnter Product Date to Search Record: ");

scanf("%d", & point); //entering product date to be searched

clrscr();

while (fread(&pro,sizeof(pro),1,fp) == 1) //reading record

{

if (pro.pro_date == point) //checking date of product

{

printf("\n");

textcolor(WHITE); //defining color

printf("\n\nPRODUCT DATE = %d",pro.pro_date); //displaying search results

printf("\n\nPRODUCT NAME = %s",pro.pro_name);

printf("\n\nPRODUCT QUANTITY = %d",pro.pro_quantity);

printf("\n\nPRODUCT CODE = %d",pro.pro_id);

printf("\n\nPRODUCT RATE = %f",pro.pro_rate);

printf("\n\nSUPPLIER CODE = %d",pro.sup_id);

printf("\n\nSUPPLIER NAME = %s",pro.sup_name);

}

}

getch();

}

 

 

 

 

 

 

 

 

 

 

WELCOME SCREEN

 

MAIN MENU

 

ADD PRODUCT RECORD

VIEW PRODUCT RECORD

UPDATE PRODUCT RECORD

 

DELETE PRODUCT RECORD

SEARCH RECORD BY CODE

 

SEARCH RECORD BY DATE

 

 

 

Test Plan

After the completion of a computer program it is necessary to check whether the program is achieving its goal in an efficient manner or not. Is it doing the work for which it was designed or not. So testing is the phase in which we will check each step of our program one by one. It is therefore should be planned first so that no aspect is left. It will serve as a guide through the whole testing process. It will help us in telling whether the program is working properly or not. And also tell us whether all the working is up to expectations or not.

 

 

The main points of checking this program are:

We should check whether the main menu works properly on the selected options or not.

We should see whether Searching is done properly or not and if the record doesn’t exist the program gives error message or not.

We should check whether records can be updated easily or not by only giving the item code.

We should see whether garbage records could be deleted properly or not.

We should check whether we could view all the records through ‘view all records’ option or not.

We should check whether the records could be added easily or not.

We should check whether the program is running properly or not.

We should check whether it is error prove or not.

 

 

 

Test Plan 1

Objective:

The purpose of this test plan is to check whether the main menu works properly through the choices or not.

Test:

I checked it by entering a valid choice and the menu worked as the choice is entered.

Conclusion:

The working of the main menu is satisfied.

Actual Results = Expected Results

 

 

 

Test Plan 2

Objective:

To check whether invalid choices work or not.

Test:

I checked by entering choice except main menu choice

The program doesn’t go anywhere. It only works with valid choices

 

Conclusion:

The working of the main menu is satisfied.

Actual Results = Expected Results

Test Plan 3

Objectives:

The objective of this test is to check whether records in product record can be added easily or not.

 

 

 

 

Test:

I checked it by entering the values in the product record and it did the addition properly and efficiently.

Conclusion:

The working of addition process is satisfied.

Actual results = Expected Results

 

 

 

 

Test Plan 4

Objectives:

The purpose of this test is to check whether the products searching program can search the required record or not.

Test:

I checked it by entering the product code and date of record I just added before in addition process.

Conclusion:

The working of searching process is satisfied.

Actual Results = Expected Results

 

 

Test Plan 5

Objectives:

The objective of this test is to check whether the product record can be easily updated or not.

Test:

I checked it by entering the product code of record I just searched before and it is updated easily.

Conclusion:

The working of book update process is satisfied.

Actual Results = Expected Results

 

 

 

 

 

 

 

 

 

Test Plan 6

Objectives:

The main purpose of this test is to check whether the product record can be deleted or not.

Test:

I checked it by entering the book code of record I just updated before and it was deleted easily and efficiently.

Conclusion:

The book deletion process is working properly.

Actual Results = Expected Results

 

Enter product Code you want to delete : 1

Enter product Code to view its Record : 1

* invalid record *

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Test Plan 7

Objectives:

To check whether program goes back to the main menu properly or not.

Test:

I checked it by entering a value mention to take it back to main program.

Conclusion:

Program is returning to the main menu properly and efficiently.

Actual Results = Expected Results

 

 

 

 

 

 

 

 

 

 

 

 

Test plan 9

Objective:

The purpose of this test is to check whether all choices of main menu are working properly or not.

Test:

I have tested it by entering all the valid choices in main menu.

Conclusion:

All valid options are working properly.

Actual result = expected result

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Test Plan 10

Objectives:

The purpose of this test is to check whether the products program quits properly on pressing the option of exit or not.

Test:

I checked it by entering 7 in the main menu, which is for exit, and it worked properly and efficiently.

Conclusion:

The process of exit is working properly.

 

Actual Results = Expected Results

 

System Requirements

IBM-AT 386 or Higher Compatible Computer

MS-DOS 5 or Higher, Win 95,98

4 MB of RAM (minimum)

101 or 102 Keys Keyboard

A VGA Card with SVGA Monitor

3.25 HD Floppy Drive

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Help Manual

 

Introduction:

This is a program that helps us to store, delete, update, search and view all records in a record file. This program is really easy to use and easily be altered as user requirements. Any computer user, who knows how to operate a computer, can operate it.

It has a self-explanatory sort of main menu, and other options, which can be understood easily.

 

Getting Started:

You can use this program direct from Floppy Disk or you can copy it to hard disk and then use it.

Quick Start:

To run this program from Floppy Disk

Go to A:\

And then run product.exe

“A:\product.exe <enter>”

If you want to run this program from hard disk

Make a folder on hard disk

“c:\ md product <enter>”

Try this command

“A:\ copy *.* c:\product <enter>”

Then

“c:\cd product <enter>

c:\product>product.exe <enter>”

After typing these commands you will be taken to the main menu screen.

 

How to use Main Menu

 

Below is the main menu of the program, its simple to operate. Choose any number and then press the enter key. Your selection will be executed.

You have to choose the numbers i.e. 1,2,3,4,5,6,7.

How To Add A Record

When you have selected the option 1 in the Product record , you have to enter the data as required by the program.

Following are the inputs that will be demanded by the program.

Product code

Product name

Product quantity

Product date

Product rate

Supplier code

Supplier name

 

 

 

 

 

 

 

How To Search A Record

When you have selected the option 5 or 6 in the main menu, you have to enter the data as required by the program.

Following are the inputs that will be demanded by the program.

Product code

Product date

How To Update A Record

When you have selected the option 3 in the main menu, you have to enter the data as required by the program.

Following are the inputs that will be demanded by the program.

Product code

How To Delete A Record

When you have selected the option 4 in the main menu, you have to enter the data as required by the program.

Following are the inputs that will be demanded by the program.

Product code

How To View All Records

When you will select the option 2 in the main menu, you will be able to see all the records .

 

 

 

 

P.code P.name P.quantity P.date P.rate S.code S.name

1 scent 22 10-9-99 4666.78 1 saleem

2 bubble 23 12-9-99 3213.00 2 asif

3 juice 26 13-9-99 12.123 1 kamil

 

How To Exit

When you have selected the option 7 in the main menu you will exit from the program.

 

 

Program Strengths

1- Main strength of this program is that it can save data of a complete departmental store that includes addition, searching, deletion, and modification of product record.

2- We can also view all the records present in a particular module in a tabular form, for example product record.

3- The logic of this program is very simple, easy to operate and can be easily updated as required.

4- It has self-explanatory main menu and other options that are easy to understand.

5- The program is properly indented to understand the logic to its extent.

6- The program is written in small functions or subprograms.

7- The whole program is tested for errors and its efficiency is improved.

8- This program generates simple database for storing data.

9- To avoid confusion for user, unwanted options are avoided.

10-This program is made in C Language version 2.0 and the standard features of the language are used.

 

 

 

 

 

 

Program Weaknesses

There are some weaknesses, which are also present in this program.

1. A record can be over written on to another record if they are having the same item code therefore duplication of record is possible.

2. We cannot print the data efficiently.

3. There are no checks on character, integer, and other data types so user can enter wrong value and it will accept that value.

 

 

 





   
Contact Us Privacy Policy Terms of Service Send Feed Back About Us Help  Copy Rights © 2009 AMCY5.COM All Rights Reserved