Classes and Objects
- slide 2 : 29
The Die Class
To be concrete we start by looking at a complete class written in C#
The class Die.
A program that tosses three dice.
Sample program output.
The class Die in the namespace Game.
A client of Die from namespace Game.
A slightly more general Die class.
The class System.Random
Yahtzee
The Die class is a
template
or
blueprint
from which we can create an arbitrary number of die objects