DEV Community

asilbek ibragimov
asilbek ibragimov

Posted on • Edited on

8.Object-Orinented Programming

8.Object-Orinented Programming (OOP)
a) Encapsulation nima?
b) Inheritance nima?
c) Polymoriphism nima? Misol keltiring?

Javoblari:
a)Uning tuzilishini (ma'lumotlarini)
va xatti-harakatlarini (usullarini) belgilaydigan
abstraktsiya elementlarini ajratish jarayoni

        b)Bizga kodni qayta ishlatish va mavjud sinflardan 
        xususiyatlar va xatti-harakatlarni meros qilib 
        oladigan yangi sinflarni yaratish imkonini beradi.

       c)class Algebra
         {
               public int Add(int a, int b)
              {
                 return a + b;
              }
             public int Add(int a, int b, int c)
             {
                return a + b + c;
             }
         }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)