Advertisement
delvinkrasniqi

Untitled

May 20th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 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. numri_picave_teshitura=numri_picave_teshitura+shitpiza;
  90. }
  91. else
  92. {
  93. cout << "Skeni miell te mjaftueshem";
  94. }
  95. }
  96.  
  97. else
  98. {
  99. cout << "Smund te vendosni numer negativ";
  100. }
  101.  
  102. }
  103.  
  104. }
  105. else
  106. {
  107. cout <<"Piceria eshte e mbyllur";
  108. }
  109. };
  110. void HapPizerine()
  111. {
  112. statusi==true;
  113. cout <<"Piceria u hap";
  114. }
  115.  
  116. void Shto_miell()
  117. {
  118. if (statusi==true)
  119. {
  120. int shm;
  121. cout <<"Sa kilogram miell deshironi ti shtoni? ";
  122. cin >> shm;
  123. if (shm<0)
  124. {
  125. cout <<"Ju smund te vendosni vlere negative";
  126. }
  127. else
  128. {
  129. cout <<"Ju shtuat me sukses miellin";
  130. sasia_totale_emiellit=sasia_totale_emiellit+shm;
  131. }
  132. }
  133. else
  134. {
  135. cout <<"Piceria eshte e mbyllur";
  136. }
  137. }
  138.  
  139. };
  140.  
  141. int main()
  142. {
  143. Pizeria alfa;
  144. alfa.Emri="PICERIA STAR";
  145. alfa.Qyteti="MALISHEVE";
  146. alfa.Adresa="Rilindja Kombetare , 24000";
  147. alfa.statusi=true;
  148. alfa.sasia_totale_emiellit=9;
  149. alfa.sasia_emiellit_perpice=2;
  150. alfa.numri_picave_teshitura=0;
  151. alfa.numri_i_puntoreve=3;
  152. alfa.cmimi_pices=2.5;
  153. alfa.buxheti_total=80;
  154.  
  155.  
  156.  
  157. alfa.ShtoPuntore();
  158. cout << "\n\n"<<endl;
  159. cout <<"Emri : " << alfa.Emri <<endl;
  160. cout <<"Qyteti : " << alfa.Qyteti <<endl;
  161. cout <<"Adresa : " << alfa.Adresa <<endl;
  162. cout <<"Sasia e miellit : " << alfa.sasia_totale_emiellit << " kilogram"<<endl;
  163. cout <<"Numri i puntoreve : " << alfa.numri_i_puntoreve << " puntore" <<endl;
  164. cout <<"Numri i picave te shitura : " << alfa.numri_picave_teshitura <<endl;
  165. cout << "Buxheti TOTAL : " << alfa.buxheti_total <<endl;
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. return 0;
  173. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement