# Lesson Notes — The Program Development Life Cycle (Plan → Design → Code → Test → Debug → Document)

- Link: https://mrleffler.com/course-3-introduction-to-programming/unit-1-what-is-programming-program-development-life-cycle-pdlc/lesson-2-the-program-development-life-cycle-plan-%e2%86%92-design-%e2%86%92-code-%e2%86%92-test-%e2%86%92-debug-%e2%86%92-document/lesson-notes-c3u1l2/
- Published: 2026-10-19T11:22:52-04:00
- Author: matthew.leffler@jefferson.kyschools.us

Course 3: Introduction to Programming / Unit 1: What Is Programming & Program Development
Life Cycle (PDLC) / Lesson 2: The Program Development Life Cycle (Plan → Design 
→ Code → Test → Debug → Document)

## Lesson overview

Professional programmers do not just sit down and start typing. They follow the **
Program Development Life Cycle (PDLC)**, a set of phases that helps teams build 
software that works and that other people can understand. Skipping the early phases
usually costs more time later, when mistakes are harder to fix.

## The phases

 1. **Plan.** Decide what problem the program solves, who will use it, and what it 
    must do. Write down the inputs (what goes in) and the outputs (what comes out).
 2. **Design.** Map out the solution before you code. Programmers use **pseudocode**,
    which is plain-language steps that look like code, and **flowcharts**, which are
    diagrams of the steps and decisions.
 3. **Code.** Write the program in a programming language, following your design.
 4. **Test.** Run the program with many different inputs to see whether it does what
    the plan says. Try normal cases and unusual ones.
 5. **Debug.** When a test fails, find the cause of the bug and fix it. Then test again.
 6. **Document.** Explain how the program works and how to use it. Add comments in 
    the code and write instructions for users.

After a program is released, **maintenance** continues. Programmers fix new bugs,
update features, and keep the program working as devices change. The PDLC is a cycle,
not a straight line, and testing often sends you back to design or code.

## Example: a tip calculator

**Plan:** A customer enters a bill and a tip percentage, and the program shows the
total.

**Design (pseudocode):**

    ```
    ASK for the bill amount
    ASK for the tip percent
    tip = bill x (percent / 100)
    total = bill + tip
    SHOW total
    ```

**Test:** Check results that you can work out by hand.

  |  Bill |  Tip percent |  Expected total |  
   |  $50 |  20 |  $60 |  
 |  $100 |  15 |  $115 |  
 |  $0 |  20 |  $0 |

**Debug:** If the program shows anything other than $60 for the first row, you have
found a bug. Trace each step of your design until you find where the numbers go 
wrong.

## Check your understanding

 1. Why is it usually faster to plan before you code?
 2. What is the difference between testing and debugging?
 3. Write pseudocode for a program that asks for a temperature in Celsius and shows
    it in Fahrenheit. Hint: multiply by 9/5, then add 32.

Use the Key Terms page for this lesson to build your glossary, and write each definition
in your own words.
