Chapter 14

Answers to Chapter 14 Review Questions

  1. If Speed is a property defined inside an object called myRocket, what is the general name for the block of statements defined for the Speed property that are executed when the following line is executed?

    myRocket.Speed = 40;
  2. When the following line is executed?

    travelTime = distance / myRocket.Speed;
  1. set statement block or set accessor

  2. get statement block or get accessor

2: Which capitalization style is recommended for
  1. Instance variables?

  2. Methods?

  3. Properties?

  1. Camel casing

  2. Pascal casing

  3. Pascal casing

3: The following lines specify an instance variable declaration and what is meant to be a property with the task of allowing access to the instance variable speed from outside the object. However, ...

Get C# Primer Plus now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.