Page 128 - Computer science 868 Class 12
P. 128

4.1.1 Advantages of Procedure-Oriented Language
              Advantages of procedure-oriented programming language are as follows:
              •  It instructs the processor in a natural way what it should comply.
              •  It is easy to follow the path of program flow.
              •  It requires less memory than the other types of programming languages.
              •  Its code can be executed on different platforms.

              4.1.2 Disadvantages of Procedure-Oriented Language
              There are some drawbacks of procedure-oriented programming language. They are as follows:

              •  Different data values work on the same functions, so there should be some necessary changes in the function so
                 that the code works properly.

              •  Real situations cannot be handled properly as they require complex programming.
              •  Its code is often not reusable.
              •  It provides less security as the data is exposed to the whole program.

                  4.2 OBJECT-ORIENTED PROGRAMMING LANGUAGE
              The drawbacks of procedure-oriented programming languages gave rise to the need for object-oriented Object-Oriented
              Programming. In OOP, data and related events called methods combine together into objects. This increases the ability
              to deal with complex software problems, particularly when developing and maintaining large real-life applications and
              data arrangements. Thus, it overcomes the traditional approach to programming. This type of data structure is usually
              called a blueprint or a class, and the objects that are created are called instances. It follows a bottom-up approach.
              Java, C++, C#, and Python are some commonly known Object-Oriented Programming languages.


                                                             Definition

                    A programming model that is based on the concept of classes and objects, and gives importance to data rather than
                    functions is known as Object-Oriented Programming (OOP).




              4.2.1 Advantages of Object-Oriented Programming
              The advantages of object-oriented programming languages are as follows:
              •  Each and every instance has properties that are exclusively for its own and cannot be used by other instances. For
                 example, if you have a Fan’s blueprint, you can create many instances of fans with different model names such as
                 Crompton Greaves, Usha, Cinni, etc. Thus, a real-world picture can be seen.
              •  The improved quality of software and reduced cost of development are its key features as it uses the concept of
                 reusability. Reusability allows the code to be written once and used multiple times.
              •  Maintaining and modifying existing code is much easy when you try to create new objects with small differences.
              •  Abstraction and Data hiding maintain the security of data as only necessary data is provided.
              •  We can eliminate the redundant code using the concept of Inheritance. We can write common class definitions for
                 similar functionalities and inherit them in a different class. Hence, data redundancy is decreased.

              4.2.2  Disadvantages of Object-Oriented Programming
              Though OOP is a powerful concept, it has some disadvantages too. They are given as under:
              •  It needs more lines of coding than procedural programming.




                126126  Touchpad Computer Science-XII
   123   124   125   126   127   128   129   130   131   132   133