Add to Favorites    Make Home Page 3718 Online  
 Language Categories  
 Our Services  

Home » C++ Home » Beginners / Lab Assignments Home » A Departmental Store Program.

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title A Departmental Store Program.
Author Pawan Regmi
Author Email santoreg [at] hotmail.com
Description A perfect program designed for a Departmental Store.
Category C++ » Beginners / Lab Assignments
Hits 401006
Code Select and Copy the Code
#include<iostream.h> #include<graphics.h> #include<dos.h> #include<ctype.h> #include<string.h> #include<fstream.h> #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<iomanip.h> #define BACK 8 #define ENTER 13 char pass[10]="pawan"; class market { private: int ss; char checkername[30]; struct goods { int no; char name[30]; float quantity; float cost_per_unit; }good,temp; struct customer { char name[30]; char add[30]; char telno[30]; char purchase[30]; int day; int mont; int saal; float quan; float rate; float pay; float exp; float profit; }cus; public: int today; int month; int year; int counter(); void ent_good(); void sell(); void update_inventory(); void see_inventory(); void see_product(); void see_customer(); void update(); void bill(customer s); void graph(); int checker(); void expenditure(); void password(); void date(); void time(); void frontpage(); //void cat(); }; void market::date() { struct date d; getdate(&d); gotoxy(58,7); printf("DATE: %d/%d/%d",d.da_mon,d.da_day,d.da_year); today=d.da_day; month=d.da_mon; year=d.da_year; } void market::frontpage() { int gd=DETECT,gm; initgraph(&gd,&gm,"D:\backups\borlandc\bgi"); clrscr(); clearviewport(); setbkcolor(BLACK); setcolor(9); setfillstyle(SOLID_FILL,1); floodfill(486,71,6); rectangle(470,259,630,400); settextstyle(2,HORIZ_DIR,5); setcolor(11); outtextxy(503,270,"A PROJECT ON "); outtextxy(489,280,"DEPARTMENTAL STORE"); outtextxy(505,360+8,". PAWAN REGMI"); setcolor(9); line(470,293,630,293); line(10,400,10,150); line(10,400,140,450); line(10,150,140,108); line(489,293,489,400); setfillstyle(HATCH_FILL,9); fillellipse(320,30,320,30); setfillstyle(CLOSE_DOT_FILL,BLUE); fillellipse(190,280,140,183); settextstyle(3,HORIZ_DIR,4); setcolor(YELLOW); outtextxy(180,12,"THE MAIN MENU"); settextstyle(7,VERT_DIR,3); outtextxy(20,180,"YOUR OPTIONS"); settextstyle(2,VERT_DIR,4); outtextxy(475,301,"Created By:"); settextstyle(7,HORIZ_DIR,2); setcolor(WHITE); outtextxy(90,155+15," NTRY OF GOODS"); outtextxy(90,185+15," ELL GOODS"); outtextxy(90,215+15," IEW INVENTORY"); outtextxy(90,245+15," IND GOOD"); outtextxy(90,275+15," USTOMER DETAIL"); outtextxy(90,305+15," PDATE PRODUCT"); outtextxy(157,335+35,"E IT"); setcolor(YELLOW); outtextxy(87,170,"E"); outtextxy(87,200,"S"); outtextxy(87,230,"V"); outtextxy(87,260,"F"); outtextxy(87,290,"C"); outtextxy(87,320,"U"); outtextxy(168,370,"X"); } void market::time() { struct dostime_t t; _dos_gettime(&t); printf(" TIME: %2d:%02d:%02d. ", t.hour, t.minute,t.second); } int market::counter() { int count=0; ifstream file; file.open("pasal.txt",ios::app|ios::in||ios::binary); file.seekg(0,ios::beg); while(file.read((char*)&good,sizeof(goods))) count++; file.close(); return count+1; } int market::checker() { ifstream fil; int st=0; fil.open("pasal.txt",ios::app|ios::in|ios::binary); fil.seekg(0,ios::beg); while(fil.read((char*)&good,sizeof(goods))) { if(stricmp(checkername,good.name)==0) { st=1; ss=good.no; break; } } fil.close(); return st; } void market::ent_good() { ofstream file; int t_no; char reply; file.open("pasal.txt",ios::app|ios::out); t_no=counter(); cout<<endl<<endl<<endl<<endl<<endl;//gotoxy(1,10); closegraph(); //cin=getch(); cout<<" WE-4 DEPARTMENTAL STORE"; cout<<" ???????????????????????"; cout<<" ITEM NAME : "; gets(checkername); int tk=checker(); if(tk==0) { strcpy(good.name,checkername); good.no=t_no; cout<<" QUANTITY : "; cin>>good.quantity; cout<<" COST PER UNIT : "; cin>>good.cost_per_unit; cout<<" GOOD SUCCESSFULLY ENTERED"; delay(1500); file.write((char*)&good,sizeof(goods)); file.close(); } else { cout<<" The good "<<good.name<<" already exists in store You can update it "; cout<<" Do you want to update it (y/n): "; cin>>reply; cout<<endl<<endl<<" Its product number is: "<<ss<<" "; reply=toupper(reply); if(reply=='Y') { cout<<" UPDATING"; cout<<" ????????"; update(); } } } void market::password() { char pp[20]; int i=0,tt=0; //char as='Y'; for(int ppp=0;ppp<3;ppp++) { clrscr(); gotoxy(12,3); cout<<"ENTER CURRENT PASSWORD: "; while((pp[i]=getch())!=ENTER) { if(pp[i]==BACK) { --i; gotoxy(40+i,3); cout<<" "; } else { gotoxy(40+i,3); cout<<"*"; i++; } } pp[i]='

Related Source Codes

Script Name Author
Moving ball screen saver karlmarx
The Classic Game of Snake & Ladder Lakshmi Narayana .A
Railway seat reservation question which comes in sapient VyomWorld
To calculate percentile Ravi Mathur
Send to folder ANIMESH SAHU
Analog clock and calendar Nazia & Rida
HIGH/LOW GAME MOLLY ARORA
Data structure (stack Implimentation) Swapnil B Adsure
Memory Game AnirudhSanyal
Easy Calc Anirudh Sanyal
GK Quiz Anirudh Sanyal
Hangman Game Manish Jain
Snakeman Manish Jain
Full month Calendar Nigi
Cursor shapes nigi

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2024 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=578


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review