“Abstrakcja w OOP” Kod odpowiedzi

Abstrakcja w ups

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

Abstrakcja w 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

Przykłady abstrakcji proceduralnej

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

Odpowiedzi podobne do “Abstrakcja w OOP”

Pytania podobne do “Abstrakcja w OOP”

Więcej pokrewnych odpowiedzi na “Abstrakcja w OOP” w Java

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu