Milestone 3 Review: Quality, Documentation, and Delivery

Consolidate Your Learning

A review of the core concepts of testing, documenting, and submitting a professional software project.
Author

Chuck Nelson

Published

October 25, 2025

Purpose

This document provides a comprehensive review of the professional practices you learned in Milestone 3. Through a series of active learning exercises, you will solidify your understanding of automated testing with JUnit, code documentation with Javadoc, and the final steps for submitting a completed project.

What You’ll Accomplish

By the end of this review session, you will have:

  • Reinforced your ability to write unit tests for both successful outcomes and expected exceptions.
  • Practiced writing clear and effective Javadoc comments.
  • Reviewed the full workflow for finalizing and submitting a project.

Active Learning and Engagement

NoteSubmitting Your Work

For all the exercises and questions in this review document, you are to record your work on a new page in your Microsoft Teams Student Notebook. This will be the official record of your review process.

Exercise 1: You Are the QA Engineer

As a Quality Assurance (QA) engineer, your job is to find bugs by writing tests that break the code. Read the following method, which has a subtle bug related to a boundary condition.

Code with a Bug:

// In TaskManager.java
/**
 * Returns a list of tasks that are due within a certain number of days.
 * A task due in 0 days is considered due today.
 */
public List<Task> getTasksDueSoon(int days) {
    List<Task> dueSoon = new ArrayList<>();
    for (Task task : taskStore) {
        // Bug: This should be <=, not <. A task due in 3 days should be included.
        if (task.getDaysUntilDue() < days) {
            dueSoon.add(task);
        }
    }
    return dueSoon;
}

Your Task: In your notebook, write a complete JUnit @Test method named testGetTasksDueSoon_IncludesBoundary that would fail because of this bug.

  • Hint 1: Your test should create a task that is due in exactly X days and then call getTasksDueSoon(X).
  • Hint 2: You will need to use an assertion like assertEquals(1, tasks.size()); to check that the task was correctly included in the returned list.

Exercise 2: Code Review Challenge (Documentation)

A colleague has written the following method but provided incomplete Javadoc. Review the code and the comment, then rewrite the Javadoc to be complete and accurate.

Code to Review:

/**
 * Adds a new task.
 */
public void addTask(Task task) throws DuplicateTaskException {
  if (task == null || task.getTitle() == null || task.getTitle().trim().isEmpty()) {
    throw new IllegalArgumentException("Task and task title cannot be null or empty.");
  }
  for (Task existing : taskStore) {
      if (existing.getTitle().equalsIgnoreCase(task.getTitle())) {
          throw new DuplicateTaskException("A task with this title already exists.");
      }
  }
  // ... logic to add the task
}

Your Task: Rewrite the Javadoc comment for the addTask method. It is missing a description of the parameter and it fails to document the two exceptions it can throw. Use the @param and @throws tags correctly.

Exercise 3: Peer Instruction

This exercise is for discussion. Find a partner or a small group and choose one of the topics below. Each person should take a turn explaining their topic to the others.

Explain the purpose of the @BeforeEach annotation in a JUnit test class.

  • Why is it important to create a new TaskManager instance before each test?
  • What could happen if all tests shared the same TaskManager object?

Explain the difference between a Javadoc comment (/** ... */) and a regular multi-line comment (/* ... */).

  • What is the command you run to turn Javadoc comments into an HTML website?
  • Where in your project directory does the generated website appear?

Explain the three main Git commands you use to submit your final project, and what each one does.

  • git add .
  • git commit -m "..."
  • git push

Review Questions

Answer the following questions in your Microsoft Teams Student Notebook.

  1. In JUnit, what is the primary purpose of the assertThrows() method?

  2. Which Javadoc tag is used to document a method parameter?

  3. What is the Maven command to run all the unit tests in your project?

  4. What is the Maven command to generate the Javadoc website?

  5. What is the Git command to upload your local commits to your remote repository on GitHub?

Reflect and Review

ImportantFinal Course Reflection

Reflect on your journey through the entire course, from the first “Hello, World!” to this final milestone. In your Microsoft Teams Student Notebook, answer the following:

  • 3 most important skills you learned during this course.
  • 2 ways your understanding of what programming is has changed since you started.
  • 1 piece of advice you would give to a future student starting this course.
Back to top