


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
brief summer training report.
Typology: Cheat Sheet
1 / 26
This page cannot be seen from the preview
Don't miss anything!



















On special offer
On LPU-OBJECT ORIENTED PROGRAMMING USING C++ - INTERNSHIP Submitted by Vishal Manikpuri Registration No. 11905116 Program Name: Computer Science Engineering Under the guidance of Training and Placement Co-ordinate of LPU. Name of the Industry Coordinate EBOX School of Computer Science & Engineering Lovely Professional University,Phagwara (June-July, 2021)
I hereby declare that I have completed my six weeks summer training at“ EBOX Online” from 1st June to 15th July Under the guidance of “EBOX & Training and Placement Co- ordinator of LPU ”. I have declare that I have worked with full dedication during these six weeks of training and my learning outcomes fulfil the requirements of training for the award of degree of” LPU - Object Oriented Programming using C++ - Internship”, Lovely Professional University, Phagwara. Vishal Manikpuri Registration No: 11905116 Date: 20th^ July 2021 ACKNOWLEDGEMENT
#include
cout<<itemno; gotoxy(13,k); puts(name); } int retno() { return(itemno); } }; class amount: public item { float price,qty,tax,gross,dis,netamt; public: void add(); void show(); void report(); void calculate(); void pay(); float retnetamt() { return(netamt); } } amt; void amount::add() { item::add();
cout<<"\n\n\tPrice: "; cin>>price; cout<<"\n\n\tQuantity: "; cin>>qty; cout<<"\n\n\tTax percent: "; cin>>tax; cout<<"\n\n\tDiscount percent: "; cin>>dis; calculate(); fout.write((char )&amt,sizeof(amt)); fout.close(); } void amount::calculate() { gross=price+(price(tax/100)); netamt=qty(gross-(gross(dis/100))); } void amount::show() { fin.open("itemstore.dat",ios::binary); fin.read((char*)&amt,sizeof(amt)); item::show(); cout<<"\n\n\tNet amount: "; cout<<netamt; fin.close(); } void amount::report() { item::report();
gotoxy(52,5); cout<<"DEDUCTION"; gotoxy(64,5); cout<<"NET AMOUNT"; } } void amount::pay() { show(); cout<<"\n\n\n\t\t*********************************************"; cout<<"\n\t\t DETAILS "; cout<<"\n\t\t*********************************************"; cout<<"\n\n\t\tPRICE :"<<price; cout<<"\n\n\t\tQUANTITY :"<<qty; cout<<"\n\t\tTAX PERCENTAGE :"<<tax; cout<<"\n\t\tDISCOUNT PERCENTAGE :"<<dis; cout<<"\n\n\n\t\tNET AMOUNT :Rs."<<netamt; cout<<"\n\t\t*********************************************"; } int main() { cout.setf(ios::fixed); cout.setf(ios::showpoint); cout<<setprecision(2); fstream tmp("temp.dat",ios::binary|ios::out); menu: system("cls"); gotoxy(25,2);
cout<<"Super Market Billing "; gotoxy(25,3); cout<<"===========================\n\n"; cout<<"\n\t\t1.Bill Report\n\n"; cout<<"\t\t2.Add/Remove/Edit Item\n\n"; cout<<"\t\t3.Show Item Details\n\n"; cout<<"\t\t4.Exit\n\n"; cout<<"\t\tPlease Enter Required Option: "; int ch,ff; float gtotal; cin>>ch; switch(ch) { case 1: ss: system("cls"); gotoxy(25,2); cout<<"Bill Details"; gotoxy(25,3); cout<<"================\n\n"; cout<<"\n\t\t1.All Items\n\n"; cout<<"\t\t2.Back to Main menu\n\n"; cout<<"\t\tPlease Enter Required Option: "; int cho; cin>>cho; if(cho==1) { system("cls"); gotoxy(30,3); cout<<" BILL DETAILS ";
if(ff!=0) gtotal=0; } gotoxy(17,k); cout<<"\n\n\n\t\t\tGrand Total="<<gtotal; getch(); fin.close(); } if(cho==2) { goto menu; } goto ss; case 2: db: system("cls"); gotoxy(25,2); cout<<"Bill Editor"; gotoxy(25,3); cout<<"=================\n\n"; cout<<"\n\t\t1.Add Item Details\n\n"; cout<<"\t\t2.Edit Item Details\n\n"; cout<<"\t\t3.Delete Item Details\n\n"; cout<<"\t\t4.Back to Main Menu "; int apc; cin>>apc; switch(apc) { case 1: fout.open("itemstore.dat",ios::binary|ios::app);
amt.add(); cout<<"\n\t\tItem Added Successfully!"; getch(); goto db; case 2: int ino; flag=0; cout<<"\n\n\tEnter Item Number to be Edited :"; cin>>ino; fin.open("itemstore.dat",ios::binary); fout.open("itemstore.dat",ios::binary|ios::app); if(!fin) { cout<<"\n\nFile Not Found..."; goto menu; } fin.seekg(0); r=0; while(!fin.eof()) { fin.read((char)&amt,sizeof(amt)); if(!fin.eof()) { int x=amt.item::retno(); if(x==ino) { flag=1; fout.seekp(rsizeof(amt)); system("cls");
fin.seekg(0); while(fin.read((char)&amt, sizeof(amt))) { int x=amt.item::retno(); if(x!=ino) tmp.write((char)&amt,sizeof(amt)); else { flag=1; } } fin.close(); tmp.close(); fout.open("itemstore.dat",ios::trunc|ios::binary); fout.seekp(0); tmp.open("temp.dat",ios::binary|ios::in); if(!tmp) { cout<<"Error in File"; goto db; } while(tmp.read((char)&amt,sizeof(amt))) fout.write((char)&amt,sizeof(amt)); tmp.close(); fout.close(); if(flag==1) cout<<"\n\t\tItem Succesfully Deleted"; else if (flag==0) cout<<"\n\t\tItem does not Exist! Please Retry"; getch();
goto db; case 4: goto menu; default: cout<<"\n\n\t\tWrong Choice!!! Retry"; getch(); goto db; } case 3: system("cls"); flag=0; int ino; cout<<"\n\n\t\tEnter Item Number :"; cin>>ino; fin.open("itemstore.dat",ios::binary); if(!fin) { cout<<"\n\nFile Not Found...\nProgram Terminated!"; goto menu; } fin.seekg(0); while(fin.read((char*)&amt,sizeof(amt))) { int x=amt.item::retno(); if(x==ino) { amt.pay(); flag=1; break; }
return 0; }