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

Chapter 14

Answers to Chapter 14 Review Questions

1:
  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;
    
A1:
  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?

A2:
  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, ...

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