Page 128 - ComputerScience_Class_11
P. 128
Let’s Revisit
♦ An object is a unique entity that contains properties, methods and events in an object-oriented programming language.
♦ Classes in Java are non-primitive/user-defined data types that act as a blueprint for creating objects of the same type.
♦ Instance of a class is also called an object and the process of creating an object of a class is called instantiation.
♦ A user-defined data type is a derived data type depending on some existing data types.
♦ Virtual Machine (VM) is a machine that uses software instead of a physical computer to execute programs.
♦ During the execution of a program, an error may occur which may stop the execution of the program. This error is known as an
exception.
♦ Exception handling is a mechanism to handle errors that occur during the execution of the program so that the normal flow of
the code can be maintained.
♦ Input/Output (I/O) exceptions are Java IOExceptions that occur whenever an input or output operation is unsuccessful.
MIND DRILL
Solved Questions
A. Tick ( ) the correct option.
1. A class consists of characteristics and behaviour that are used to create …………………. .
a. objects b. object factory
c. programs d. None of these
2. A real-world object has …………………. and …………………. .
a. methods, data members b. characteristics, methods
c. characteristics, behaviour d. All of these
3. Which of the following is a blueprint to create similar kinds of objects?
a. Instance b. Class
c. Method() d. All of these
4. The Java programs written by programmers are saved with the extension …………………. .
a. Java b. .java
c. .jv d. .jva
5. Which of the following blocks, if present, always executes whether there is an exception or not?
a. Try b. Catch
c. finally d. Throw
Answers
1. a 2. c 3. b 4. b 5. c
B. Fill in the blanks.
1. A class is a ………………… data type.
2. Each class is made up of some attributes (data members) that are ………………… data types.
3. A ………………… uses software instead of a physical computer to execute programs and install apps.
4. ………………… is created once in a program.
5. ………………… is a mechanism to handle errors that occur during the execution of the program so that the normal flow of the code
can be maintained.
Answers
1. user-defined 2. predefined 3. Virtual Machine 4. Class 5. Exception handling
126 Touchpad Computer Science (Ver. 3.0)-XI

