Computer Program Development Guide
Computer Program Development Guide
Language Translators
1. Compiler: Converts the entire source code into machine code at once. Example:
GCC for C programming.
2. Interpreter: Executes the program line by line. Example: Python interpreter.
3. Editor: A tool for writing and editing source code. Example: Visual Studio Code.
4. Linker: Combines object files into a single executable program. Example: GNU
linker (ld).
5. Loader: Loads the executable program into memory for execution. Example:
Operating system loader.
A detailed document outlining what the program should do, including inputs,
outputs, and functionality.
1. Agile Methodology
Definition
Key Features
Iterative Development: Work is divided into short cycles (sprints, usually 2-4
weeks).
Customer Collaboration: Continuous feedback from stakeholders.
Adaptability: Changes can be incorporated even late in development.
Cross-functional Teams: Developers, testers, and business analysts work
together.
1. Scrum
o Uses roles like Scrum Master, Product Owner, and Development Team.
o Daily stand-up meetings (Daily Scrum).
o Artifacts: Product Backlog, Sprint Backlog, Increment.
2. Kanban
o Visual workflow management using a Kanban board (To-Do, In Progress, Done).
o Focuses on continuous delivery without fixed sprints.
3. Extreme Programming (XP)
o Emphasizes pair programming, test-driven development (TDD),
and continuous integration.
Advantages
Disadvantages
Best For
2. Waterfall Methodology
Definition
A linear and sequential approach where each phase must be completed before
moving to the next.
Key Phases
1. Requirements Gathering
2. System Design
3. Implementation (Coding)
4. Testing
5. Deployment
6. Maintenance
Advantages
Disadvantages
Best For
Definition
Key Features
Reusable components
User feedback-driven development
Automated tools for faster coding
Phases
1. Requirements Planning
2. User Design (Prototyping)
3. Construction (Rapid Builds)
4. Cutover (Deployment & Testing)
Advantages
Disadvantages
Best For
4. Spiral Model
Definition
1. Planning
2. Risk Analysis
3. Engineering (Development & Testing)
4. Evaluation (Customer Review)
Advantages
Best For
5. DevOps Methodology
Definition
Key Practices
Advantages
✔ Faster releases.
✔ Improved collaboration between teams.
Disadvantages
Best For
Cloud-based applications.
Companies aiming for CI/CD pipelines.
Comparison Table
Flexibilit Risk
Methodology Speed Best For
y Management
Startups, evolving
Agile High Fast Medium
projects
Small, fixed-scope
Waterfall Low Slow Low
projects
Very
RAD Medium Low UI/UX-focused apps
Fast
Conclusion
Definition
The process of collecting and analyzing user needs to define the software’s
functionality.
Key Activities
Example
Best Practices
2. System Design
Definition
Key Components
Example
Best Practices
Definition
Key Activities
Example
Copy
Download
class Patient:
def __init__(self, name, age):
[Link] = name
[Link] = age
Best Practices
4. Testing
Definition
Verifying that the software works as expected and is bug-free.
Types of Testing
Tests individual
Unit Testing assert sum(2,3) == 5
functions
Checks module
Integration Testing Testing API endpoints
interactions
End-to-end patient
System Testing Full system validation
registration test
Best Practices
5. Deployment
Definition
Deployment Methods
Best Practices
6. Maintenance
Definition
Types of Maintenance
Example
Best Practices
Requirement Continuous
Fixed upfront Evolving
s feedback
Automated
Testing After coding During sprints
(CI/CD)
Conclusion
Styles of Programming
1. Procedural Programming
Definition
Key Features
Example (C)
c
Copy
Download
#include <stdio.h>
int main() {
float r = 5.0;
float area = calculate_area(r);
printf("Area: %.2f", area);
return 0;
}
Advantages
Disadvantages
✖ Poor scalability for complex systems.
✖ Global variables can lead to unintended side effects.
Best For
Definition
Key Principles
Example (Java)
java
Copy
Download
class Animal {
String name;
void speak() { [Link]("Sound"); }
}
Advantages
Disadvantages
Best For
Definition
Key Concepts
Pure functions: Same input → same output (no side effects).
Immutability: Data cannot be modified after creation.
Higher-order functions: Functions that take/return other functions.
Example (Haskell)
haskell
Copy
Download
-- Pure function to double a list
doubleList :: [Int] -> [Int]
doubleList = map (*2)
Advantages
Disadvantages
Best For
4. Event-Driven Programming
Definition
Code execution is triggered by events (e.g., clicks, messages) rather than a linear
flow.
Key Components
Example (JavaScript)
javascript
Copy
Download
[Link]("myButton").addEventListener("click", () => {
alert("Button clicked!");
});
Advantages
Disadvantages
Best For
5. Declarative Programming
Definition
Focuses on "what" (desired outcome) rather than "how" (step-by-step
instructions).
Subtypes
sql
Copy
Download
Copy
Download
Run
<h1>Hello, World!</h1>
Advantages
Disadvantages
Best For
Database queries.
Configuration files (e.g., YAML).
Comparison Table
Data processing,
Functional Pure functions Immutable
concurrency
Event- User/system
Mutable UIs, real-time apps
Driven events
Conclusion
The process of planning the structure and behavior of a program before coding.
1. Top-Down: Starts with the main function and breaks it into smaller sub-tasks.
Example: Designing a payroll system by dividing it into modules like "Calculate
Salary" and "Generate Report."
2. Bottom-Up: Starts with smaller components and combines them into larger
systems. Example: Building a library system by first creating a "Book" class.
3. Data-Driven: Focuses on data flow and transformations. Example: A program that
processes user input from forms.
1. Top-Down Design
Definition
A decomposition strategy that starts with the highest-level system overview and
progressively breaks it into smaller, manageable components.
Key Characteristics
Process
Copy
Download
Main Program
├── Calculate Salaries
│ ├── Get Employee Data
│ ├── Compute Base Pay
│ └── Apply Deductions
└── Generate Reports
├── Create PDF
└── Send to HR
Advantages
Disadvantages
Best For
2. Bottom-Up Design
Definition
An approach that begins with basic components and assembles them into
increasingly complex structures until reaching the complete system.
Key Characteristics
Component-first development
Early focus on reusable parts
Natural fit for object-oriented systems
Process
1. Identify fundamental operations/objects
2. Build and test small components
3. Combine components into larger subsystems
4. Integrate into final system
Copy
Download
Physics Engine
├── Collision Detection
└── Gravity Simulation
Rendering Engine
├── 3D Model Loader
└── Shader System
Advantages
Disadvantages
Best For
Library/framework development
Systems with many reusable components
Object-oriented projects
3. Data-Driven Design
Definition
An approach where data structures and flow dictate system organization rather
than control flow.
Key Characteristics
Data-centric architecture
Emphasis on data transformations
Common in functional and pipeline systems
Implementation Patterns
Copy
Download
1. Pseudo Code
Definition
Pseudo code is a plain-language, high-level description of an algorithm or
program logic. It combines natural language with programming constructs (e.g.,
loops, conditionals) to outline steps without strict syntax rules.
Purpose
Example
plaintext
Copy
Download
BEGIN
INPUT temperature
IF temperature > 30 THEN
PRINT "It's hot"
ELSE
PRINT "It's moderate"
END IF
END
Advantages
Disadvantages
Tools
Text editors (Notepad, VS Code).
2. Flow Charts
Definition
Flow charts are visual diagrams that represent a process or algorithm using
standardized symbols.
Key Symbols
Symbo
Name Purpose
l
Tools
Definitions
Decision Tree
plaintext
Copy
Download
Loan Application
├── Credit Score > 700? → Approve
└── Credit Score ≤ 700?
├── Income > $50k? → Approve with High Interest
└── Income ≤ $50k? → Reject
Decision Table
Approv
Condition\Action Approve (High Interest) Reject
e
Else ✔
Applications
Tools
Definition
DFDs illustrate how data moves through a system, highlighting processes, data
stores, and external entities.
Components
Levels of DFD
plaintext
Copy
Download
Customer → (Place Order) → Order Database → (Process Payment) → Bank →
(Ship Product) → Warehouse
Tools
Comparison of Tools
1. Design Phase: Tools like DFDs and flow charts ensure clarity before coding
begins.
High level
Low level
4GL
Object-Oriented
Visual
1. High-Level Languages
5. Visual Languages
1. Language Domain Match: Is the language suitable for the task? Example: Use
JavaScript for web development.
2. Popularity: More community support and resources. Example: Python is widely
used.
3. Project Size: Large projects may need scalable languages. Example: Java for
enterprise applications.
4. Tool Support: Availability of IDEs and libraries. Example: Visual Studio for C#.
5. Efficiency: Performance requirements. Example: C for system programming.
The curriculum guide specifies the following tools for program development:
Flow charts
Data flow diagrams
Decision table
Decision tree
Web Authoring tools
Notepad
Detailed Notes
Flowcharts
o Definition: Flowcharts are diagrams that use symbols to represent the
sequence of steps and decisions involved in a process or algorithm.
o Explanation: They provide a visual representation of the program's
logic, making it easier to understand and design the flow of control.
o Example: A flowchart can illustrate the steps in a sorting algorithm, a
user login process, or a calculation.
Data Flow Diagrams (DFDs)
o Definition: Data flow diagrams are graphical representations of the
flow of data through an information system.
o Explanation: They show how data is input, processed, stored, and
output by the system, highlighting the movement of information
between different components.
o Example: A DFD can depict how customer orders are received,
processed, and fulfilled in an e-commerce system.
Decision Tables
o Definition: Decision tables are tabular representations of complex
decision logic.
o Explanation: They list conditions and corresponding actions, making
it clear what action should be taken for each combination of
conditions.
o Example: A decision table can specify the rules for determining a
customer's discount based on purchase amount and customer status.
Decision Trees
o Definition: Decision trees are tree-like structures that represent a
series of decisions and their possible outcomes.
o Explanation: They are used to visualize and analyze decision-making
processes, showing the branching paths based on different choices.
o Example: A decision tree can model the process of diagnosing a
technical problem based on user symptoms.
Web Authoring Tools
o Definition: Web authoring tools are software applications used to
create web pages and websites.
o Explanation: They provide a user-friendly interface for designing and
developing web content, often with features like WYSIWYG (What
You See Is What You Get) editing, code generation, and site
management.
o Example: HTML editors, website builders (e.g., WordPress, Wix),
and web development IDEs.
Notepad
o Definition: Notepad is a basic text editor included with Windows
operating systems.
o Explanation: While simple, it can be used for writing code,
especially for web development (HTML, CSS, JavaScript) or scripting
languages.
o Example: Creating a simple HTML file to structure a web page.
This unit, as per the curriculum guide, focuses on equipping learners with the skills
to implement structured programming concepts using the C language.
C Concepts:
o Characteristics:
Definition: Key features that define the C programming
language.
Explanation:
C is a general-purpose language known for its simplicity,
efficiency, and portability.
It supports structured programming, allowing for
organized and modular code.
C provides low-level access to memory, enabling system
programming.
Examples:
C's use of pointers for direct memory manipulation.
Its relatively small number of keywords.
o Pre-processor directives:
Definition: Instructions to the C preprocessor, which modifies
the code before compilation.
Explanation:
These directives begin with the '#' symbol.
Common uses include including header files, defining
macros, and conditional compilation.
Examples:
#include <stdio.h>: Includes the standard input/output
library.
#define MAX 100: Defines a constant macro.
o C headers:
Definition: Files containing declarations of functions, data
types, and macros.
Explanation:
Header files have the .h extension.
They facilitate code reuse and modularity.
Examples:
stdio.h: For standard input/output operations.
math.h: For mathematical functions.
Fundamentals of C programming language:
o Input and output statements:
Definition: Functions that enable interaction with the user or
external devices.
Explanation:
Input functions read data from a source (e.g., keyboard).
Output functions display data to a destination (e.g.,
screen).
Examples:
printf(): Formatted output to the console.
scanf(): Formatted input from the console.
o C keywords:
Definition: Reserved words with predefined meanings in the C
language.
Explanation:
Keywords cannot be used as identifiers (variable names,
etc.).
They form the core vocabulary of C.
Examples:
int, float, char, if, else, for, while, return
o Variables:
Definition: Named storage locations in memory that hold data.
Explanation:
Variables have a data type (e.g., int, float, char).
Their values can change during program execution.
Examples:
int age;
float salary;
o C operators:
Definition: Symbols that perform operations on operands
(values or variables).
Explanation:
C provides operators for arithmetic, relational, logical,
etc.
Operators have precedence and associativity.
Examples:
Arithmetic: +, -, *, /, %
Relational: ==, !=, >, <, >=, <=
Logical: &&, ||, !
o C Expressions:
Definition: Combinations of operators, operands, and function
calls that evaluate to a value.
Explanation:
Expressions are used to calculate values, make
comparisons, etc.
Examples:
a+b*c
x > 0 && y < 10
Control Structures:
o Sequence:
Definition: The default flow of execution, where statements are
executed in the order they appear.
Explanation:
Statements are executed one after another.
This is the simplest control structure.
Example:
int a = 5;
int b = 10;
int sum = a + b; // 1st
printf("%d", sum); // 2nd
o Selection:
Definition: Statements that allow the program to choose
between different execution paths.
Explanation:
if, else if, and switch statements implement selection.
They execute code based on conditions.
Examples:
if (condition) { ... } else { ... }
switch (variable) { case value: ...; break; ... }
o Iteration:
Definition: Statements that allow the program to repeat a block
of code.
Explanation:
for, while, and do-while loops implement iteration.
They execute code repeatedly until a condition is met.
Examples:
for (int i = 0; i < 10; i++) { ... }
while (condition) { ... }
Sub-programs:
o Types:
Definition: Reusable blocks of code that perform specific tasks
(functions).
Explanation:
Functions promote modularity and code reuse.
C programs are built from functions.
Example:
o Scope of variables:
Definition: The region of the program where a variable is
accessible.
Explanation:
Variables can be local (accessible within a function) or
global (accessible from anywhere).
Examples:
o Parameter passing:
Definition: The way data is passed to functions.
Explanation:
C supports pass-by-value and pass-by-reference.
This determines whether the original data is modified.
Examples:
C program format:
o Definition: The structure and syntax of a C program.
o Explanation:
This includes the main() function, header files, statements, and
proper syntax.
Correct formatting enhances readability.
o Example:
#include <stdio.h>
int main() {
// Code here
return 0;
}