Question: a java program javadoc is a program that comes with the Java compiler and interpreter. It automatically creates a documentation file on any public class.

a java program

javadoc is a program that comes with the Java compiler and interpreter. It automatically creates a documentation file on any public class. It extracts out information on the public members in a public class and creates a file with this information that is viewable with a web browser. If the class includes javadoc comments (comments that start with /** and end with */ that appear immediately before the public members), these comments will also be included in the file created. javadoc comments can include tags that provide specific information on a public member. For example, the @param tag provides information on parameters; the @return tag provides information on the value returned by a method. For example, in the class below, the @param provides information on the parameters of the constructor; @return provides information on the return value of the toString method. /** This class models a rational number (a number

that can be represented as the ratio of two integers).

*/ public class RationalNumber // class must be public for javadoc

{

private int numerator, denominator;

/**

@param n numerator of rational number

@param d denominator of rational number

*/ public RationalNumber(int n, int d)

{}

/** adds the rational number r to this rational number */

public RationalNumber add(RationalNumber r)

{}

/** add the rational number r to this rational number */

public RationalNumber multiply(RationalNumber r)

{}

/** reduces this rational number to lowest terms */

public void reduce()

{}

/** @return a string with rationa number in "numerator/denominator" form */

public String toString() {}

} Run javadoc on the RationalNumber.java (Rational.Number is in examples folder) file by entering javadoc RationalNumber.java With a web browser, view the file created and compare with RationalNumber.java.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!