Page 87 - computer science (868) class 11
P. 87

5.  Write any two characteristics and drawbacks of a procedure-oriented programming language.
                   Ans.  The two characteristics of procedure-oriented programming languages are as follows:
                       1.  Emphasis is given on procedure rather than data.
                        2.  Employs a top-down approach in program design.
                        The two drawbacks of procedure-oriented programming languages are as follows:
                        1.  Data is exposed to the whole program which makes the security of the program under pressure.
                        2.  It is very difficult to relate to real-life objects.
                    6.  Write the differences between machine language and assembly language.
                   Ans.
                                        Machine Language                                Assembly Language
                       It is also known as machine code and is directly understood  It is the beginning step to improve programming language as it
                       by the computer.                                 makes programming language more readable by programmers.
                       There is no requirement to translate it, as all the instructions are  It is made up of symbols and letters which are translated into
                       written in binary form (i.e., strings of 0 and 1, e.g., 10111010110….).  Machine language by a translator.
                    7.  Differentiate between Java Applet and Java stand-alone applications.
                   Ans.                   Java Applet                               Java standalone applications

                       Java applet is a small Java program that is implanted in an  Java stand-alone applications can run independently on an
                       HTML page and executes only within any web browser.  individual computer.


                      Unsolved Questions


                 A.  Tick ( ) the correct option:
                    1.  Initially, Java was known as ………………… .
                       a.  Green Talk                                  b.  C++
                       c.  OAK                                         d.  None of these
                    2.  Which of the following languages follows a top-down approach?
                       a.  Procedure-oriented                          b.  Object-oriented
                       c.  Both a and b                                d.  None of these
                    3.  The compiler stops the execution of the program as soon as it encounters a ………………… .
                       a.  syntax error                                b.  logical error
                       c.  runtime error                               d.  None of these
                    4.  A capsule is related to which of the following principles of object-oriented programming?
                       a.  Data abstraction                            b.  Polymorphism
                       c.  Inheritance                                 d.  Encapsulation
                    5.  Which of the following principles uses the concept of reusability?
                       a.  Encapsulation                               b.  Data abstraction
                       c.  Polymorphism                                d.  Inheritance
                 B.  Fill in the blanks:

                    1.  ………………… is the procedure of combining data and functions together.
                    2.  In Java, the ………………… method is the first function that starts the execution of every stand-alone application.
                    3.  There is no way to handle garbage collection automatically in ………………… language.
                    4.  Errors in Java give rise to an ………………… .
                    5.  The word polymorphism comes from the Greek vocabulary meaning ………………… .
                 C.  Answer the following questions:
                    1.  What are the characteristics of OOP languages?
                    2.  Write the five main objectives that were kept in mind while developing the Java language.
                    3.  Write a short note on the history of the Java.
                    4.  What are the main features of BlueJ?


                                                                                                                        85
                                                                     Introduction to Object-Oriented Programming Using Java   85
   82   83   84   85   86   87   88   89   90   91   92