OOPS Concept Abstraction with example

OOPS Concept Abstraction with example

View Answers

October 13, 2009 at 5:32 PM

Hi Friend,

The process of abstraction in Java is used to hide certain details and only show the essential features of the object. In other words, it deals with the outside view of an object (interface).

For example, the Java Collections Framework defines the
abstraction called java.util.Map. It is an abstract view
of a software object that maps from one set of objects
into another. The class java.util.TreeMap implements the
Map abstraction.

Thanks

February 11, 2012 at 8:25 PM

print("code sample");Hi friends, I think abstraction cannot achieved without Encapsulation. Lets take a Example of Class Calculator class Calculator{ private int x; private int y; public add addition(int a,int b){ x=a; y=b; return x+y; } } User has concerned on giving input and getting output. so i have made both variables private. only method can be viewed by the user to give input....so i hide the variable which is not important for the user...he has only his concerned of getting addition of two number without knowing the internal implementation....this is example of Abstraction....

Encapsulation: since we are wrapping variables and method together into a single entity i.e class...... you can access these variables and method by creating object of the same class...this way encapsulation can be achieved....

thanks Santosh Singh


September 23, 2012 at 10:59 AM

Abstraction is the feature of OOPS in which we show the essential features of an object and suppress the unnecessary details.

E.g.

Consider a bank application in which there is a Customer Class.

Now what are the necessary details to have.

Name,address,date of birth.

We don't need how many houses he owns and what vehicles he owns so these are unnecessary details for customer object so we suppress these details in order to come up clearly with essential details i.e. Name,Address, date of birth.

Taufique.S.Shaikh









Related Tutorials/Questions & Answers:
OOPS Concept Abstraction with example - Java Beginners
OOPS Concept Abstraction with example  I am new to java. In java OOPS concept Abstraction means abstract or something. Please explain...). For example, the Java Collections Framework defines the abstraction called
Abstraction in Java 7
of OOPs concept. Abstraction :  Abstraction means hiding the unnecessary...(); Example : Here we are giving a simple example which shows the abstraction concept... or object.  In java, you can see concept of abstraction whenever you use
Advertisements
What is oops in php with example?
What is oops in php with example?  Hi, I heard some where that PHP is support OOPS and its new feature is PHP. Every is now using OOPs in PHP. What is oops in php with example? Can anyone give me code example? Thanks
Abstraction in Java
Abstraction in Java Abstraction is one of the four pillar of OOPS Concept. Abstraction in java is a process by which hiding the irrelevant data  and exposing only the essential feature of object. In java Abstraction
OOPs Concept
OOPs Concept      ... the OOPs concepts along with  fundamentals  used to develop the java.... This is a technique used to create programs around the real world entities. In OOPs
What Is OOPS In Java
various languages implements the concept of OOPs. for example, Java, .NET, Python...What Is OOPS In Java In this section we will learn about the basics of Java. Here we will see the concepts of OOPs. We will discuss the basics of OOPs
Abstraction In Java for Java beginners
Abstraction In Java for Java beginners  Hi, As a beginner in Java I am looking for good tutorial that explains the Abstraction concept in Java.... Abstraction is one of the 5 fundamentals of OOPS: Abstraction Encapsulation
oops concepts
oops concepts  What is polymorphism?Explain with an example. What is abstraction?Explain with an example. What is inheritance?Explain with an example. What is encapsulation?Explain with an example
abstraction
abstraction  give a simple example program for abstraction  ...()) { theCow.eat(grass); } } } /*In the above example, the class Animal is an abstraction used in place of an actual animal
abstraction
abstraction  give a simple example program for abstraction  ...); } } } /*In the above example, the class Animal is an abstraction used in place...()) { theCow.eat(grass); } } } /*In the above example, the class Animal
OOPs
OOPs  What is OOps?  Object oriented programming organizes a program around its data,i.e.,objects and a set of well defined interfaces to that data.An object-oriented program can be characterized as data controlling
OOPs concepts in Java
Object-Oriented Programming (OOPs) concepts in Java helps in creating programs that are based on real world. OOPs is very flexible and compatible and hence is the most used concept in developing larger applications. The software
Abstraction : Java Glossary
. Encapsulation 2. Polymorphism 3. Abstraction 4. Inheritance In OOPs, these concepts... at : www.roseindia.net/java/beginners/oop-in-java.shtml Abstraction concept is developed to solve... Abstraction : Java Glossary   
Java & OOPs
degree Java supports Fully OOPs concept?   Java is not a fully object..., because not all values in Java are Objects. For example, the basic numeric types... the concept of interfaces
Abstraction In Java
of the feature of OOPs i.e. Java has the feature of abstraction. In Java abstraction.... In an abstraction information content of a concept is reduced and retain only... abstraction in Java using abstract class. In this example we will first create
What is Abstraction - Java Beginners
What is Abstraction  What is abstraction in java? How is it used in java..please give an example also  Hi Friend, Abstraction is nothing... of a particular object or a concept and hide the other information.For example, a car
Inheritance in Java 7
This tutorial describe concept of Inheritance. It is one of OOPs concept
Polymorphism in Java 7
This tutorial describe concept of Polymorphism. It is one of OOPs concept
Oops Definition - Java Beginners
Oops Definition  What is Abstraction and Encapsulation? What is the Difference Between Abstraction and Encapsulation? Regards M.KethraBalan.  Hi Friend, Abstraction - The process of abstraction in Java is used
An exercise using (SRS) as a blue print for Abstraction and Modeling in a one page answer. Was this example correct?
An exercise using (SRS) as a blue print for Abstraction and Modeling in a one page answer. Was this example correct?  The software tool to help automate the process of producing a blueprint for problems with a television
Interview Questions - What are the Fundamentals of OOPS?
Programming language and it fully implements OOPs concept. Three pillars of OOPs... Concept and OOPs concepts in Java. View all interview questions at Java Interview...Interview Questions - What are the Fundamentals of OOPS?  Hi, What
Java7 : OOPs Concepts
JAVA7 : OOPs Concept In this section we will discuss concept of Object..., better termed as OOPs is a paradigm where everything is represented as an object.... Everything in OOPs is written inside the class so that you can reuse the class.You
Abstraction in flex
Abstraction in flex  Hi... What keyword allows you to implement abstraction better? please tell me about it.... ThanksADS_TO_REPLACE_1   Ans: Flex does not support abstart class directly. ThanksADS_TO_REPLACE_2
Abstraction in java - Java Interview Questions
Abstraction in java  Abstraction in java - I know its a very basic question that i can find anywhere else as well... but i am looking for a description as well as an example on Abstraction in java. can anyone
What is OOPs in PHP ?
What is OOPs in PHP ?   Hi, I am a beginner in PHP Programming Application. I have some doubt on What is OOPs in PHP programming. How the OOPs concept helps us in PHP Programming. Please provide me any online reference so that i
what is oops in java
what is oops in java  what is oops in java
what is oops in java
what is oops in java  what is oops in java
oops
oops
ModuleNotFoundError: No module named 'abstraction'
ModuleNotFoundError: No module named 'abstraction'  Hi, My Python... 'abstraction' How to remove the ModuleNotFoundError: No module named 'abstraction' error? Thanks   Hi, In your python environment
Encapsulation in Java 7
Encapsulation in Java 7 This tutorial describe concept of  Encapsulation. It is one of OOPs concept. Encapsulation : Encapsulation is a way of wrapping... : Here is an example to understand the concept of encapsulation
ModuleNotFoundError: No module named 'oops'
ModuleNotFoundError: No module named 'oops'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'oops' How to remove the ModuleNotFoundError: No module named 'oops' error
Java abstraction - Java Beginners
Java abstraction  Is abstraction and abstract class are related ar same
encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction
What is Abstraction In Java?
What is Abstraction In Java?  Hi, What is Abstraction In Java? How to use the Abstraction In Java to write program? Thanks   Hi, Suppose... external access. This process of hiding/securing the class is know as Abstraction
diff between encapsulation and abstraction code
diff between encapsulation and abstraction code  diff between encapsulation and abstraction code
Encapsulation & Abstraction - Java Interview Questions
Encapsulation & Abstraction  What is the difference between Encapsulation and Abstraction
Encapsulation & Abstraction - Java Interview Questions
Encapsulation & Abstraction  What is the difference between Encapsulation and Abstraction
Spring Abstraction with Redis
Spring Abstraction with Redis  Hi.. I have implemented @Cacheable for one method like @Cacheable("parameter1") public String getCompaniesList(String parameter1, String parameter2) throws Exception { //code
ModuleNotFoundError: No module named 'project-abstraction'
ModuleNotFoundError: No module named 'project-abstraction'  Hi, My... named 'project-abstraction' How to remove the ModuleNotFoundError: No module named 'project-abstraction' error? Thanks   Hi
ModuleNotFoundError: No module named 'oops_amqp'
ModuleNotFoundError: No module named 'oops_amqp'  Hi, My Python... 'oops_amqp' How to remove the ModuleNotFoundError: No module named 'oops... have to install padas library. You can install oops_amqp python with following
ModuleNotFoundError: No module named 'oops_celery'
ModuleNotFoundError: No module named 'oops_celery'  Hi, My Python... 'oops_celery' How to remove the ModuleNotFoundError: No module named 'oops_celery' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'oops_dictconfig'
ModuleNotFoundError: No module named 'oops_dictconfig'  Hi, My... named 'oops_dictconfig' How to remove the ModuleNotFoundError: No module named 'oops_dictconfig' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'oops-parser'
ModuleNotFoundError: No module named 'oops-parser'  Hi, My Python... 'oops-parser' How to remove the ModuleNotFoundError: No module named 'oops-parser' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'oops_timeline'
ModuleNotFoundError: No module named 'oops_timeline'  Hi, My... 'oops_timeline' How to remove the ModuleNotFoundError: No module named 'oops_timeline' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'oops-tools'
ModuleNotFoundError: No module named 'oops-tools'  Hi, My Python... 'oops-tools' How to remove the ModuleNotFoundError: No module named 'oops... have to install padas library. You can install oops-tools python
ModuleNotFoundError: No module named 'oops_twisted'
ModuleNotFoundError: No module named 'oops_twisted'  Hi, My Python... 'oops_twisted' How to remove the ModuleNotFoundError: No module named 'oops_twisted' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'oops_wsgi'
ModuleNotFoundError: No module named 'oops_wsgi'  Hi, My Python... 'oops_wsgi' How to remove the ModuleNotFoundError: No module named 'oops... have to install padas library. You can install oops_wsgi python with following
Java abstraction - Java Beginners
Java abstraction  what is abstraction in java please explain with example  Hi, Abstract Class Abstract classes are those that works only as the parent class or the base class. Subclasses are derived to implement
Explain normalization concept?
Explain normalization concept?  Explain normalization concept

Ads