Page 52 - CA_Blue( J )_Class9
P. 52

(iii)  What does it mean to instantiate a Course object?
                         a.  To define the structure and behavior of all courses in the system.
                         b.  To execute the methods associated with the Course class.
                         c.  To create a specific course with a title, code, and instructor in the system.
                         d.   To delete an existing course from the system.
                    Ans.  c. To create a specific course with a title, code, and instructor in the system.

                       Unsolved Questions


                  A.  Tick ( ) the correct answer.

                     1.  A class consists of ………………… and behaviour which are used to create objects.
                         a.  characteristics                            b. methods
                         c.  blue print                                 d. user-defined data types
                     2.  Examples of primitive data types are ………………….
                         a.  int, double                                b. int, class
                         c.  interface, array                           d. interface, object
                     3.  Instance of a class is also called an/a ………………….
                         a.  Object                                     b. Java
                         c.  Class                                      d. Access specifier
                     4.  What is a class in Java?
                         a.  A runtime instance of an Object            b.  A template or blueprint to create objects
                         c.   A method to execute specific logic        d.  A collection of unrelated methods
                     5.  Which of the following are variables defined within a class to represent the properties or state of an object?
                         a.  Data members                               b. Methods
                         c.  Both a and b                               d. None of these
                     6.  The ………………… is used to invoke methods and pass messages between objects.
                         a.  hash operator (#)                          b. dollar operator ($)
                         c.  dot operator (.)                           d. asterisk operator (*)

                  B.  Fill in the blanks.
                     1.  ………………… occurs when an object calls the method of another object.

                     2.  Memory space is allocated when an ………………… is created.
                     3.  ………………… contains data members and methods.
                     4.  The state of an object is represented by the ………………… of that object.
                     5.  A class acts as a ………………… as by using it similar types of objects are created.
                     6.  Refer a class structure as shown below:
                           class subject
                          {
                               sub_name
                               book_name

                               getData();
                               showData();
                            }
                          subject computer = new subject();
                         With reference to the above class declaration, fill in the blanks:
                         a.  ………………… is the characteristic of the class that starts with letter "s".
                         b.  book_name  is ………………… of the class.



                    50    Touchpad Computer Applications-IX
   47   48   49   50   51   52   53   54   55   56   57