Concepts of Programming Languages

(Sean Pound) #1
Review Questions 571


  1. Explain how Smalltalk messages are bound to methods. When does this
    take place?

  2. What type checking is done in Smalltalk? When does it take place?

  3. What kind of inheritance, single or multiple, does Smalltalk support?

  4. What are the two most important effects that Smalltalk has had on
    computing?

  5. In essence, all Smalltalk variables are of a single type. What is that type?

  6. From where can C++ objects be allocated?

  7. How are C++ heap-allocated objects deallocated?

  8. Are all C++ subclasses subtypes? If so, explain. If not, why not?

  9. Under what circumstances is a C++ method call statically bound to a
    method?

  10. What drawback is there to allowing designers to specify which methods
    can be statically bound?

  11. What are the differences between private and public derivations in C++?

  12. What is a friend function in C++?

  13. What is a pure virtual function in C++?

  14. How are parameters sent to a superclass’s constructor in C++?

  15. What is the single most important practical difference between Smalltalk
    and C++?

  16. If an Objective-C method returns nothing, what return type is indicated
    in its header?

  17. Does Objective-C support multiple inheritance?

  18. Can an Objective-C class not specify a parent class in its header?

  19. What is the root class in Objective-C?

  20. In Objective-C, how can a method indicate that it cannot be overridden
    in descendant classes?

  21. What is the purpose of an Objective-C category?

  22. What is the purpose of an Objective-C protocol?

  23. What is the primary use of the id type in Objective-C?

  24. How is the type system of Java different from that of C++?

  25. From where can Java objects be allocated?

  26. What is boxing?

  27. How are Java objects deallocated?

  28. Are all Java subclasses subtypes?

  29. How are superclass constructors called in Java?

  30. Under what circumstances is a Java method call statically bound to a
    method?

Free download pdf