“Abstraction dans OOP” Réponses codées

Abstraction dans OOPS

Abstraction is the concept of object-oriented programming that "shows" only essential attributes and "hides" unnecessary information. 
The main purpose of abstraction is hiding the unnecessary details from the users. 
It helps in reducing programming complexity and efforts.
Blue-eyed Beetle

Abstraction dans OOP

abstraction is used for security 



def :::
    1. it is the deatail hiding and implementation of the services 
    2. data abstraction deals with exposing the interface to the user and hiding the details of implementation


real world example :::
    1. in car we will only show break and donot show internal parts
    2. in car we will only be showed straing but dont its internal parts 


to achieve abstraction :::
    1. abstract class ( 0 - 100% )
    2. interface      ( 100% )


what is in abstract class :::
    1. variable (no body)
    2. methods  (no body)
    3. methods modifier "abstract"
    4. class modifier   "abstract"   (it have no objects)
 

    note ::
        1. also can be make some concreate method (that have body)
        2. the class which inherte abstract class it will make body of abstract method
        3. "it will use the concept of method overridding"



example :::

    abstract class don{
        int butt ;
        abstract void start(int a);
    }
android developer

Exemples d'abstraction procédurale

public void myFunction(String name) {
	// whatever
}

public void myFunction(String name, boolean isAdult) {
	// whatever, but now this is called whenever the extra parameter
    // is callled instead of the other one
}
Adorable Armadillo

Réponses similaires à “Abstraction dans OOP”

Questions similaires à “Abstraction dans OOP”

Plus de réponses similaires à “Abstraction dans OOP” dans Java

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code