Advertisement
delvinkrasniqi

Untitled

May 20th, 2018
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. class Pizeria
  6. {
  7. public : string Emri , Qyteti , Adresa;
  8. int numri_picave_teshitura , numri_i_puntoreve;
  9. double sasia_totale_emiellit , sasia_emiellit_perpice , cmimi_pices , buxheti_total;
  10. bool statusi;
  11.  
  12. void ShtoPuntore()
  13. {
  14. if (statusi==true)
  15. {
  16. int shp;
  17. cout <<"Shenoni numrin e puntoreve qe deshironi ti shtoni : ";
  18. cin >> shp;
  19. {
  20. if (shp<=0)
  21. {
  22. cout <<"Ju duhet te shtoni se paku nje puntor";
  23. }
  24. else
  25. {
  26. cout <<"Ju shtuat me sukses puntorin/et";
  27. numri_i_puntoreve=numri_i_puntoreve+shp;
  28. }
  29. }
  30.  
  31.  
  32.  
  33. }
  34. else
  35. {
  36. cout <<"Pizeria eshte e mbyllur";
  37. }
  38. };
  39.  
  40. void LargoPuntore()
  41. {
  42. if (statusi==true)
  43. {
  44. int lp;
  45. cout <<"Shenoni numrin e puntoreve qe deshironi ti largoni : ";
  46. cin >> lp;
  47. {
  48. if (lp<=0)
  49. {
  50. cout <<"Ju smund te vendosni numer negativ";
  51. }
  52. else if (lp>numri_i_puntoreve)
  53. {
  54. cout << "Smund te largoni puntore me shume se qe keni ";
  55. }
  56.  
  57. else
  58. {
  59. cout <<"Ju larguat me sukses puntorin/et";
  60. numri_i_puntoreve=numri_i_puntoreve-lp;
  61. }
  62. }
  63.  
  64.  
  65.  
  66. }
  67. else
  68. {
  69. cout <<"Pizeria eshte e mbyllur";
  70. }
  71. }
  72.  
  73. void ShitPiza()
  74. {
  75. if (statusi==true)
  76. {
  77. int shitpiza;
  78. cout <<"Shenoni sa pica doni ti shishni : ";
  79. cin >> shitpiza;
  80.  
  81. {
  82.  
  83. if (shitpiza>=1)
  84. {
  85. if (sasia_totale_emiellit>shitpiza*sasia_emiellit_perpice)
  86. {
  87. cout <<"Ju shitet me sukses picat ";
  88. buxheti_total=buxheti_total+(shitpiza*cmimi_pices);
  89. }
  90. else
  91. {
  92. cout << "Skeni miell te mjaftueshem";
  93. }
  94. }
  95.  
  96. else
  97. {
  98. cout << "Smund te vendosni numer negativ";
  99. }
  100.  
  101. }
  102.  
  103. }
  104. };
  105. void HapPizerine()
  106. {
  107. statusi==true;
  108. cout <<"Piceria u hap";
  109. }
  110.  
  111. void Shto_miell()
  112. {
  113. if (statusi==true)
  114. {
  115. int shm;
  116. cout <<"Sa kilogram miell deshironi ti shtoni? ";
  117. cin >> shm;
  118. if (shm<0)
  119. {
  120. cout <<"Ju smund te vendosni vlere negative";
  121. }
  122. else
  123. {
  124. cout <<"Ju shtuat me sukses miellin";
  125. sasia_totale_emiellit=sasia_totale_emiellit+shm;
  126. }
  127. }
  128. }
  129.  
  130. };
  131.  
  132. int main()
  133. {
  134. Pizeria alfa;
  135. alfa.Emri="PICERIA STAR";
  136. alfa.Qyteti="MALISHEVE";
  137. alfa.Adresa="Rilindja Kombetare , 24000";
  138. alfa.statusi=true;
  139. alfa.sasia_totale_emiellit=9;
  140. alfa.sasia_emiellit_perpice=2;
  141. alfa.numri_picave_teshitura=0;
  142. alfa.numri_i_puntoreve=3;
  143. alfa.cmimi_pices=2.5;
  144. alfa.buxheti_total=80;
  145.  
  146.  
  147.  
  148.  
  149.  
  150. alfa.Shto_miell();
  151. cout <<"tot:" <<alfa.sasia_totale_emiellit <<endl;
  152.  
  153.  
  154.  
  155.  
  156. return 0;
  157. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement