1. sahib lopez's Avatar
    Get me something to eat I'm hungry. :(
    and here I thought you were going to ask me:P
    02-28-2014 01:50 PM
  2. hope4wp's Avatar
    lets jump him in the kitchen :P
    His mom will be there....noooo!
    Himanshu Chowdhary likes this.
    02-28-2014 01:50 PM
  3. sahib lopez's Avatar
    OK :D.
    Tomorrow 15 km hike, is obligatory for us in school and it is SATURDAY :(

    Sent from my Nokia Lumia 820 using Tapatalk
    that's brutal :/
    02-28-2014 01:51 PM
  4. Himanshu Chowdhary's Avatar
    it's 1:20 A.M , dad prepared kichdhi today :D Nadia do you want to have some ?
    02-28-2014 01:52 PM
  5. sahib lopez's Avatar
    He is asking you to kill him :p
    ooohh he was referring to that 😈 yes I will 😃
    02-28-2014 01:52 PM
  6. Himanshu Chowdhary's Avatar
    His mom will be there....noooo!
    hahahah she's off to sleep so you can :-p
    02-28-2014 01:52 PM
  7. sahib lopez's Avatar
    His mom will be there....noooo!
    hmmmmm we can be ninjas about it ;)!
    02-28-2014 01:53 PM
  8. hope4wp's Avatar
    and here I thought you were going to ask me:P
    you can get me chocolate. :p
    sahib lopez likes this.
    02-28-2014 01:53 PM
  9. hope4wp's Avatar
    it's 1:20 A.M , dad prepared kichdhi today :D Nadia do you want to have some ?
    I'm gonna pass...mum made the same thing =|
    Himanshu Chowdhary likes this.
    02-28-2014 01:54 PM
  10. Himanshu Chowdhary's Avatar
    now I have lot of pending homework to do , have to create banking system project and super market billing program :(
    02-28-2014 01:54 PM
  11. sahib lopez's Avatar
    you can get me chocolate. :p
    I'm only second best D: nooooo *puts down egg launcher and walks back *
    02-28-2014 01:54 PM
  12. MSFTisMIA's Avatar
    Rakuten.com has the international version in Grey for $420, not a great price but still....
    Amazon.com has it for $385
    ExpansysUSA has the unlocked LTE models for $420 including shipping. The regular Chinese site I use has it for $408 including shipping.

    The new Chinese site, if accurate, has the 3G model for $280 with free shipping and $400 for the LTE model and for the 1020 at that $400 price point.

    Thanks for checking around. The model i have trying to fix is an unlocked LTE (Asian) model, so we will see what happens...
    02-28-2014 01:55 PM
  13. hope4wp's Avatar
    now I have lot of pending homework to do , have to create banking system project and super market billing program :(
    Shu should shtudy :p
    Himanshu Chowdhary likes this.
    02-28-2014 01:55 PM
  14. Himanshu Chowdhary's Avatar
    //***************************************************************
    // HEADER FILE USED IN PROJECT
    //****************************************************************

    #include<conio.h>
    #include<stdios.h>
    #include<process.h>
    #include<fstream.h>

    //***************************************************************
    // CLASS USED IN PROJECT
    //****************************************************************

    class product
    {
    int pno;
    char name[50];
    float price,qty,tax,dis;
    public:
    void create_product()
    {
    cout<<"\nPlease Enter The Product No. of The Product ";
    cin>>pno;
    cout<<"\n\nPlease Enter The Name of The Product ";
    gets(name);
    cout<<"\nPlease Enter The Price of The Product ";
    cin>>price;
    cout<<"\nPlease Enter The Discount (%) ";
    cin>>dis;
    }

    void show_product()
    {
    cout<<"\nThe Product No. of The Product : "<<pno;
    cout<<"\nThe Name of The Product : ";
    puts(name);
    cout<<"\nThe Price of The Product : "<<price;
    cout<<"\nDiscount : "<<dis;
    }

    int retpno()
    {return pno;}

    float retprice()
    {return price;}

    char* retname()
    {return name;}

    int retdis()
    {return dis;}

    }; //class ends here



    //***************************************************************
    // global declaration for stream object, object
    //****************************************************************

    fstream fp;
    product pr;


    //***************************************************************
    // function to write in file
    //****************************************************************

    void write_product()
    {
    fp.open("Shop.dat",ios::out|ios::app);
    pr.create_product();
    fp.write((char*)&pr,sizeof(product));
    fp.close();
    cout<<"\n\nThe Product Has Been Created ";
    getch();
    }


    //***************************************************************
    // function to read all records from file
    //****************************************************************


    void display_all()
    {
    clrscr();
    cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n";
    fp.open("Shop.dat",ios::in);
    while(fp.read((char*)&pr,sizeof(product)))
    {
    pr.show_product();
    cout<<"\n\n====================================\n";
    getch();
    }
    fp.close();
    getchh();
    }


    //***************************************************************
    // function to read specific record from file
    //****************************************************************


    void display_sp(int n)
    {
    int flag=0;
    fp.open("Shop.dat",ios::in);
    while(fp.read((char*)&pr,sizeof(product)))
    {
    if(pr.retpno()==n)
    {
    clrscr();
    pr.show_product();
    flag=1;
    }
    }
    fp.close();
    if(flag==0)
    cout<<"\n\nrecord not exist";
    getch();
    }


    //***************************************************************
    // function to modify record of file
    //****************************************************************


    void modify_product()
    {
    int no,found=0;
    clrscr();
    cout<<"\n\n\tTo Modify ";
    cout<<"\n\n\tPlease Enter The Product No. of The Product";
    cin>>no;
    fp.open("Shop.dat",ios::in|ios::out);
    while(fp.read((char*)&pr,sizeof(product)) && found==0)
    {
    if(pr.retpno()==no)
    {
    pr.show_product();
    cout<<"\nPlease Enter The New Details of Product"<<endl;
    pr.create_product();
    int pos=-1*sizeof(pr);
    fp.seekp(pos,ios::cur);
    fp.write((char*)&pr,sizeof(product));
    cout<<"\n\n\t Record Updated";
    found=1;
    }
    }
    fp.close();
    if(found==0)
    cout<<"\n\n Record Not Found ";
    getch();
    }


    //***************************************************************
    // function to delete record of file
    //****************************************************************


    void delete_product()
    {
    int no;
    clrscr();
    cout<<"\n\n\n\tDelete Record";
    cout<<"\n\nPlease Enter The product no. of The Product You Want To Delete";
    cin>>no;
    fp.open("Shop.dat",ios::in|ios::out);
    fstream fp2;
    fp2.open("Temp.dat",ios::out);
    fp.seekg(0,ios::beg);
    while(fp.read((char*)&pr,sizeof(product)))
    {
    if(pr.retpno()!=no)
    {
    fp2.write((char*)&pr,sizeof(product));
    }
    }
    fp2.close();
    fp.close();
    remove("Shop.dat");
    rename("Temp.dat","Shop.dat");
    cout<<"\n\n\tRecord Deleted ..";
    getch();
    }


    //***************************************************************
    // function to display all products price list
    //****************************************************************

    void menu()
    {
    clrscr();
    fp.open("Shop.dat",ios::in);
    if(!fp)
    {
    cout<<"ERROR!!! FILE COULD NOT BE OPEN\n\n\n Go To Admin Menu to create


    File";
    cout<<"\n\n\n Program is closing ....";
    getch();
    exit(0);
    }

    cout<<"\n\n\t\tProduct MENU\n\n";
    cout<<"====================================================\n";
    cout<<"P.NO.\t\tNAME\t\tPRICE\n";
    cout<<"====================================================\n";

    while(fp.read((char*)&pr,sizeof(product)))
    {
    cout<<pr.retpno()<<"\t\t"<<pr.retname()<<"\t\t"<<pr.retprice()<<endl;
    }
    fp.close();
    }




    //***************************************************************
    // function to place order and generating bill for Products
    //****************************************************************

    void place_order()
    {
    int order_arr[50],quan[50],c=0;
    float amt,damt,total=0;
    char ch='Y';
    menu();
    cout<<"\n============================";
    cout<<"\n PLACE YOUR ORDER";
    cout<<"\n============================\n";
    do{
    cout<<"\n\nEnter The Product No. Of The Product : ";
    cin>>order_arr[c];
    cout<<"\nQuantity in number : ";
    cin>>quan[c];
    c++;
    cout<<"\nDo You Want To Order Another Product ? (y/n)";
    cin>>ch;
    }while(ch=='y' ||ch=='Y');
    cout<<"\n\nThank You For Placing The Order";getch();clrscr();
    cout<<"\n


    \n********************************INVOICE************************\n";
    cout<<"\nPr No.\tPr Name\tQuantity \tPrice \tAmount \tAmount after


    discount\n";
    for(int x=0;x<=c;x++)
    {
    fp.open("Shop.dat",ios::in);
    fp.read((char*)&pr,sizeof(product));
    while(!fp.eof())
    {
    if(pr.retpno()==order_arr[x])
    {
    amt=pr.retprice()*quan[x];
    damt=amt-(amt*pr.retdis()/100);
    cout<<"\n"<<order_arr[x]<<"\t"<<pr.retname()


    <<"\t"<<quan[x]<<"\t\t"<<pr.retprice()<<"\t"<<amt<<"\t\t"<<damt;
    total+=damt;
    }
    fp.read((char*)&pr,sizeof(product));
    }

    fp.close();
    }
    cout<<"\n\n\t\t\t\t\tTOTAL = "<<total;
    getch();
    }

    //***************************************************************
    // INTRODUCTION FUNCTION
    //****************************************************************

    void intro()
    {
    clrscr();
    gotoxy(31,11);
    cout<<"SUPER MARKET";
    gotoxy(35,14);
    cout<<"BILLING";
    gotoxy(35,17);
    cout<<"PROJECT";
    cout<<"\n\nMADE BY : ANUJ KUMAR";
    cout<<"\n\nSCHOOL : RYAN INTERNATIONAL SCHOOL";
    getch();

    }




    //***************************************************************
    // ADMINSTRATOR MENU FUNCTION
    //****************************************************************
    void admin_menu()
    {
    clrscr();
    char ch2;
    cout<<"\n\n\n\tADMIN MENU";
    cout<<"\n\n\t1.CREATE PRODUCT";
    cout<<"\n\n\t2.DISPLAY ALL PRODUCTS";
    cout<<"\n\n\t3.QUERY ";
    cout<<"\n\n\t4.MODIFY PRODUCT";
    cout<<"\n\n\t5.DELETE PRODUCT";
    cout<<"\n\n\t6.VIEW PRODUCT MENU";
    cout<<"\n\n\t7.BACK TO MAIN MENU";
    cout<<"\n\n\tPlease Enter Your Choice (1-7) ";
    ch2=getche();
    switch(ch2)
    {
    case '1': clrscr();
    write_product();
    break;
    case '2': display_all();break;
    case '3':
    int num;
    clrscr();
    cout<<"\n\n\tPlease Enter The Product No. ";
    cin>>num;
    display_sp(num);
    break;
    case '4': modify_product();break;
    case '5': delete_product();break;
    case '6': menu();
    getch();
    case '7': break;
    default:cout<<"\a";admin_menu();
    }
    }


    //***************************************************************
    // THE MAIN FUNCTION OF PROGRAM
    //****************************************************************


    void main(:D)
    {
    char ch;
    intro();
    do
    {
    clrscr();
    cout<<"\n\n\n\tMAIN MENU";
    cout<<"\n\n\t01. CUSTOMER";
    cout<<"\n\n\t02. ADMINISTRATOR";
    cout<<"\n\n\t03. EXIT";
    cout<<"\n\n\tPlease Select Your Option (1-3) ";
    ch=getche();
    switch(ch)
    {
    case '1': clrscr();
    place_order();
    getch();
    breaker;
    case '2': admin_menu();
    break;
    case '3':exit(0);
    default :cout<<"\a";
    }
    }while(ch!='3');
    }

    //***************************************************************
    // END OF PROJECT
    //***************************************************************
    Last edited by Himanshu Chowdhary; 02-28-2014 at 02:00 PM. Reason: created some stupid errors
    02-28-2014 01:56 PM
  15. hope4wp's Avatar
    I'm only second best D: nooooo *puts down egg launcher and walks back *
    *holding your hand* lets go out for dinner :p
    02-28-2014 01:57 PM
  16. Sport Driver's Avatar
    15km? You serious? :O
    Yes. Well I can handle it, it is not problem those 15 km, bigest problem is time because I have to learn because looks like teacher sign an agreement about how they will all give us tests in same weeks :( .

    Sent from my Nokia Lumia 820 using Tapatalk
    02-28-2014 01:57 PM
  17. Himanshu Chowdhary's Avatar
    this string is copied from a website , I am worried should I use the same or build my own :\ building my own will require lot of work and will **** me :-p I suck in making these programs
    02-28-2014 01:58 PM
  18. hope4wp's Avatar
    Shu I'm definitely killing you now
    Himanshu Chowdhary likes this.
    02-28-2014 01:58 PM
  19. Himanshu Chowdhary's Avatar
    Shu I'm definitely killing you now
    you can but tell me before you kill me , what's the error in above program :-p
    02-28-2014 01:59 PM
  20. hope4wp's Avatar
    Yes. Well I can handle it, it is not problem those 15 km, bigest problem is time because I have to learn because looks like teacher sign an agreement about how they will all give us tests in same weeks :( .


    Sent from my Nokia Lumia 820 using Tapatalk
    Eek! That sucks! You have to practice a lot >:(
    02-28-2014 02:00 PM
  21. Himanshu Chowdhary's Avatar
    *holding your hand* lets go out for dinner :p
    don't forget to get something for me :-p
    02-28-2014 02:02 PM
  22. Himanshu Chowdhary's Avatar
    I guess sahib is getting ready for the dinner :-p
    02-28-2014 02:02 PM
  23. hope4wp's Avatar
    you can but tell me before you kill me , what's the error in above program :-p
    You made me scroll so much -_- try to compile it
    02-28-2014 02:02 PM
  24. hope4wp's Avatar
    don't forget to get something for me :-p
    Lol you can eat the khichdi
    02-28-2014 02:04 PM
  25. hope4wp's Avatar
    I guess sahib is getting ready for the dinner :-p
    Or maybe jelly :p
    02-28-2014 02:05 PM
144,738 ... 16671668166916701671 ...

Similar Threads

  1. WC app: Can't log on?
    By Nogitsune Micah in forum Windows Central for Windows Phone - App Support
    Replies: 18
    Last Post: 10-23-2014, 06:53 AM
  2. Do you use HipChat? Tell them why you want a native app for Windows Phone
    By WindowsCentral.com in forum Windows Central News Discussion
    Replies: 0
    Last Post: 10-22-2014, 01:42 PM

Tags for this Thread

LINK TO POST COPIED TO CLIPBOARD