Skip to main content

Session 11

Correct Program with Poor Quality

This session explains the difference between a program that merely works and a program that is well written. A program may produce the correct answer but still be poor quality if it is difficult to read, maintain, test, or extend.

Problem Statement

Write a program that is correct but not of good quality. Justify your answer. Make necessary assumptions.

Expected Deliverable

Provide a working program and explain why it is poor quality even though it gives correct output.

Example Quality Problems

  • Unclear variable names.
  • Duplicated code.
  • No input validation.
  • No comments for complex logic.
  • Hard-coded values.
  • Poor formatting.
  • No separation into functions.

Evaluation Notes

A program can be correct for a sample input but still have poor maintainability, readability, testability, and extensibility.

Submission Checklist

  • Include the program.
  • Show sample output proving it works.
  • List quality issues.
  • Suggest improvements.