Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // 6 вопрос Парадигмы ООП
  2. ///////////////////////////////////////// Инкапсуляция
  3. #include<iostream>
  4. class CoffeeGrinder
  5. {
  6. private:
  7. bool getNapreshenir(){
  8. return true;
  9. }
  10. public:
  11. void Start(){
  12. bool VoltageisNormal = getNapreshenir();
  13. if (VoltageisNormal)
  14. {
  15. std::cout << " Naprishene normal" << std::endl;
  16. }
  17. else {
  18. std::cout << "Bee Bee" << std::endl;
  19. }
  20. }
  21. };
  22. int main(){
  23. CoffeeGrinder A;
  24. A.Start();
  25. return(0);
  26. system("pause");
  27. }
  28. /////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement