Page 109 - ComputerScience_Class_11
P. 109
Later, her teacher tells her that this approach is called procedure-oriented programming (POP). The teacher also explains that in
POP, more emphasis is given to functions rather than data. However, while testing her program, Riya notices that although the
program runs successfully, it gives the wrong output because she used the wrong formula.
Based on the given case, answer the following questions:
1. Which programming approach is Riya using?
a. Object-oriented programming b. Procedure-oriented programming
c. Machine language d. Assembly language
2. In POP, more emphasis is given to:
a. Data b. Objects
c. Functions d. Classes
3. The program giving wrong output despite running successfully is an example of:
a. Syntax error b. Runtime error
c. Logical error d. Compile-time error
4. Sharing data between functions through global variables is a characteristic of:
a. OOP b. POP
c. Applets d. High-level abstraction
Answers
1. b 2. c 3. c 4. b
Unsolved Questions
A. Tick ( ) the correct option.
1. Initially, Java was known as ………………… .
a. Green Talk b. C++
c. OAK d. Perl
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. Semantic error
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. Encapsulation is one of the basic concepts in ………………… languages.
2. In Java, the ………………… method is the first function that starts the execution of every standalone application.
3. The error that occurs during the execution of a successfully compiled program is a ………………… error.
4. The word ………………… means existing in thought as an idea but does not have a tangible existence.
5. The word Polymorphism comes from the Greek vocabulary meaning ………………… .
C. Answer the following questions:
1. What are the characteristics of OOP languages?
2. Differentiate between Java applet and Java standalone applications.
Introduction to Object-Oriented Programming Using Java 107

