Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 6 вопрос Парадигмы ООП
- ///////////////////////////////////////// Инкапсуляция
- #include<iostream>
- class CoffeeGrinder
- {
- private:
- bool getNapreshenir(){
- return true;
- }
- public:
- void Start(){
- bool VoltageisNormal = getNapreshenir();
- if (VoltageisNormal)
- {
- std::cout << " Naprishene normal" << std::endl;
- }
- else {
- std::cout << "Bee Bee" << std::endl;
- }
- }
- };
- int main(){
- CoffeeGrinder A;
- A.Start();
- return(0);
- system("pause");
- }
- /////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement