Click to See Complete Forum and Search --> : javadoc help


Rxyz
04-13-2006, 02:57 PM
In the jsp, I am creating there is a table which shows all the accounts.

To show the accounts in the table, I created an object Account and have some attributes which make a row of a table.

Account ----- object
name
Acct. no
Account bal

are the attributes of that object.

I created a List of this Account object and displaying in my jsp. everything works fine.

Now trying to write the javadoc for this object. I am not sure what to write in here i.e above the class. Any suggessions on what to write?

/**
* Account creates account object ----- ????
*/
public class Account() {
.....
}

I would appreciate your suggessions. thanks.

rodentje
04-13-2006, 04:18 PM
Perhaps something like this:
Note that the attributes are commented within the class before the constructor, general class info is commented before the class.
/**
* Class: Account
*
* @author John Doe <john.doe@whatever.com>
* @version 1.0
* @since 1.0
* @see
*/
class Account{

private String name;
private int number;

/**
*@param name of the new user
*@param number of the new user
*/
public class Account(String name, int number) {
this.name=name;
this.number=number;
}
/**
* @return String representation of Account
*/
public String toString(){
return name+" - "+number;
}