File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

arraylist of objects

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
(edit- use arraylist instead of vector)

The constructor of the panel class should initialize all instance variables including the Vector object. To simulate data in a file, you can create a vector of Student objects. To do this, create three Student objects based on the following information:
John Jones 88 92 95
Kelly Green 76 83 86
Jeff Smith 92 94 88
Then, add each of these objects to the Vector object.

------------

something like this?

public class panel
{
public string name;
public int scores;


public panel(string inName, int inScores)
{
name = inName;
scores = inScores;
}
}
panel student1 = new panel("John Jones", "88 92 95");
.
panel student3 = new panel("Jeff Smith", "92 94 88");

}

???
[ July 17, 2004: Message edited by: Giles Harney ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic