CG continue with ``pointers'' for our final programming assignment.
We were introduced to another function of the
Math Class
- generating random numbers.
Name:
Random Generator
Specification:
new RandomGenerator ()
-- >
< Random Generator >
< Random Generator > .uniform (< int >, < int >)
-- >
< int >
This method generates a random integer between the first < int > and the second < int >, inclusive.
Example:
RandomGenerator rg = new RandomGenerator ();
for (int x = 1;
x <
10;
x + +)
{
int rn = rg.uniform (0, 100);
IO.println (rn);
} |
CG finsished the class session dicussing Part 2 of the final programming assignment which is to develop and implement our own small dictionaries and methods to the Dicionary Class.