Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners OOPS Concept Abstraction with example

Have Programming Question? Ask it here!
 
 
 


Rajendra
OOPS Concept Abstraction with example
3 Answer(s)      4 years and 11 months ago
Posted in : Java Beginners



Advertisement
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... or object.  In java, you can see concept of abstraction whenever you use... shows the abstraction concept. AbstractClass.java - This is abstract class
Advertisements
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
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
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... or internet. Basics of OOPs Object Oriented Programming System is a concept..., Behavior, and Identity. for example, Car, Table, etc.   Class : In OOPs Class
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
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
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  ...); } } } /*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 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 In this section we will read about the abstraction in Java
Abstraction : Java Glossary
. Encapsulation 2. Polymorphism 3. Abstraction 4. Inheritance In OOPs, these concepts.../beginners/oop-in-java.shtml Abstraction concept is developed to solve the complexity... 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
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
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
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
Abstraction in flex
Abstraction in flex  Hi... What keyword allows you to implement abstraction better? please tell me about it.... Thanks   Ans: Flex does not support abstart class directly. Thanks
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
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
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
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
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
diff between encapsulation and abstraction code
diff between encapsulation and abstraction code  diff between encapsulation and abstraction code
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... is an example to understand the concept of encapsulation. EncapsulationExample.java
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
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
How to make query and abstraction in Java
How to make query and abstraction in Java  Hi, I read the lessons you have in the sites. They are really useful. However, I could not write codes... PostgreSQL database, and I want to make a query and abstraction for a table. Could
OOPS - Java Interview Questions
OOPS  what is mean by aggregation? and what is mean by association? explain with an example?   Hi friend, Association It is a relationship between classes of objects which allows one object instance to cause
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
oops concepts - Java Interview Questions
oops concepts  what stands for "S" in OOPs ? object oriented programing.....  Hi friend, Object Oriented Programming or OOP is the technique to create programs based on the real world. Unlike procedural programming
ABSTRACTION AND INTERFACE - Java Interview Questions
ABSTRACTION AND INTERFACE  When Use Abstract?When Use Interface ?I Want Explanations?plz help me  Hi Friend, When we do not want to allow any one to create object of our class, we define the class as abstract. When
Encapsulation VS Abstraction - Java Beginners
Encapsulation VS Abstraction  Real Time sample code for Encapsulation and Abstraction. where to use abstract and where to use specifies like public...(); } Abstraction-The process of abstraction in Java is used to hide certain details
using oops concepts - Development process
using oops concepts   You are required to develop a Hotel Reservation System. The system manages information about rooms, reservations, customers... total source code in corejava using oops concepts.  Hi
using oops concepts - Development process
using oops concepts  i want answer with oops concepts.individual classes with source code and exact out put. You are required to develop a Hotel Reservation System. The system manages information about rooms
how to do abstraction for insurance policy being issued...
how to do abstraction for insurance policy being issued...  an insurance policy is being insured.... now what will be the classes for policy and how to do abstraction of the same
Explain normalization concept?
Explain normalization concept?  Explain normalization concept
Program to read 2 integers using oops concepts
Program to read 2 integers using oops concepts  Write a program to read two integers with the following significance. ? The first integer value... to one mid-day, for example. ? The second integer represents time duration
classes and data abstraction - Java Beginners
for Mexican pesos, f for Swiss francs, e for Euro dollars or q to quit...() is called. If the user enters 'q', the data member more is set to false to allow...(); System.out.println("U S doller currency Amount Example!"); BufferedReader
 

 

 

DMCA.com