Quiz on Chapter 3 -- Things, Types and Names

CSSE 120: Fundamentals of Software Development I
Rose-Hulman Institute of Technology
Department of Computer Science & Software Engineering
Winter term, 2003-2004

Your username:       Answer each question succinctly.

  1. How much of the reading (Chapter 3 -- Things, Types, and Names) did you do?
  2.         All of it:         Most of it:         Some of it:         None of it :

  3. In Java (and most object oriented languages):

    1. Few things are objects

    2. Some things are objects

    3. Most things are objects

    4. All things are objects

  4. The type of a thing:

    1. Tells you what kind of behavior you can expect from the thing

    2. Tells you what properties the thing has

    3. Provides a means for knowing what you can do with the thing

    4. Tells your computer something about how it should represent and manuipulate the thing internally

    5. All of the above

  5. True or false: Every object has a type associated with it.

            True:

  6.         False:

  7. True or false: Every name has a type associated with it.

            True:

  8.         False:

  9. True or false: The type of an object never changes.

            True:

  10.         False:

  11. True or false: The type associated with a particular name never changes.

            True:

  12.         False:

  13. True or false: The following statement creates a new object of type Robot.
            Robot r2d2;
    

            True:

  14.         False:

  15. True or false: The following statement creates a new object of type Robot.
            r2d2 = c3pio;
    

            True:

  16.         False:

  17. Write a statement that declares a Clown called bozo.
  18. Write a statement that declares a double called temperature.
  19. An object-type name can be thought of as:

    1. A label of an object

    2. A dial that is set to a particular position

    3. Both of the above

  20. A primitive-type name can be thought of as:

    1. A label of an object

    2. A dial that is set to a particular position

    3. Both of the above

  21. True or false: All 8 primitive types begin with a lower-case letter.

            True:

  22.         False:

  23. What is the most common type used for whole numbers (like -8 and 548)?
  24. What is the most common type used for numbers with decimal points (like -8.84 and 908.004)?
  25. What is the type with only two values, true and false?
  26. What is the type of the literal "Ada Lovelace"?
  27. What is the type of the literal 'k'?
  28. True or false: After the following statements, both star1 and star2 label the same MovieStar.
            MovieStar star1 = new MovieStar("Julia Roberts");
            MovieStar star2 = new MovieStar("Al Pacino");
            star1 = star2;
    

            True:

  29.         False:

If you Submit answers more than once, the last submission is the only one that we will receive.