javabymanish

Search results

Sunday, 7 July 2013

Chapter - 1 (Concepts Of Object Oriented Programming)

Before Object Oriented Programming came into effect, Procedural Programming was in use. Programs are written by using Procedural Programming approach consist of various procedure(functions). A function in a program contains the instructional steps that are performed to carry out an activity.

Procedural Programming :
                   In this type of programming, dividing a large program into a set of sub procedures that perform specific tasks. Procedural programming is used for developing simple applications.
Benefits :
                 Easy maintainable program code as various procedures can be debugged in isolation.
                Code is more flexible as you can change a specific procedure that get implemented across the 
                program.

 
                                                               


Object Oriented Programming :
                            In this type of programming, a large application consists of component objects, which interact with each other and this type of language is used to develop various applications.

Benefits :
                Real-world-programming :
                                   Object Oriented Programming approach models are based accurately on real worlds in comparision to procedural language.

               Re-usability of code :
                                   In the object oriented approach, you build classes, which can be used by several
applications.

              Information hiding:
                                  Information hiding ensures data security in a program.


Classes and Objects :
                     Object, A real world entity i.e., everything in the world is an object. An object has three characteristics :

  • State
  • Behaviouur
  • Identity      
                     Class, is a keyword that defines the shape and nature of an object.
OR
                                         Class, is a collection of similar types of objects.   


No comments:

Post a Comment