123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Education >> View Article

Basic Object Oriented Programming (oop) Concepts

Profile Picture
By Author: START YOUR CAREER WITH JAVA COURSE THAT GETS YOU A
Total Articles: 40
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

OOP is a design philosophy. It stands for Object Oriented Programming. Object-Oriented Programming (OOP) uses a different set of programming languages than old procedural programming languages (C, Pascal, etc.). Everything in OOP is grouped as self sustainable "objects". Hence, you gain reusability by means of four main object-oriented programming concepts.
In order to clearly understand the object orientation model, let’s take your “hand” as an example. The “hand” is a class. Your body has two objects of the type "hand", named "left hand" and "right hand". Their main functions are controlled or managed by a set of electrical signals sent through your shoulders (through an interface). So the shoulder is an interface that your body uses to interact with your hands. The hand is a well-architected class. The hand is being reused to create the left hand and the right hand by slightly changing the properties of it.
What is an Object?
An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, ...
... the Hand (object) can grip something, or a Student (object) can give their name or address. Best core java training in Bangalore

In pure OOP terms an object is an instance of a class.
What is a Class?
A class is simply a representation of a type of object. It is the blueprint, or plan, or template, that describes the details of an object. A class is the blueprint from which the individual objects are created. Class is composed of three things: a name, attributes, and operations.
In real world, you'll often find many individual objects all of the same kind. As an example, there may be thousands of other bicycles in existence, all of the same make and model. Each bicycle has built from the same blueprint. In object-oriented terms, we say that the bicycle is an instance of the class of objects known as bicycles.
In the software world, though you may not have realized it, you have already used classes. For example, the TextBox control, you always used, is made out of the TextBox class, which defines its appearance and capabilities. Each time you drag a TextBox control, you are actually creating a new instance of the TextBox class. Advanced Java Training in Bangalore

How to identify and design a Class?
This is an art; each designer uses different techniques to identify classes. However according to Object Oriented Design Principles, there are five principles that you must follow when design a class,
• SRP - The Single Responsibility Principle -
A class should have one, and only one, reason to change.
• OCP - The Open Closed Principle -
Should be able to extend any classes' behaviors, without modifying the classes..
• LSP - The Liskov Substitution Principle-
Derived classes must be substitutable for their base classes.
• DIP - The Dependency Inversion Principle-
Depend on abstractions, not on concretions.
• ISP - The Interface Segregation Principle-
Make fine grained interfaces that are client specific.
Additionally to identify a class correctly, you need to identify the full list of leaf-level functions or operations of the system (granular level use cases of the system). Then you can proceed to group each function to form classes (classes will group same types of functions or operations). However a well-defined class must be a meaningful grouping of a set of functions and should support the reusability, while increasing expandability or maintainability, of the overall system.
In software world the concept of dividing and conquering is always recommended, if you start analyzing a full system at the start, you will find it harder to manage. So the better approach is to identify the module of the system first and then dig deep in to each module separately to seek out classes.
A software system may consist of many classes. When you have many classes, it needs to be managed. Think of a big organization, with its work force exceeding several thousand employees (let’s take one employee as one class). In order to manage such a work force, you need to have proper management policies in place. Same technique can be applied to manage classes of your software system. In order to manage the classes of a software system, and to reduce the complexity, system designers use several techniques, which can be grouped under four main concepts named
• 1. Encapsulation
• 2. Abstraction
• 3. Inheritance
• 4. Polymorphism.
• These concepts are the four main gods of OOP world and in software term, they are called four main Object Oriented Programming (OOP) Concepts.
What is Encapsulation (or Information Hiding)?
The encapsulation is the inclusion-within a program object-of all the resources needed for the object to function, basically, the methods and the data. In OOP the encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. A class is kind of a container or capsule or a cell, which encapsulate a set of methods, attribute and properties to provide its indented functionalities to other classes. In that sense, encapsulation also allows a class to change its internal implementation without hurting the overall functioning of the system.
What is Polymorphism?
Polymorphisms is a generic term that means 'many shapes'. More precisely Polymorphisms means the ability to request that the same operations be performed by a wide range of different types of things.
At times, I used to think that understanding Object Oriented Programming concepts have made it difficult since they have grouped under four main concepts, while each concept is closely related with one another. Hence one has to be extremely careful to correctly understand each concept separately, while understanding the way each related with other concepts.

More About the Author

We offer innovative and customized Java Training in Bangalore. Best Java course in Bangalore with Certified Experts. Go to free demo classes, get prepared by 8yrs experienced tutors and furthermore get hands on live project. Visit: http://infocampus.co.in/java-training-bangalore.html

Total Views: 405Word Count: 917See All articles From Author

Add Comment

Education Articles

1. Study Ms In Uk For Indian Students For 2024-25 Intake
Author: Transglobal Overseas

2. Top Land Survey And Transportation Design Courses To Boost Your Career
Author: Alaikha

3. Charting Your Course To Cbap Certification: A Comprehensive Guide
Author: Myank

4. Jaipur's Finest: Ranking The Best Nda Coaching Institutes For 2024
Author: Richard

5. Azure Devops Online Training In Hyderabad | Azure Devops Course Online
Author: Renuka

6. Arena Animation Tilak Road - Pune's Premier Animation Institute
Author: Arena Animation Tilak Road

7. Project Management Software
Author: Sangita Samal

8. Lunch Box
Author: nehashah

9. Docker Online Training | Docker And Kubernetes Training
Author: Teja

10. Working With Files In Python: A Comprehensive Guide
Author: Ferilion labs

11. Fostering Creativity In Children's Education: Approaches And Benefits
Author: hussanisoyat

12. Harness The Power Of Machine Learning: Research Proposal Development In Abuja, Nigeria
Author: elaine

13. Empowering Learners: The Evolution Of Education In Dubai's Schools
Author: faizalkhan1393

14. The Importance Of Early Preparation: Securing Admission To Your Dream School
Author: anwarkhan45314

15. Unleash The Power Of Digital Marketing For Your Small Business
Author: Unleash the Power of Digital Marketing for Your Sm

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: