O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

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

Answers to Self-Review Exercises

7.1 a) method call. b) local variable. c) return. d) void. e) top. f) last-in-first-out (LIFO). g) return; or return expression; or encountering the closing right brace of a method. h) Random. i) activation record, stack frame. j) stack overflow. k) scope. l) overloading. m) method call. n) recursive. o) base.

7.2 a) class body. b) block that defines method RollDice’s body. c) class body. d) class body. e) block that defines method Main’s body.

7.3 The following solution demonstrates the Math class methods in Fig. 7.2:

 1   // Exercise 7.3 Solution: MathTest.cs  2   // Testing the Math class methods.  3   using System;  4  5   public class MathTest  6   {  7      public static void ...

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