5.6. Exercises

  1. Go back to your solution for exercise No. 3 at the end of Chapter 2. For all the classes you suggested, list the pairwise associations that you might envision occurring between them.

  2. If the class FeatureFilm were defined to have the following methods:

    public void Update(Actor a, string title);
    public void Update(Actor a, Actor b, string title);
    public void Update(string topic, string title);

    which of the following additional headers would be allowed by the compiler?

    public bool Update(string category, string theater);
    public bool Update(string title, Actor a);
    public void Update(Actor b, Actor a, string title);
    public void Update(Actor a, Actor b);
  3. Given the following simplistic code, which illustrates overloading, overriding, and ...

Get Beginning C# 2008 Objects: From Concept to Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.