View Full Version : JOptionPane input names into array and give 4 digit random ID

04-23-2007, 12:52 AM
I need Help!

I need to create 2 classes- student and first
In student class- must have data fields String name and int ID
along with a constructor student(String str) that initializes data field name
and ID- the ID must be 4 digit integer using Math.random
use printdata() method to print name and ID of student
in first class- create an array with constructor from above for 5 students.
get the name of each student with JOptionPane and assign names to the
student objects using the constructor from above.
Use printdata() method to print the information.

I am sorry, it sounds like a lot but I am really confused on constructors and objects. I have a hard time beginning. Can anyone help me- at least start me off. Any help would greatly be appreciated