Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Pizeria
- {
- public : string Emri , Qyteti , Adresa;
- int numri_picave_teshitura , numri_i_puntoreve;
- double sasia_totale_emiellit , sasia_emiellit_perpice , cmimi_pices , buxheti_total;
- bool statusi;
- void ShtoPuntore()
- {
- if (statusi==true)
- {
- int shp;
- cout <<"Shenoni numrin e puntoreve qe deshironi ti shtoni : ";
- cin >> shp;
- {
- if (shp<=0)
- {
- cout <<"Ju duhet te shtoni se paku nje puntor";
- }
- else
- {
- cout <<"Ju shtuat me sukses puntorin/et";
- numri_i_puntoreve=numri_i_puntoreve+shp;
- }
- }
- }
- else
- {
- cout <<"Pizeria eshte e mbyllur";
- }
- };
- void LargoPuntore()
- {
- if (statusi==true)
- {
- int lp;
- cout <<"Shenoni numrin e puntoreve qe deshironi ti largoni : ";
- cin >> lp;
- {
- if (lp<=0)
- {
- cout <<"Ju smund te vendosni numer negativ";
- }
- else if (lp>numri_i_puntoreve)
- {
- cout << "Smund te largoni puntore me shume se qe keni ";
- }
- else
- {
- cout <<"Ju larguat me sukses puntorin/et";
- numri_i_puntoreve=numri_i_puntoreve-lp;
- }
- }
- }
- else
- {
- cout <<"Pizeria eshte e mbyllur";
- }
- }
- void ShitPiza()
- {
- if (statusi==true)
- {
- int shitpiza;
- cout <<"Shenoni sa pica doni ti shishni : ";
- cin >> shitpiza;
- {
- if (shitpiza>=1)
- {
- if (sasia_totale_emiellit>shitpiza*sasia_emiellit_perpice)
- {
- cout <<"Ju shitet me sukses picat ";
- buxheti_total=buxheti_total+(shitpiza*cmimi_pices);
- }
- else
- {
- cout << "Skeni miell te mjaftueshem";
- }
- }
- else
- {
- cout << "Smund te vendosni numer negativ";
- }
- }
- }
- };
- void HapPizerine()
- {
- statusi==true;
- cout <<"Piceria u hap";
- }
- void Shto_miell()
- {
- if (statusi==true)
- {
- int shm;
- cout <<"Sa kilogram miell deshironi ti shtoni? ";
- cin >> shm;
- if (shm<0)
- {
- cout <<"Ju smund te vendosni vlere negative";
- }
- else
- {
- cout <<"Ju shtuat me sukses miellin";
- sasia_totale_emiellit=sasia_totale_emiellit+shm;
- }
- }
- }
- };
- int main()
- {
- Pizeria alfa;
- alfa.Emri="PICERIA STAR";
- alfa.Qyteti="MALISHEVE";
- alfa.Adresa="Rilindja Kombetare , 24000";
- alfa.statusi=true;
- alfa.sasia_totale_emiellit=9;
- alfa.sasia_emiellit_perpice=2;
- alfa.numri_picave_teshitura=0;
- alfa.numri_i_puntoreve=3;
- alfa.cmimi_pices=2.5;
- alfa.buxheti_total=80;
- alfa.Shto_miell();
- cout <<"tot:" <<alfa.sasia_totale_emiellit <<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement