Page 25 - CA_Blue( J )_Class9
P. 25

2.  Write any two advantages of Procedure-Oriented programming.
                   Ans.  The two advantages of POP are as follows:
                      a.  It is easy to follow the path of program flow.
                      b.  A smaller amount of memory is required than other types of coding.
                    3.  Write two advantages of High-level language?
                   Ans.  The two advantages of HLL are as follows:
                      a.  It require less time to code.
                      b.  It is easier to maintain.
                    4.  Write the difference between High-Level Language and Low-Level language.
                   Ans.  The difference between High-Level Language and Low-Level Language are:

                                   High-Level Language                        Low-Level Language

                      High-Level language is machine independent.  Low-Level language is machine dependent.

                      High-Level language is human friendly so it is easy  Low-Level  language is  machine friendly  so  it  is
                      to understand for programmers.              difficult to understand for programmers.

                    5.  Name the four pillars of OOP.
                   Ans.  Encapsulation, Data Abstraction, Inheritance and Polymorphism are the four pillars of Object-Oriented Programming.
                    6.  What is the difference between Superclass and Subclass?
                   Ans.  The difference between Superclass and subclass are:
                                       Superclass                                  Subclass


                      Class from where features are inherited to another  Class which inherits the features of another class.
                      class.

                      Superclass is known as Base class.          Subclass is also known as Derived class.

                    7.  Define source code.
                   Ans.  The program code written by programmer in a text editor that is converted to machine language using compiler is called
                      source code. It is also known as source program.
                    8.  What is meant by data abstraction?
                   Ans.  Data Abstraction is the property by which the essential features of a class are represented without informing about the
                      background details, i.e., non-essential units are hidden from the user.
                    9.  Define the concept of Re-usability?
                   Ans.  The concept of re-usability is defined as the program is written once and it can be used multiple times.
                    10.  Define Object-oriented programming.
                   Ans.  A programming model that depends on the theory of classes and objects, and gives importance on data rather than
                      functions is known as Object-oriented programming (OOP).
                    11.  Define Inheritance.
                   Ans.  Inheritance in Java is the method that allows one class to inherit the properties (data members and member methods)
                      of another class.
                    12.  Define Polymorphism.
                   Ans.  Polymorphism is a feature that allows objects to exhibit multiple forms or behaviours, depending on the context in
                      which they are used.







                                                                          Principles of Object-Oriented Programming  23
   20   21   22   23   24   25   26   27   28   29   30