He wants to input in the program an undefinite number of (numbers like 1, 2 etc), all positive. With that done he wants the program to randomize these numbers and show them one at a time in a random distribution. i thought it was easier when he asked but i found out while writing it that its not that easy. i need help. anyone?
trombadorez 0 Newbie Poster
Recommended Answers
Jump to PostAs the user enters numbers add them to a List ( http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html ). Then in a loop generate a random integer between 0 and the size() of the list. Get(int index) the element …
Jump to PostNow you have your numbers, follow the instructions in post #4 above to randomise and output them.
Jump to PostAnd don't forget to acknowledge the help you received here to your instructor, ah, I mean friend, of course. ;-)
Jump to PostIf you were to make this Friend into a Java class, would it implement Professor?
All 14 Replies
Grn Xtrm 84 Posting Pro in Training
trombadorez 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Grn Xtrm 84 Posting Pro in Training
trombadorez 0 Newbie Poster
Grn Xtrm 84 Posting Pro in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
trombadorez 0 Newbie Poster
BestJewSinceJC 700 Posting Maven
trombadorez 0 Newbie Poster
BestJewSinceJC 700 Posting Maven
trombadorez 0 Newbie Poster
BestJewSinceJC 700 Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.