abstraction

Solutions on MaxInterview for abstraction by the best coders in the world

showing results for - "abstraction"
Jean-Baptiste
22 Sep 2017
1it is process of hiding implementation details and 
2only showing the functionality to the user. 
3Abstraction focus on what the object does instead of how it does. 
4It is achieved by using Abstract class and Interface. 
5abstract methods (methods without body, cannot be static and final), 
6interface must implemented and abstract classes must be extended 
7by regular classes in order to achieve abstraction 
8(because abstract methods can only be exist in abstract class and interface). 
9A class can implement multiple interfaces, 
10but it can extend only single abstract class.
11
12Ex: In my framework I have achieve abstraction by using collections or 
13Map, because its all interface. Most of the cases I come across using List. 
14If we want to access elements frequently by using index, List is a way to go. 
15ArrayList provides faster access if we know index. 
16If we want to store elements and want them to maintain an order, 
17List is a better choice.
18
19i)List<String> webs=driver.getWindowHandles();
20=>create a list first to store web URLs in list
21
22ii)findElements evaluates multiple elements so therefore will assigned 
23to List <WebElement>
24
25iii)To handle dynamic elements store it in the list and identify by index:
26List<WebElement> all=driver.findElements(By.tagname(“”)); (or other locators).
Rebeca
25 Mar 2018
1Dealing with ideas rather than actual events.
Line
06 Apr 2017
1Abstraction: Hiding the implementation details, 
2concentrating on essentials things, 
3without worrying about the details 
4■ In java, abstraction is achieved via abstract class or interface 
5Abstraction cannot exist without inheritance 
6
73.1. Abstract class a class that's meant to be inherited 
8(cannot be private or final)
9To create an abstract class: add keyword abstract 
10before the class declaration 
11A class that we cannot create object 
12when abstract class extended by regular class: 
13we MUST override all the abstract methods of super class
14when abstract class extended by abstract class: 
15no need to override any abstract methods
16
17abstract class vs non-abstract class:
18NON-ABSTRACT CLASS:
19cannot have: abstract methods
20can have: constructor, instance method, static method, 
21instance block, static block, instance variable, static variable
22ABSTRACT CLASS:
23can have: constructor, instance method, static method, instance block,
24static block, instance variable, static variable...
25ABSTRACT METHOD: method without implementation, meant to be override 
26(cannot create object, cannot be final,static,private)
27
28FRAMEWORK EXAMPLE:
29In my framework I have achieved abstraction by using collections 
30or Map, because its all interface. Most of the cases I come 
31across using List. If we want to access elements frequently 
32by using index, List is a way to go. ArrayList provides 
33faster access if we know index. If we want to store elements and 
34want them to maintain an order, List is a better choice. 
35i) List webs = driver.getWindowHandles();    
36=>create a list first to store web URLs in list
37ii)To handle dynamic elements store it in the list and identify by index
38List all = driver.findElements(By.tagname(“”));
39In my framework I follow POM and had situations where some pages 
40shared similar actions that were similar but worked slightly 
41different, so I was able to use abstraction to define those 
42actions and implement them in each page according to what was needed 
43for that webpage
Hadrien
24 Jan 2017
1Sometimes we may come across a situation
2where we cannot provide implementation to
3all the methods in a class. We want to leave the 
4implementation to a class that extends it.
5  In that case we declare a class
6as abstract by using abstract keyword on method
7signature.In my framework I have created my
8PageBase class as super
9class of the all page classes. 
10I have collected all common elements
11and functions into PageBase class and
12all other page classes extent PageBase class.
13By doing so, I don't have to locate very
14common WebElements and it provides
15reusability in my framework.
16Also
171)Abstract classes cannot be instantiated
182)An abstarct classes contains abstract method,
19concrete methods or both.
203)Any class which extends abstarct class must
21  override all methods of abstract class
224)An abstarct class can contain either
23  0 or more abstract method.   
queries leading to this page
significance of abstraction in javaabstraction example jajava property abstract classimplement abstraction in javadefine abstraction abstraction programmingwhy do we need abstract class in java real time examplewhat do you mean by abstraction 3f and explainwhy abstract class is used in javajava program for abstractionwhat is the concept of abstractionabstraction with examplesabstract classes in java 2c provide subclass based on stringwhat abstractionabstraction functionabstarctionabstraction meanopp abstractiondefinition of abstraction in javaabstraction example codehow can we make a class abstract in javawhat is abstraction in programming exampleusing abstraction meaningwhat is the abstraction in javaabstraction in oopsdefine 3a abstractionwhat an abstract class isabstracting codeabstraction in programmingabstraction meaning in javaa class is abstraction and object is abstractionabstract class and method in javaabstract java meaningtypes of abstraction in javause of abstraction in javaabstraction in java examplehow to write abstract method in javaabstractions meaning javawhen use abstract class and interface javaabstract computer sciencewhat are abstraction in javawhat is abstraction in java 3fwhich definition best defines the concept of abstractionwhere is abstraction usedprogramming abstraction definitionabstract function in javadiscuss abstraction in java with suitable exampleabstraction with interface in javawhat does abstraction mean 3fabstractions definitionwhat is abstraction in programming 3fabstraction use in javaexplain abstraction with exampleabstraction oop exampleabstraction isconstructor in abstract class in javahow can we implement abstraction in javajava abstract constructorhow does abstraction workwhy do we need abstraction in javawhy abstraction is used in javawhat is the meaning of abstractionhow to implement abstractionabstraction in java with exampleabstract method javahow abstraction worksabstraction is atabstraction methodjava abstractdata abstractionwhat is abstraction in programminghow do abstract classes work in javaabstraction synonympurpose of abstraction in javaabstraction simple codeimplementation of abstractionabstracting computer scienceabstraction computer science definitionabstract static class in javawhen to use abstraction and interface in javaabstraction classabstraction development definitiondefine abstraction in javaabstraction inn javawhat does abstraction mean in computingabstraction meaning in englishabstract method in java interface abstraction definition in programmingabstraction exampleswhat is implement abstractionwhat is abstraction programmingabstraction javawhats the definition of abstractionabstraction in classabstraction meaningabstract class abstract methodwhat is the definition of abstraction in javaabstract code examplewhat are the different kinds of abstraction 3f explain in detail oop abstractionwhats abstraction why its useda subclass can be an abstract class in java 3fwhen to use abstractionjava abstract classabstraction and interface in javatype of abstractionabstraction defwhat does abstraction meanabstract method in javawhat is abstraction doesexamples of abstractionabstraction examplemethods in abstract class javawhat is abstraction inhow many world should be in abstractionoops abstraction example in javawhich definition best defines the concept of abstraction 3f 2ahow to use abstractionwhat is abstraction and explain with example 3fhow can a class method help with the concept of abstraction 3eabstraction in javavwhat is abstract classabstraction in a javaabstractionabstraction example in javawhat is abstraction example 3fcreate abstract class in java abstractionabstract meaning in javafunction abstractionabstraction definationhow abstraction is implemented in javameaning of abstraction in programmingwhat is abstraction in javawhats is abstractionis am implement class an abstract class in javaabstraction meaning in computingabstract class in javadefination of abstractionabstraction definecontrol abstraction in java examplejava abstract interfacestate and explain different types of abstrationabstraction definition 5cwhy we use abstract class in javaabstraction oops tools what is the use of abstractionwhat is computer abstractioncode abstractjava abstract methodexplain abstractionabstract javabest example of abstraction in javadefinition of abstractiondefine abstractionwhat is abstraction javawhy is important the abstraction in javajava abstract class with variablescomputers abstractionabstraction in java codeexample of abstractionworking of abstraction how abstraction improve security in java oopabstraction meaning in computer scienceabstraction program in javaabstraction is used forbest example for abstraction in java 28abstractionabstraction program in java examplewhat is an abstractionwhat is abstraction meaningabstraction programming meaningis abstraction a tool 5djava abstract variablecreate object abstract class javawhat is an example of abstraction in programming 3fjava abstraction exampleabstraction in java definitionabstraction leveljava abstraction classcontrol abstraction in javaabstract class construtor javawhat is abstract class in oop javaabstraction meaning programmingwhy abstraction is usedabstraction 27abstraction implementation in javaa provided abstract of codewhat is abstraction in computer programmingwrite a method to demonstrate abstract classes function in javaexamples for abstraction in javaexample of abstraction in programmingwhat is abstraction in computeruse of abstractionexample of abstraction in javawhat is abstraction in oop javaprogramming what is abstractionabstraction on abstractio examplejava abstract class usage exampleabstraction computer sciencewhat is abstraction in example 3fmeaning of abstraction in oopmaking an abstract class in javawhich of the following is false about abstract classes in javawhat is abstraction in computer sciencehow is abstraction used in programmingwhich of these is an abstraction defining a type of object 2c with methods and attributes 3fabstraction meansclass abstractionwhat is abstraction in java with example 3fabstraction definitionabstractions java abstraction example def abstractionwhat is abstractiondefinition abstractionabstraction meaning computingin abstraction meaningabstraction oopdegree of abstraction oopwhat is abstraction explain itdata abstraction means dbmsabstraction en javawhat is function abstractionabstraction in programming what isabstract classjava abstract class variableswhy is abstraction neededwhat is abstraction in computing define abstraction object abstractionabstraction example javaabstraction definwhat is the abstraction abstraction in codingprogramming abstractionwhy we use abstractionwhatis abstractionwhy encapsulation and abstraction was inventedabstraction means in javabenefits of abstraction in software engineering python why use abstractionwhat is the abstract keyword in javainterface and abstraction in javaan abstract class inherit non abstract class javawhat is class abstractionwhat is use of abstractionjava abstractionabstraction implementation in java exampleabstraction meaning in programmingabstraction with exampleabstraction concepthow code would look like with no abstravtionabstraction definition in javaabstract codehigh abstractionhow can we implement abstraction in java 3fabstraction eabstract class jacaabstraction using classesabstraction example program in javaabstraction on abstraction exampleabstraction java implementation javaways abstractionwhy we use abstraction in javaabstraction abstraction in java javaabstraction in programming definitionwhat is the abstract method in java abstraction meaningwhat is the definition of abstractionabstraction explanation abstraction in javawhich definition best defines the concept of abstraction 3fabstract class javawhat is abstraction in codemeaning of abstractionabstraction in javaabstraction in oopabstraction