Home » Programming » Languages » Story Details
Printable Version

OOP's Concepts

by Manish Tewatia on Dec 19, 2011

Here I will explain the OOP's concept with the help of inheritance example.
Comments: 0    Views: 466

Introduction

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). OOP means Object Oriented Programming. This is a technique used to create programs around the real world entities. In OOPs programming model programs are developed around objects and data rather than actions and logics. Object-oriented programming (OOP) is a computer science term used to characterize a programming language that began development in the 1960's. The term object-oriented programming was originally coined by Xerox PARC to designate a computer application that describes the methodology of using objects as the foundation for computation. Object Oriented Programming Concepts Three of the most basic concepts for object oriented programming are Classes Objects and Methods. 

Properties of OOP: The some properties of OOPs is fallowing as:

  • Object: An object can be considered a "thing" that can perform a set of related activities
  • Class: A class is simply a representation of a type of object
  • Encapsulation: Encapsulation hides the inner workings of an object from outside users of the object.
  • Polymorphisms: Polymorphism allows one interface to be used for a set of actions i.e. one name may refer to different functionality.
  • Inheritance: Inheritance is a process of deriving the new class from already existing class.
  • Abstraction: Abstraction is a process of hiding the implementation details and displaying the essential features.

Advantages of OOP: some advantage of OOPs is

  • Provides flexibility in the modification of an existing application.
  • Promotes the reuse of code.
  • Enables the use of real-world modeling.
  • Helps with the maintenance of Code.

Example: Simple Example of OOP's.

Code:

class A{
 m1(){
 System.out.println("m1 method");
 }
}
class B extends A{
 m2(){
  System.out.println("m2 method");
 }
 public static void main(String args[]){
   B b = new B();
   System.out.println(b.m1);
   System.out.println(b.m2);
 }
}

OUTPUT:

m1 method
m2 method

Summary: This is the simple example of inheritance properties of OOP's.

Post a Comment
*
DevExpress PowerBuilder Web Development Windows Development Languages Software Engineering Databases
iPhone Architecture Secutiry UML & Modeling Operating Systems Networking Testing
Graphics Design Project Management Hardware Open Source Games Development Business Intelligence Visual Studio LightSwitch 2011
MonoDevelop Visual Studio 2010 ASP.NET HTML, DHTML XML PHP JavaScript
Silverlight Web Services WCF Windows Forms WPF Windows Services Dynamic Link Libraries
ActiveX COM, DCOM, ATL C# VB.NET C++ F# Java
Pascal SQL Server Oracle DB2 MS-Access Windows Servers Windows
Linux Unix SAP LINQ .NET Framework ADO.NET Reporting
Crystal Reports SQL Server Reporting Services Igenda Reports Active Reports Adobe Fireworks Arrays & Collections Hosting
Future Trends Android Windows Phone Smart Devices Business M&A Investment & Funding
Web Browsers Internet Explorer Firefox Safari Common Entrepreneurs Students
Consulting Wiki Gadgets MobileMe iCloud iOS Social Media
Facebook Twitter LinkedIn Google+ Microsoft Kinect XBox
Wii Playstation DirectX i OS OS X CIO, CTO, CEO Windows 8
Web Design Expression Blend 4 Photoshop CS5 Creative Suite 5.5 Expression Web 4 Expression Studio 4 Creative Suite® 5.5 Design
Creative Suite 5.5 Web Creative Suite 5.5 Production Startups Funding M&A Laptops Smart Phones
Desktops Cameras & Camcorders Netbooks Tablets Virtualization Microsoft Surface WordPress
Software Products Cloud Computing Current Affairs Technology TV TV
Earnings XAML E-Commerce MonoTouch Mono for Android Deals Electronics
Mobile Phone Laptop Tablet Book Computer Press Releases Reviews
Products Books Companies Windows Azure SQL Azure Interviews Mac
Web Browsers Symbian Windows Forms WPF Windows Services HTML 5 Office 365
SharePoint 2010 Exchange Server Adobe Visual Studio 2012 iPad Flex / Flash Games
Windows 9
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName