New Member FAQ | Forums | Earn Revenue | Posting Guidelines | Help Topics | Admissions 2013
Awards & Gifts
 
Login Login    Register      

ArticlesPractice TestsAsk ExpertsQuestion PapersJobsUniversitiesCollegesCoursesSchoolsTraining

Active Members
TodayLast 7 Daysmore...

Join our online Google+ community for Bloggers, Content Writers and Webmasters




Dealer Book Management System using C++


Posted Date:     Total Responses: 0    Posted By: S B Choudhary   Member Level: Gold   Points/Cash: 5   


// PROJECT ON DEALERS BOOK MANAGEMENT SYSTEM


#include
#include
#include
#include
#include
#include


//****************************************************

int con; //Global variables
char found,confirm;

//****************************************************

ofstream ofile,ofi;
ifstream ifile;

//****************************************************

void book(); //Function declaration
void cancellation();
void registered_customers();
void servicing();
void customers_benefitted();
void exit();

//****************************************************


class booking
{
char name[50];
int age;
char sex;
char address[80];
char model[20];
long double rate;
int dd;
int mm;
int yy;
public:
int cust_no;
void entry();
void disp1();
void show();
int getname()
{
return name[50];
}
}details;


//****************************************************



void booking::entry()
{
cout< cout<<"\t"< cout<<"\n Customer no : ";
cin>>cust_no;
cout<<"\n Date : \n";
cin>>dd>>mm>>yy;
cout<<"\n Name : \n";
gets(name);
cout<<"\n Age : \n";
cin>>age;
cout<<"\n Sex : \n";
cin>>sex;
cout<<"\n Address : \n";
gets(address);
cout<<"\n Model : \n";
gets(model);
cout<<"\n Price : \n";
cin>>rate;
}

//****************************************************


void booking::show()
{
cout<<"\n"< cout<<"\t "< cout<<"\t "< cout<<"\t "<}

//****************************************************



class service
{
public:
int cust_no;
int dd;
int mm;
int yy;
char name[30];
char model[20];
int amount;
void print();
void enter()
{
cout<<"\n enter the customer no :";
cin>>cust_no;
cout<<"\n enter the date of servicing :";
cin>>dd>>mm>>yy;
cout<<"\n Enter name of the customer : ";
gets(name);
cout<<"\n Enter model no. : ";
gets(model);
cout<<"\n Enter amount paid : ";
cin>>amount;
}
}serve;


//*******************************************




void service::print()
{
cout<<"\n"< cout<<"\t "< cout<<"\t "< cout<<"\t "<}


//************************************************


void main()
{
clrscr();
char pass[5];
char confirm;
char found,ch;
int c;
cout<<"\n\n\n\n\t\t\t ENTER THE PASSWORD \n";
cout<<"\n\n\t\t\t";gets(pass);
if(pass[0]=='d'&&pass[1]=='i'&&pass[2]=='r'&&pass[3]=='t'&&pass[4]=='y')
{
do
{
clrscr();
cout<<"\n\t\t\t\tCHOICE MENU \n";
cout<<"\n\n\n\t\t\t 1.BOOKING";
cout<<"\n\n\n\t\t\t 2.CANCELLATION";
cout<<"\n\n\n\t\t\t 3.REGISTERED_CUSTOMERS";
cout<<"\n\n\n\t\t\t 4.SERVICING";
cout<<"\n\n\n\t\t\t 5.CUSTOMERS BENEFITTED";
cout<<"\n\n\n\t\t\t 6.EXIT \n";
cout<<"\n enter your choice : ";
cin>>c;
switch(c)
{
case 1:book();
break;
case 2:cancellation();
break;
case 3:registered_customers();
break;
case 4:servicing();
break;
case 5:customers_benefitted();
break;
case 6:exit();
break;
}
cout<<"\n do you want to continue with the program : ";
cin>>ch;
}while(ch=='Y'|ch=='y');
}
else
{cout<<"\n Sorry you have entered wrong password";
getch();
}
exit(0);
}


//***********************************************


void book()
{
clrscr();
int n;
cout<<"\n enter the entries you want to make : ";
cin>>n;
con=n;
ofile.open("book.txt",ios::in|ios::binary);
for(int i=0;i{
details.entry();
ofile.write((char*)& details,sizeof(details));
}
ofile.close();
clrscr();
}
void exit()
{
exit(0);
}


//***************************************



void registered_customers()
{clrscr();
cout<<"\n Name\t Date\t Model No.\t Amount";
booking s1;
fstream f1;
f1.open("book.txt",ios::in|ios::binary);
while(!f1.eof())
{
f1.read((char *)&s1,sizeof(s1));
s1.show();
}
f1.close();
getch();
clrscr();
}



//*********************************************


void cancellation()
{
int no;
ofile.open("booking1.txt",ios::in|ios::binary);
ifile.open("book.txt",ios::in|ios::binary);
cout<<"\n enter the no of customer whose details you want to delete : ";
cin>>no;
while(!ifile.eof())
{
ifile.read((char*)&details,sizeof(details));
if((details.cust_no)!=no)
{
cout<<"\n Are you sure you want to delete this record? ";
cin>>confirm;
if(confirm=='y')
ofile.write((char*)&details,sizeof(details));
}

}
if(found=='f')
cout<<"\n Record not found!!\n";
ifile.close();
ofile.close();
remove("book.txt");
rename("booking1.txt","book.txt");
cout<<"\n File is deleted ";
clrscr();
}


//**********************************************


void servicing()
{
serve.enter();
ofile.open("servicing.txt",ios::in|ios::binary);
ofile.write((char*)&serve,sizeof(serve));
ofile.close();
clrscr();
}




//**************************************************


void customers_benefitted()
{
clrscr();
cout<<"\n Name\t Date\t Model No.\t Amount";
ifile.open("servicing.txt",ios::in|ios::binary);
while(!ifile.eof())
{ifile.read((char*)&serve,sizeof(serve));
serve.print(); }
ifile.close();
getch();
clrscr();
}

//**************************************************


Project Feedbacks

Author: Member Level: BronzeRevenue Score: 2 out of 52 out of 5
hi.this program was very useful.can i get mini project ideas for foreign trading system in object oriented analysis and design


Author: Member Level: SilverRevenue Score: 1 out of 5
Thank you for submitting such a useful topic. It really works.


Post Feedback
You must Sign In to post a feedback.
Next Project: Class Record Management
Previous Project: Program To Demonstrate Function Overloading in C++ PProgramming

Return to Project Index

Post New Project


Related Projects

Subscribe to Email
  • Get Jobs by Email
  • Forum posts by Email
  • Articles by Email
  • Online Membersjeeshan
    jabir
    sweet
    Brijendra Kumar Singh
    priya
    hemanth
    Kokil Kumar Sarma
    Sultan Mustafijul Hoque
    Manjunath
    Sun
    Komal Sood
    More...


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    AdSense Revenue Sharing sites   Advertise   Talk to Tony John
    ISC Technologies, Kochi - India. Copyright © All Rights Reserved.