aspose file tools*
The moose likes Beginning Java and the fly likes Arrays and strings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Arrays and strings" Watch "Arrays and strings" New topic
Author

Arrays and strings

MaryEllen Volb
Ranch Hand

Joined: Jan 31, 2001
Posts: 35
I have a problem where the program will implement a class called 'Student'. The class will contain the student's name, ID, and status, i.e. Freshman, Sophomore,etc. Using the Math.random ()function, the program will randomly assign ID numbers to 20 students. The program will output the names and ID numbers
of all the junior students.
Since I am just learning arrays, I was hoping someone could help me with this problem. I have to assing 20 student names as Name1, Name2, and so on. Please help!!!

thanks, Mary Ellen
Allen Alchian
Ranch Hand

Joined: Oct 11, 2000
Posts: 83
Mary Ellen
Here is a shot at what I understood you are looking for. I cheated by giving each person the same name and status, just to get data into the array. I assume you can figure out how to fix that part. Probably can use some other refinements, but this will hopefully help you understand the array issue. Hope this helps.
Allen


Allen
MaryEllen Volb
Ranch Hand

Joined: Jan 31, 2001
Posts: 35
Thank you so much for the help.....I really need it!
Mary Ellen
 
Don't get me started about those stupid light bulbs.
 
subject: Arrays and strings