Kfc

  • Uploaded by: Muhammad Rana Farhan
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Kfc as PDF for free.

More details

  • Words: 202
  • Pages: 3
Q. Make a KFC program that calculate the bill of five customers and print the bill of top three customers. #include <stdlib.h> #include class KFC{ public: KFC(){} KFC(int pQty, int zQty, int fQty) { pepsiQty=pQty; zingerQty=zQty; friesQty=fQty; } void setPepsiQty(int pQty){pepsiQty=pQty;} void setZingerQty(int zQty){zingerQty=zQty;} void setFriesQty(int fQty){friesQty=fQty;} int getPepsiQty(){return pepsiQty;} int getZingerQty(){return zingerQty;} int getFriesQty(){return friesQty;} int pepsiBill() { return pepsiQty*15; } int zingerBill() { return zingerQty*20; } int friesBill() { return friesQty*30; } void billWithGrandTotal() { cout<<"\n\n\nItem\tQty\tPrice\n"; cout<<"\nPepsi\t "<
cout<<"\nGrand Total = "<>pQ; kfc[i].setPepsiQty(pQ); cout<<"\nEnter the Qty of Zinger for Customer "<>zQ; kfc[i].setZingerQty(zQ); cout<<"\nEnter the Qty of Fries for Customer "<>fQ; kfc[i].setFriesQty(fQ); } system("cls"); for(int m=0;m<5;m++) { cout<<"\n\nBill of Person "<<m+1<<" is\n"; kfc[m].billWithGrandTotal(); } for(int j=0;j<5-1;j++) for(int k=0;k<5-1;k++){ if(kfc[k].getGrandTotal()
kfc[k]=kfc[k+1]; kfc[k+1]=temp; }

}

cout<<"\n\nTop 3 Customers are \n\n"; for(int l=0;l<3;l++) cout<<"Total Bill "<
Click the link below to see more examples URL: http://ravianeducation.blogspot.com E-Mail: [email protected] Farhan: 03008855006

Related Documents

Kfc
June 2020 24
Kfc
December 2019 39
Ayam Kfc
October 2019 37
Kfc Vero.docx
December 2019 29
Unthink Kfc
June 2020 7
Resep Kfc
May 2020 15

More Documents from ""

Factorial
June 2020 13
Lecture 10
June 2020 19
Scientific Calculator
June 2020 8
Intermediate Part Ii
June 2020 9
Intermediate Part Ii
June 2020 6