Questions

  1. Discuss the interplay between scoping and recursion for virtual functions.
  2. How would you express the invariant behavior of an employee class? Explain what problems may occur when adding a bonus to the salary of a derived manager class.
  3. Explain how compound objects may be constructed by employing the diamond structure.
  4. Explain how the functionality of a class may be made accessible through an arbitrary interface class by employing implicit delegation.
  5. What are smart pointers? Why are they useful? How would you implement them?
  6. Sketch how you would implement dynamic role switching in C++.
  7. What is a gadget? Give an example showing the interaction between a gadget and a window.
  8. Characterize the notion of event in a window environment. Characterize also the interaction between events and the gadget to which the event is directed.
  9. Sketch how the Smalltalk MV(C) paradigm may be implemented in C++. Give a simple example of its use.
  10. Explain how events may be used to regulate the effects of user actions. Why are events needed?