Manuelle Korrektur

JavaDoc

Was muss alles vorhanden sein?

Eine Dokumentation muss folgende Informationen enthalten:

Ablauf

  1. Navigiere in Moodle zum Abschnitt "Intern" und wähle den Reiter "Manuelle Korrektur" aus.
  2. Suche den Ordner "Dokumentation" im Zusammenhang mit der Hausübung "Hxy".
  3. Lade die entsprechende Datei herunter.
  4. Die Tabelle ist folgendermaßen aufgebaut:
    1. id: Eindeutige Kennung
    2. id_tu: TU-ID der zu korrigierenden Person
    3. name_expected: Erwarteter Name der Klasse, Methode oder des Attributs
    4. name_actual: Aktueller Name der Klasse, Methode oder des Attributs
    5. valid: Bewertung der Dokumentation (n = nicht ausreichend, y = ausreichend)
    6. deviation: Gibt an, ob es eine Abweichung gibt oder eine Diskrepanz besteht
    7. documentation: Zu korrigierende JavaDoc
  5. Überprüfe die Richtigkeit der Dokumentation. Die Spalten validund documentation sind für euch relevant.
  6. Lade die korrigierte Datei in Moodle in "Hochladen der bewerteten Dokumentationen" hoch.

Überprüfung

Beispiele

Klasse

Positiv-Beispiel
/**
 * Represents a 2D geometric point with x and y coordinates.
 */
public class Point {

}
Negativ-Beispiel
/**
 * A point.
 */
public class Point {

}

Interface

Positiv-Beispiel
/**
 * Defines the contract for objects that can be compared.
 */
public interface Comparable {

    /**
     * Compares this object with another object for order.
     *
     * @param other the object to be compared
     * @return a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
     */
    int compareTo(Object other);
}
Negativ-Beispiel
/**
 * Comparison interface.
 */
public interface Comparable {

    int compareTo(Object other);
}

Enum

Positiv-Beispiel
/**
 * Represents the days of the week.
 */
public enum Day {

    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY;
}
Negativ-Beispiel
/**
 * Days enum.
 */
public enum Day {

    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY;
}

Konstruktor

Positiv-Beispiel
/**
 * Creates a new point with the specified coordinates.
 *
 * @param x the x-coordinate of the point
 * @param y the y-coordinate of the point
 */
public Point(double x, double y) {
    this.x = x;
    this.y = y;
}
Negativ-Beispiel
/**
 * Creates a point.
 *
 * @param x the x-coordinate of the point
 * @param y the y-coordinate of the point
 */
public Point(double x, double y) {
    this.x = x;
    this.y = y;
}

Methode

Positiv-Beispiel
/**
 * Retrieves the x-coordinate of this point.
 *
 * @return the x-coordinate of this point
 */
public double getX() {
    return x;
}
/**
 * Computes the magnitude (length) of the vector represented by this instance.
 *
 * @return magnitude of the vector
 */
public double magnitude() {
    return Math.sqrt(x * x + y * y);
}
Negativ-Beispiel
/**
 * The x-coordinate of this point.
 */
public double getX() {
    return x;
}
/**
 * Computes the magnitude (length) of the vector using the Math.sqrt method with the input x * x + y * y.
 *
 * @return magnitude of the vector
 */
public double magnitude() {
    return Math.sqrt(x * x + y * y);
}

Revision #1
Created 8 October 2024 13:52:10 by Svana Esche
Updated 8 October 2024 13:52:10 by Svana Esche