Computer Science 223 Discussion Questions

Riel, Chapter 8

Discussion Questions submitted for Chapter 8 of Riel

Class Variables, Object Variables, and Global Variables

  1. Is there a difference between a class variable and a global variable? -Jim Finnessy
  2. The relationship of object-specific data and class-specific data is not clear to me. If an object is an instance of the class, then how can "class-specific data" exist? Aren't class-specific data included in object? --Hisako Watanabe
  3. Can you clarify/discuss the two approaches to implementing class-specific versus object-specific data/behavior? --Khong
  4. Why should class variables or methods be used to perform bookkeeeping information?
  5. How does one use class variables to manage objects in the class? (Sam Vanderhyden)
  6. Can you explain Heuristic 8.1 in java context?
  7. Could you illustrate on Heuristic 8.1 a little bit more? -George

Metaclasses

  1. What does java use for metaclasses?
  2. How are metaclasses implemented in Java? Todd
  3. How are metaclasses in Java different from meta classes in C++? ~yasir.
  4. What are metaclasses analogous to in java?
  5. Could you discuss more about the use and implementation of metaclasses. taha
  6. Could you clarify what metaclass is?
  7. Can you clarify the definition of a metaclass? (Sam Vanderhyden)
  8. Could you explain how metaclasses are implemented in java? -George
  9. How are metaclasses inmplemented in java? Steve F.
  10. What differences are likely necessary in metaclass constructors? Todd
  11. Does java implement metaclasses in the same way as C++? - Jim Finnessy
  12. When do we need to think about metaclasses? Is it a very important notion in O-O programming? --Hisako Watanabe
  13. Is there a class of metaclasses and what is it called? Dessislava Dimova
  14. Does Java allow for metaclasses? Or does it follow a template structure like C++? -Peter Likarish
  15. Will a metaclass have enough behavior for it to be a worthy class? How much could you do with a metaclass? Steve F

Templates

  1. Template seems to be an example of metaclass. What other examples are there that help to see the bigger picture of metaclass? (Raz)
  2. Does the idea of templates exist in Java? Dessislava Dimova
  3. What are the template constructs? - Elias Vafiadis

Abstract Classes with no Subclasses

  1. What was Riel talking about with the "practical" example of an abstract class that has no subclasses? I didn't understand how that class would be useful at all, or why it had to be abstract... -Peter Likarish
  2. Riel doesn't make it clear why an abstract class that is not a base class would be useful, so in what ways is it useful? --Khong
  3. Could we discuss an example of the use of an abstract class with no object-specific data or methods? ~yasir.
  4. Is there any instance other than namespace pollution where it would be useful to have an abstract class as a base class? taha

Other Questions

  1. How does this fit in with object oriented design?
  2. Besides type checking, what other kinds of errors are caught at compile time, and what kinds saved for run time? (Raz)


This document is available on the World Wide Web as

http://www.walker.cs.grinnell.edu/courses/223.sp02/read-riel-8.html

created April 24, 2002
last revised April 24, 2002
Valid HTML 3.2!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.