Program Concept, Stages in Program Development & Methodologies
For a fee calculator, first decide how concessions affect the total. Write the rules in plain words, code them, then test a normal fee, a zero fee and a concession at its limit. A compiler cannot tell you that the college’s discount rule was misunderstood.
1. What is a Program? (In Simple Words)
Think of a computer like a super-fast worker who has zero common sense. A computer cannot think or solve problems on its own. If you want it to calculate student marks or print a bill, you have to give it exact, step-by-step instructions.
- Program: A set of coded instructions written in a programming language (like C, C++, or Java) that tells the computer what to do and how to do it.
- Programming: The process of writing, testing, fixing (debugging), and maintaining these instructions.
- Programmer: The person who writes this code to solve a real-world problem.
Real-Life Analogy: Think of a cooking recipe for making tea. You follow steps: 1. Boil water, 2. Add tea leaves and sugar, 3. Add milk, 4. Strain and serve. If you miss a step, the tea gets ruined! A computer program works in the exact same step-by-step way.
2. Key Characteristics of a Good Program
Writing code that just runs is not enough. In college exams and in the IT industry, a good program must have these qualities:
A correct program gives the required results for its supported inputs. Clear structure and meaningful names help later readers check and change it.
- 1. Correctness & Accuracy — It must give 100% correct output for all valid inputs and handle edge cases properly.
- 2. Efficiency (Speed & RAM) — It should run fast (low CPU usage) and take as little memory (RAM) as possible.
- 3. Readability & Clean Code — Uses meaningful variable names, proper indentation, and comments so anyone can understand it easily.
- 4. Robustness (No Crashing) — Handles wrong user inputs (like typing text when a number is expected) without crashing suddenly.
- Portability: The program should run on different operating systems (like Windows, Linux, and macOS) with little or no change.
- Modularity: The code is broken down into small, independent parts (functions or classes) so it is easy to test, fix, and reuse.
View diagram · Key Qualities of a Good Program
3. Stages in Program Development Life Cycle
Before writing code directly in Turbo C++ or VS Code, professional programmers follow a clear 6-stage process:
Define the problem and design a solution before coding it. Test the result with representative inputs, then maintain it as needs change.
- Stage 2 — Algorithm & Flowchart
- Stage 3 — Coding / Writing Code
- Stage 4 — Compiling & Debugging
- Stage 5 — Testing & Verification
- Stage 6 — Documentation & Maintenance
Easy Explanation of All 6 Stages:
- Problem Definition & Analysis:
First, understand clearly: What problem are we trying to solve? What input will the user give? What output should the program produce? - Algorithm & Flowchart Design:
Before typing code, plan the logic on paper. Write step-by-step points (Algorithm) or draw a diagram with shapes and arrows (Flowchart). - Coding (Implementation):
Now convert the flowchart or algorithm into an actual programming language like C++ using correct syntax and rules. - Compiling & Debugging:
The compiler converts your C++ code into machine language. If you made mistakes (like missing a semicolon;), the compiler shows errors. Debugging means finding and removing these errors (bugs). - Testing & Verification:
Run the program with different sample inputs (positive numbers, zero, negative numbers) to make sure the answer is always correct. - Documentation & Maintenance:
- Documentation: Write a user guide and add comments inside code so other developers can understand it.
- Maintenance: Fix new bugs reported by users and add new features whenever needed.
View diagram · The 6 Stages of Program Development
4. Types of Programming Methodologies
Over time, programmers have used different approaches (paradigms) to build software:
A. Procedural / Structured Programming (POP)
- Main Idea: Focuses on functions and procedures (doing actions step by step).
- Data Security: Data moves freely from function to function using global variables. This means any function can change the data by mistake.
- Approach: Follows a Top-Down approach (starts with the big problem and breaks it down into smaller functions).
- Examples: C, Pascal, FORTRAN.
B. Object-Oriented Programming (OOP)
- Main Idea: Focuses on data and objects rather than just functions. It bundles data and the functions that use that data together into a single unit called a Class.
- Data Security: High security! Data is hidden (Encapsulation) and cannot be touched by outside functions directly.
- Approach: Follows a Bottom-Up approach (creates small building blocks like classes first, then combines them into a full project).
- Examples: C++, Java, Python, C#.
C. Modular Programming
- Breaks a large project into smaller, independent files or modules (like
math.horiostream). Each module handles a specific job.
5. Comparison: Procedural Programming (POP) vs. Object-Oriented Programming (OOP)
This is one of the most important questions in DAVV exams!
| Feature | Procedural Programming (POP) | Object-Oriented Programming (OOP) |
|---|---|---|
| Main Focus | Focuses on functions and doing actions | Focuses on data and real-world objects |
| Design Approach | Top-Down approach | Bottom-Up approach |
| Program Division | Program is divided into functions | Program is divided into classes and objects |
| Data Security | Less secure (data is shared globally) | Highly secure (data is hidden and protected) |
| Data Movement | Data moves freely between functions | Data is kept inside objects and accessed via methods |
| Code Reusability | Low reusability | High reusability (using Inheritance) |
| Overloading | Not supported | Supported (Function & Operator Overloading) |
| Languages | C, Pascal, BASIC | C++, Java, Python, C# |
DAVV Exam Preparation Tips
Frequently Asked 5-Mark Questions:
- Explain the 6 stages in the program development life cycle.
Model Answer: List all 6 stages in order: 1. Problem Definition, 2. Algorithm & Flowchart, 3. Coding, 4. Compiling & Debugging, 5. Testing, 6. Documentation & Maintenance. Give a 1-line explanation for each stage. - Differentiate between Syntax Errors, Runtime Errors, and Logical Errors with examples.
Model Answer:- Syntax Error: Grammatical mistake in code (e.g., missing semicolon
;or spelling mistake inint). The compiler catches this before running. - Runtime Error: Happens while the program is running (e.g., dividing a number by zero
x / 0). It causes the program to stop or crash. - Logical Error: Program runs without errors, but gives the wrong answer due to faulty logic (e.g., writing
a - binstead ofa + b).
- Syntax Error: Grammatical mistake in code (e.g., missing semicolon
Frequently Asked 10-Mark Questions:
- Differentiate between Procedural Programming (POP) and Object-Oriented Programming (OOP) in detail. Why is OOP better for large projects?
Model Answer:- Define both POP and OOP with clear real-world examples.
- Draw the comparison table (cover approach, data security, program division, reusability, and languages).
- Explain the 4 main pillars of OOP: Encapsulation (data wrapping), Abstraction (hiding details), Inheritance (reusing code), and Polymorphism (one name, multiple forms).
- Explain why OOP is preferred: easy to manage large codebases, better data security, and less code duplication.