Page 23 - CA_Blue( J )_Class10
P. 23

C.  Answer the following questions:
                    1.  What is a computer language?
                   Ans.  A computer language is a set of rules and symbols used to write instructions that a computer can understand and execute. It
                       allows humans to communicate with computers and create programs.
                    2.  Write any two advantages of Procedure-Oriented programming.
                   Ans.  The two advantages of Procedure-Oriented programming are:
                       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.  Name two Object-oriented programming languages.
                   Ans.  Two Object-oriented languages are C++ and Java.
                    4.  What is the difference between Superclass and Subclass?
                   Ans.              Superclass                            Subclass
                        The class from which properties are inherited   The class which inherits the properties of
                        to another class.                    another class.
                        Superclass is known as the base class.  Subclass is also known as derived class.
                    5.  What are the principles of OOP?
                   Ans.  Encapsulation, Data Abstraction, Inheritance and Polymorphism are the four principles of object-oriented programming.
                    6.  What do you mean 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.
                    7.  What do you mean by inheritance?
                   Ans.  Inheritance is the process of using the properties of a class in another class.
                    8.  What do you mean by encapsulation?
                   Ans.  The wrapping up of data members and member methods together into a single unit is called encapsulation.
                    9.  What is the meaning of ‘morphe’ in polymorphism?
                   Ans.  The ‘morphe’ is a Greek word that means forms.

                 D.  Assertion and Reasoning based questions.

                       The following questions consist of two statements – Assertion (A) and Reason (R). Answer these questions by selecting the
                       appropriate option given below:
                       a.  Both A and R are true, and R is the correct explanation of A.
                       b.  Both A and R are true, but R is not the correct explanation of A.
                       c.  A is true, but R is false.
                       d.  A is false, but R is true.
                    1.  Assertion (A): Data abstraction is a fundamental concept in object-oriented programming (OOP).
                        Reason (R): Data abstraction allows developers to create complex data types where only relevant information and functionalities
                       are exposed, while implementation details are hidden.
                    2.  Assertion (A): Polymorphism is a core concept in object-oriented programming (OOP).
                        Reason (R): Polymorphism does not allow objects to be treated as instances of their parent class or as instances of their own
                       class, facilitating flexibility and extensibility in software design.
                    3.  Assertion (A): Encapsulation and Abstraction are closely related concepts in object-oriented programming
                        Reason (R): Encapsulation hides the internal complexities of an object and provides controlled access to its functionality, while
                       abstraction allows developers to define simplified views of objects based on their essential characteristics.
                    4.  Assertion (A): Object-Oriented Programming (OOP) promotes code modularity better than Procedural Programming (POP) but
                       reusability is better in POP.
                        Reason (R): In OOP, code is organised into classes and objects, which encapsulate data and behaviour, facilitating code reuse
                       through inheritance and polymorphism.
                   Ans.  1. a    2. c    3. a    4. d


                                                                                                                       21
                                                                      Introduction to Object-Oriented Programming Concepts  21
   18   19   20   21   22   23   24   25   26   27   28