Skip to main content

Concept of Object-Oriented Programming Concept

Concept of Object-Oriented Programming Concept
  • Object Oriented Programming is performed by using class and object. 
  • Class is a set of States and behaviors.
  • Class is also known as a blue print of an object.
  • Class is called an Object factory where more than one object is created.
  • The object is used for accessing all the functionality of Class.
  • An example of Class and Object is
    • CAR----> It is a class 
    • Wagon R, Maruti 800, Alto, Seltos, etc are examples of objects.
  • Object-Oriented Principle:-
    • Encapsulation:- It is a process of binding the data and method in a single unit. A general example of encapsulation is Capsules, Bike, Cake, and others where the data is wrapped in a single unit. The Class is also an example of Encapsulation because Class also binds the state and behavior.


    • Abstraction: Abstraction is a process where only essential information is shown for use and unnecessary information about an object is hidden from the user. ATM is an example of Abstraction where users only access essential data. In programming the scope of data(Public, Private, Protected) helps to abstract the data from the user.






    • Polymorphism:- Polymorphism is made up of two words: Ploy--> Many and Morphism--> Forms. Polymorphism helps to use a single name function with multiple arguments. It helps the programmer to prevent learning the different names of functions.                                    
                 Example: Shapes-->Circle,Rectangle, Ovel                                                                              Programming Example:- Add(int,int)  Add(int, double)  Add(double,double)                     Add(double,int)     Add(String, String)


    • Inheritance:- Inheritance allows to access the property of Base Class(Parent Class) to Sub Class(Child Class). With the help of Inheritance, the code is reusable and shared with an object. For Ex.:- The Property of a parent can be accessible by the child. 




Comments

Popular posts from this blog

CODD RULES of RDBMS

Codd’s rules for RDBMS (i)                 The information rule. (ii)              Guaranteed access of   data (iii)            Systematic treatment of null value. (iv)            On line DB support. (v)              Comprehensive sup-language rule. (vi)            The view update rule. (vii)         Insert update rule. (viii)       Physical data independence. (ix)            Logical data independence. (x)              Integrity rule (xi)  ...

Learn Programming in UNIX

Q: - Write a program to input two numbers and add them?             gedit add.sh             clear             echo “enter two numbers:”             read a             read b             sum=`expr$a+$b`             echo $sum Syntax for if-else:- (1)          if test condition             then                 ---------                 --...

Things you know before buying Laptop

Things you should know before purchasing Laptop 1. Brand of Company Like DELL (inspiron Only), HP, ACER 2. Required RAM capacity Like 4 GB aprox. 3. Requirement of Hard Disk like 500 GB or 1 TB. 4. Processor like Intel Core i3 or Dual Core or AMD processor 5. Multimedia keyboard 6. Optical Mouse 7. ATI graphics Card Note:- If you think to buy a laptop you can select the laptop without operating system or open source operating system because if you buy windows o/s for laptop then it increased price aproxx 3000 if you select DOS laptop then its reduced the windows cost. Click here for example --> Best Laptop for students