O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

1:You have just started working on two software projects and identified the following classes in the two programs:

Program 1: Airplane, jet engines, wings, airplane body, passenger seats, and cockpit

Program 2: Person, student, employee, undergraduate, graduate, secretary, cleaner, and director

Which program seems able to benefit the most from inheritance? Why? Which concept is the other program likely to benefit from?

2:Consider the following class hierarchy.

In which class would you include each of the following class members:

  1. The brandName instance variable

  2. The Autodial method

  3. The Start method

  4. The Tuning method

  5. The purchasePrice ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required