Due Date: Sept. 7, 2007
Worth: 20
Modify RandomStudent.java so that it stores a parallel array of type boolean named isFemale, where element i is true if student i is female and false otherwise. Now, print out one male student at random and one female student at random.
Hint: use a do-while loop to generate random integers until you get one that indexes a male student.
Note: Duplicated work is considered as zero.
Tuesday, September 4, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment