Return to Jeff's Main Page

CS1 at Oswego

Hypertexknowlogy

Frequently Asked Questions

 
My Intro to Object-Oriented Programming  
 
 
 
Class Notes

Wednesday November 29 , 2000
 
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.