البرمجة فى الألفية الثالثة

الطريق الصحيح لعالم البرمجة ... دع العميل يحلم ثم حقق أنت حلمه
 
HomeHome  ­CalendarCalendar  ­FAQFAQ  ­SearchSearch  ­RegisterRegister  ­Log inLog in  
Post new topic   Reply to topicShare | 
 

 Object Oriented programming OOP البرمجة الشيئية

View previous topic View next topic Go down 
AuthorMessage
MRamadan
Admin


عدد المساهمات: 5
تاريخ التسجيل: 2009-03-03

PostSubject: Object Oriented programming OOP البرمجة الشيئية   Sun Apr 12, 2009 12:26 pm

Object Oriented OOP البرمجة الشيئية
إعداد : م. محمد رمضان


OOP depends upon Library, Functions which means Structured Programming.
تعتمد على وجود مكتبات ودوال ويعنى بها البرمجة الشيئية أو وجود أشياء عدة يتم برمجتها.


When can we say that this Language is Fully OOP?
متى نقول على لغة أنها تدعم البرمجة الشيئية بشكل كامل؟


There are 4 conditions to say that any language is fully OOP, these are
يجب توافر 4 شروط لكى نحكم على أى لغة بأنها تدعم البرمجة الشيئية بشكل كامل وهم


1 . Encapsulation
2. Abstraction
3. Inheritance
4. Polymorphism


1. Encapsulation
It means gathering things together in one place, like a capsule.
هو تجميع أشياء معا فى مكان واحد وكأنه كبسولة.

a. Class creation with all functions "methods" and variables that are related to each other.

مثل عمل Class به كل الدوال والمتغيرات التى لها علاقة ببعضها البعض.

b. Authorizations can be made upon these classes by using private / public methods.

يمكن عمل تحديد لصلاحيات الدوال حيث يتم استخدام دوال بشكل عام أو تحديد دوال خاصة.


2. Abstraction

It means NOT distinguished function in the class, with no code inside.

هو تجريد الدوال فى ال class من أى كود .

Also means, making the hierarchy of the method or function, return type and parameter list.

أيضا يعنى تحديد الشكل العام للدالة من عدد ونوع الباراميتر وأيضا نوعها.


3. Inheritance

Gathering the same properties and methods in one class and make the other classes as Childs and so they can inherit from the parent class and use its methods or properties.

هو تجميع الخواص والدوال المتشابهة معا فى class واحد وجعل ال classes الأخرى التى لها نفس الصفات تورث هذه الخواص والدوال من الclass الأب.

When you make a Human class that has all properties of Users, Customers, Suppliers or any other persons in your system, it's the inheritance in our language but not in the programming language, because the class Human will not has a meaning by itself.

مثل عندما نجعل class Human له خواص الإنسان وجعل باقى ال classes ترث منه هذه الصفات ولكن هذا فى لغتنا وليس فى لغة البرمجة لأن class Human وحدة سوف لا يكون له معنى.

So the real meaning of inheritance is: the existence of a class that has properties and methods shared with other classes and in the same time should has a meaning itself.

لذلك المعنى الحقيقى للوراثة فى لغات البرمجة هو وجود class له خواص عامة وترث منه classes أخرى هذه الصفات ولكن فى نفس الوقت يجب أن يكون لهذا الclass الأب معنى واستخدام.


4. Polymorphism

It means differences in the outer shape of things.

يعنى تعدد الاختلافات فى الشكل الخارجى للأشياء.

a. Override: Changing the return type or parameter list or both and keep the name.

هو وجود دوال لها نفس الاسم ولكن تختلف فى عدد البارامتر أو تختلف حسب نوعها.

It will result in 2 or more methods with the same name but have a different code.

ينتج عنها أكثر من دالة بنفس الاسم ولكن بكود مختلف.

b. Overload: Changing the Code itself without changing the return type or parameter list

هو كتابة الدالة الأصلية بنفس الاسم ولكن يتغيير الكود

It will result in the same method with a new code and forgetting the old one.

ينتج عن ذلك دالة اخرى بكود مختلف ولكن بنفس الاسم ويتم تجاهل الدالة الأولى تماما[/left]
Back to top Go down
caso



عدد المساهمات: 3
تاريخ التسجيل: 2009-03-30

PostSubject: Re: Object Oriented programming OOP البرمجة الشيئية   Tue Apr 14, 2009 3:22 pm

thanks for the topic cheers
Back to top Go down
 

Object Oriented programming OOP البرمجة الشيئية

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
البرمجة فى الألفية الثالثة :: برمجةعامة :: لغة الــ #C-
Post new topic   Reply to topic