Java Tutorial, Basics of Java, Java basics, Object oriented programmingBefore starting with java let me tell you what is Object Oriented programming [OOP]? Languages supporting OOP are C, C++, JAVA C language is used to clear our basic concepts so as to learn C++ and Java. C++ Language =Procedural language with Object Oriented extension. Java Language=It is PURE OBJECT ORIENTED LANGUAGE. OBJECT ORIENTED LANGUAGE Objective of this type of approach is to remove the flaws encountered in procedural approach that is in C++.
data funct1 funct3 func 4 green ones are methods or functions where as brown one is data. OBJECT=DATA +METHODS Data is hidden and can't be accessed by external functions.Follows bottom up approach.Objects can communicate with each other through methods. New data and methods can be added whenever necessary. CLASSES: Collection of objects of similar type. Data Encapsulation and Data abstraction: Wrapping up of data and methods into class is encapsulation. Classes uses concept of abstraction which includes hiding of data and showing only essential features. INHERITANCE: Properties by which objects of one class acquire the properties of objects of another class. POLYMORPHISM:Ability to take more than one form. e.g Shape can be circle, box, triangle. Benefits of OOP: Through inheritance we can eliminate redundant code. Saves development time and higher productivity. Easy to partition the work. Software Complexity can be easily managed. Easy upgradation from small to large systems. Applications of OOPs: Real Time systems Simulation and Modelling Object oriented databases Hyper text, Hyper media Artificial intelligence Parallel programming Decision support and office automation systems CIM,CAD Systems. |
||