Page 53 - CA_Blue( J )_Class9
P. 53
c. ………………… and ………………… are the common behaviour of the objects of class "subject".
d. Name of class is ………………….
e. Name of the object is ………………….
f. To create the object computer, we use ………………… keyword.
C. Answer the following questions.
1. In the real world, if "Car" is a class, then name some objects in it.
2. List the components of classes.
3. How do you define class in java?
4. How an object is an instance of a class?
5. What is Message Passing in Java objects?
6. Write a short note on objects. Give examples.
7. Why is class call a factory of objects? Explain with two examples.
8. Justify the following statement: "Classes are also known as user-defined data type.
D. Picture Study.
Class name: Student
attributes: name, stu_type
behaviour: setname () and setstu_type()
Object 1 Object 2 Object 3 Object 4
Attributes: Attributes: Attributes: Attributes:
name = Aditi name = Ananya name = Ajay name = Reshma
stu_type = Primary stu_type = Secondary stu_type = Higher stu_type = Graduate
Secondary
1. What is the name of the class?
a. Student b. Aditi
c. Ajay d. Reshma
2. Name the attributes of the class.
a. Name b. name
c. stutype d. Both b and c
3. Name of methods.
a. Setstu_type() b. setstu()
c. setname() d. Both a and c
4. What is the value of stu_type attribute of object 3?
a. Primary b. Secondary
c. Higher Secondary d. Graduate
Elementary Concept of Objects and Classes 51

