answersLogoWhite

0


Best Answer

Some of the key OOPS principles are:

Encapsulation - The ability to make changes in your code without breaking the code of all others who use your code is a key benefit of encapsulation. You should always hide implementation details. To elaborate, you must always have your variables as private and then have a set of public methods that others can use to access your variables. Since the methods are public anyone can access them, but since they are in your class you can ensure that the code works the way that is best for you. So in a situation that you want to alter your code, all you have to do is modify your methods. No one gets hurt because i am just using your method names in my code and the code inside your method doesnt bother me much.

If you want maintainability, flexibility, and extensibility (and I guess, you do), your design must include encapsulation. You do that by:

• Keep instance variables protected (with an access modifier, mostly private).

• Make public accessor methods, and force calling code to use those methods rather than directly accessing the instance variable.

• For the methods, use the JavaBeans naming convention of set and get.

Inheritance - Inheritance is the feature by which functionality in one class is used in another class. It creates a parent child relationship between classes.

Polymorphism - Polymorphism refers to the feature wherein the same entity exists as multiple items. Ex: method overriding, method overloading etc.

User Avatar

Wiki User

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

Wiki User

13y ago

Every object-oriented programming language will have its own syntax and grammar; it is not a feature shared among all languages.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the OOPS Principles explain?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the principles of a food chain?

explain the principles of a food chain


What gestalt principles are commonly used to explain how perceptions are organized?

In psychology, the gestalt principles are used to explain, perceptual organization.


What are the four basic principles of object oriented programming language?

The four basic principles of OOPs are 1...class and object..2...Encapsulations(Data hiding)..3...Inheritance..4...Polymorphism...


Explain the main principles of the fourteen points?

THX


What is the set of statements or principles used to explain a group of facts or natural phenomena is?

the set of statements or principles used to explain a group of facts or natural phenomena is a THEORY


The six principles upon which the constitution is based and explain how the principles reflect the framers visionof a good gov?

* * * * * *


Oops you will smile?

oops, i rather not.


What are the basic accounting concepts and explain their implications?

what are the implications of accounting principles


Explain primary colors and color mixing principles in photoshop?

gghgcccbnvc


What is a principle or set of principles used to explain an event or phenomena?

theory


What are the principles and process flow of an incomplete medical record system?

explain the principles and process flow of an incomplete medical records system


What is persistence in oops explain with example?

The phenomenon where the object outlives the program execution time & exists between execution of a program is known as persistance