answersLogoWhite

0


Best Answer
Answer for abstractionAbstraction is a oops concept. It provides a facility to hide some unimportant information and provide us some information which is important for the client programmers.

Eg If we consider a car which has lot of parts such as wheels steering DVD player etc.

We need to know how to use it. We need not know what is the

structure of all these parts to buy and drive a car.

Another eg is Television. The Television has lot of properties and behavoiurs like height width displayOn,displayOff etc and also it has chips and internal wires which enables the television's functions.

But for working the Television we don't need to know these internal things.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

The interface creates a contract between the client and the implementer. The client knows the interface but should not have to know how the implementer provided that interface. This has several benefits. First, the interface protects the implementer from incorrect use of the data structure by the client. An interface creates an abstraction barrier that protects the implementation. A client that uses knowledge of the implementation not contained in the interface is violating the abstraction barrier. The interface to a data abstraction is also said to encapsulate the implementation details. Second, the interface also gives the implementer flexibility to change the implementation, as long as the client is only using the implementation through the defined operations, and those operations are still provided by the new implementation. This flexibility results in a loosely coupled system. The interface creates a contract between the client and implementer, which frees them up to work more independently as long as they stick to the contract. In a tightly coupled system, the client and the implementation are not as free to change because changes to either are more likely to change the interface. Third, when something goes wrong in a program, the presence of an interface makes it easier to assign blame to either the client or the implementer. Either the client is using the interface incorrectly (possibly violating the abstraction barrier), or the implementer is implementing it incorrectly. A clear interface makes it possible to argue that one of the two needs to fix their code.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Abstraction makes it possible for class designers to alter the implementation or the underlying representation of a class without affecting the consumers of that class. That is, the scope of change can be limited to the class itself. From the user's point of view, so long as the interface remains the same, nothing has actually changed, thus all existing code remains unaffected.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

Abstraction is simplifying complex reality by modelling classes appropriate to the problem, and working at the most appropriate level of inheritance for a given aspect of the problem.

For example, Lassie the Dog may be treated as a Dog much of the time, a Collie when necessary to access Collie-specific attributes or behaviors, and as an Animal (perhaps the parent class of Dog) when counting Timmy's pets.

Abstraction is also achieved through Composition. For example, a class Car would be made up of an Engine, Gearbox, Steering objects, and many more components. To build the Car class, one does not need to know how the different components work internally, but only how to interface with them, i.e., send messages to them, receive messages from them, and perhaps make the different objects composing the class interact with each other.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

- Abstraction in OOP is intended to facilitate re usability of the code
- To facilitate polymorphism
- Abstraction lets you focus on what the object does instead of how it does it.
- Abstraction helps in defining a contract between the consumer and provider. The consumer wont get affected even if the internal implementation of the provider will change. Which confirms to the OOP principle "A class should be open for extension but close for the modification"

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

1.Abstraction in Java allows the user to hide non-essential details relevant to user.

2.Java has concept of abstract classes , abstract method but a variable can not be abstract

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What role does abstraction play in object oriented programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the 8086 interrupt to play music?

An interrupt is a mechanism for hardware of software to interrupt the processor to go do something else. Playing music is a much higher level abstraction, and it is not valid to ask what is the interrupt to play music, partly because it depends on the specific hardware implementation.


What is the Difference between modular programming and structured programming?

Event driven programming is just that, the code does not get executed until an event happens. A good example is a visual basic program, when you click on a button, the code for the button gets executed, but in any other case that code is never touched by the program. Structured programming is different, A DOS programming environment called QBasic is a great example of this. You write a program and it goes through every single line of code before either looping back to the beginning or exiting. when it gets to the end, it checks to see if a variable contains a certain value, if it does it exits, otherwise it loops. Hope this helps, and my definitions of each are accurate.


How c can play an important role as a base language in order to under stand the modern programming languages such as c?

It has good karma.


What are the major branches of artificial intelligence?

Over the years of AI development - The branches including AI as its foundation have bloated a lot but to name 5 of them:Learning,Planning and Reasoning in MachinesGenetic ProgrammingPattern , Object , Character , Voice - RecognitionKnowledge RepresentationOntology


What is class in oops concept?

Classes are the integral part of the all-important programming paradigm known as Object-Oriented Programming(OOP). In OOP, a programming problem is perceived as a problem in a real-life scenario, as an interaction between objects. The problem is tackled by having a system of interacting objects, that interact among themselves to solve the programming problem. Objects in OOP bear semblance to real-life objects. Classes serve as templates for the creation of objects of the same type. For instance, students may be thought to be objects of the human-being class, cars may be thought to be objects of the Automobile class. Classes are defined as collection of methods(functions) and data members(variables), additionally defined by scope rules. In addition, classes also achieve the OOP principles of encapsulation, abstraction, polymorphism and inheritance. Encapsulation refers to binding data and code together, with data controlling access to code. Abstraction refers to the hiding the implementation details of a class from outside functions and exposing only necessary details. Polymorphism refers to the scenario when a class can play more than one role. Inheritance is used when one or more classes must include properties of another set of classes, and also have properties of their own.

Related questions

What does play for in the lottery?

[object Object]


What is the direct object in the sentence Have you ever seen that play?

The direct object is "play".


What role do quality play in an organization?

TEAM WORK for result oriented performance.


Is this website real of play Bazaar marketplaybazaar.ind.in?

[object Object]


What role does friction play in the speed of an object?

It slows the object down.


I grew up in a very sports-oriented family Did you play sports growing up?

of course


How do you play damath using fraction?

can you explain fraction patterns


What is the significance of programming languages to a business?

Programming languages play a vital role in business application. COBOL language, for example, is basically designed for business purpose application.


What role does the subject and object play in the sentence?

the subject plays were you are the object plays what you are doing


What is the direct object in sentence The level of play interested the onlookers?

Onlookers is the direct object.


What does money play for in the pick 4 lottery?

To win the lottery Jackpot


Can you play a car town without a facebook?

is hakeem ga\y