Programme Development
Download the Lessonotes Mobile Nigeria 2025 app for faster lesson access on Android and iPhone.
Subject: Computer & IT
Class: Senior Secondary 2
Term: 3rd Term
Week: 2
Theme: Developing Problem-Solving Skills
This page supports the lesson note with a companion video and a short classroom-ready summary.
For class groups and homework, share this lesson page so learners also get the summary, objectives, and full lesson context.
Define Program State the characteristics of agood program State precautionsto be taken whenwriting program List stepsinvolved in Programdevelopment Describe each of the steps in programdevelopment List examples of interpreted and compiled programs Draw a flowdiagram on how:a) compiler andb) in terpreter works
This section provides the core content necessary for the teacher to deliver the lesson effectively without external resources. 2.
1. Definition of Program A program (or computer program) is a set of precise, step-by-step instructions that tell a computer what to do and how to do it. These instructions are written in a specific programming language (e.g., Python, Java, C++) and are executed by the computer to perform a particular task or solve a problem. Examples include the software that runs a word processor, a web browser, or a mobile game. 2.
2. Characteristics of a Good Program A program that is considered "good" typically possesses several key attributes: Correctness: The program must accurately fulfill its intended purpose and produce correct results for all valid inputs. It should be free from logical errors and bugs. For example, a banking application must correctly calculate balances and transactions.
Efficiency: The program should use system resources (e.g., CPU time, memory) optimally. It should execute quickly and without unnecessary delays. An efficient JAMB CBT application would load questions fast and process answers promptly.
Reliability: The program should consistently perform its functions as expected, even under adverse conditions or with unexpected inputs. It should not crash or produce unpredictable results. A reliable hospital management system would always maintain accurate patient records.
Portability: The program should be able to run on different computer systems or operating systems with minimal or no modifications. For instance, a mobile app that works on both Android and iOS demonstrates portability.
Maintainability: The program should be easy to understand, modify, and update by other programmers (or the original programmer at a later time). This is crucial for fixing bugs, adding new features, or adapting to changing requirements. Well-structured code with comments enhances maintainability.
User-friendliness (Usability): The program should be easy for the intended users to learn, understand, and operate. It should have a clear and intuitive interface. An e-commerce website with a simple checkout process is user-friendly.
Readability: The code should be well-structured, clearly written, and appropriately commented so that other programmers can easily understand its logic.
Robustness: The program should be able to handle invalid inputs or unexpected situations gracefully without crashing. 2.
3. Precautions to be Taken When Writing a Program To ensure the development of a good program, programmers should observe the following precautions: Thorough Problem Analysis: Fully understand the problem before writing any code. This includes gathering requirements and defining the scope.
Structured Design: Plan the program's logic and structure using tools like algorithms, flowcharts, or pseudocode before coding. Avoid "spaghetti code." Modularization: Break down the program into smaller, manageable, and independent modules or functions. This makes the program easier to understand, code, and debug.
Meaningful Naming Conventions: Use clear, descriptive names for variables, functions, and classes (e.g., `studentName` instead of `x`, `calculateTax` instead of `ct`).
Comments and Documentation: Add comments within the code to explain complex logic or non-obvious parts. Keep external documentation updated.
Error Handling: Anticipate potential errors (e.g., invalid user input, file not found, network issues) and implement code to handle them gracefully, rather than allowing the program to crash.
Regular Testing: Test the program frequently during development, not just at the end. Test different modules and the overall system.
Security Considerations: Design the program with security in mind from the start, protecting against common vulnerabilities like SQL injection or cross-site scripting, especially for web applications.
Backup: Regularly back up the source code and other development files to prevent loss due to system failures or accidents.
Follow Coding Standards: Adhere to established coding style guides and best practices for consistency and readability. 2.
4. Steps Involved in Program Development (Program Development Life Cycle - PDLC) The process of creating a program typically follows a structured sequence of steps:
1. Problem Definition / Analysis: This initial phase involves understanding exactly what the program needs to do. It requires clear communication with the client or end-users to gather detailed requirements. * Programmers ask questions like: What is the problem to be solved? What are the inputs? What are the desired outputs? What in the real-world environment where it will be used. This may involve training users.
Maintenance: Ongoing process of keeping the program operational and up-to-date.
Corrective maintenance: Fixing bugs discovered after deployment.
Adaptive maintenance: Modifying the program to adapt to changes in the operating environment (e.g., new operating system version).
Perfective maintenance: Enhancing the program by adding new features or improving performance.
Example: Installing the attendance software on the school's computers, training administrative staff, then later updating it to include a new feature like automated SMS notifications for absentees. 2.
5. Interpreted vs. Compiled Programs Programming languages are processed by special software called translators. The two main types of translators are compilers and interpreters.
Compiler: A compiler translates an entire program (source code) written in a high-level language into machine code (object code) all at once, before the program is executed. If there are syntax errors, the compiler will report all of them at once and stop compilation until they are fixed. The compiled machine code can then be saved as an executable file (e.g., `.exe` on Windows) which can run independently of the compiler.
Advantages: Faster execution speed (once compiled), better optimization, source code is not exposed during execution.
Disadvantages: Compilation takes time, platform-dependent executables (usually).
Examples of Compiled Languages: C, C++, Java (compiles to bytecode, then interpreted by JVM), Pascal, Go.
Interpreter: An interpreter translates and executes a program's source code line by line, statement by statement. If an error is encountered on a particular line, the interpreter stops execution at that point and reports the error. The program cannot run without the interpreter present.
Advantages: Easier debugging (errors reported immediately), platform independence (if interpreter is available), quicker development cycle for small changes.
Disadvantages: Slower execution speed (translates every time it runs), source code must be available during execution.
Examples of Interpreted Languages: Python, JavaScript, PHP, Ruby, BASIC. 2.
6. Flowdiagrams on how Compiler and Interpreter work a) Compiler Workflow ``` +----------------+ +-----------+ +-----------------+ +--------------+ | Source Code |------>| Compiler |------>| Object Code |------>| Linker | | (e.g., .c, .cpp)| | | | (Machine Code) | | | +----------------+ +-----------+ +-----------------+ +--------------+ | | | v v v (Reports Syntax Errors) (Libraries) +-------------+ | Executable | | Code (.exe) | +-------------+ | v (Program Runs) ``` Source Code: The program written by the developer in a high-level language.
Compiler: Reads the entire source code and translates it into machine-understandable object code. It checks for syntax errors during this phase. If errors are found, compilation stops.
Object Code: The machine code generated by the compiler. This is not yet a complete executable program as it may need to link with other pre-compiled libraries.
Linker: Combines the object code with necessary library functions and other object files to produce a complete, standalone executable program.
Executable Code: The final program ready to run on the computer without the need for the compiler. b) Interpreter Workflow ``` +----------------+ | Source Code | | (e.g., .py, .js)| +----------------+ | v +----------------+ | Interpreter |<-----------------------------------+ | | (If error, stops here, reports) | +----------------+ | | | v | +----------------+ | | Read a line of | | | Source Code | | +----------------+ | | | v | +----------------+ | | Translate & |-----------------------------------+ | Execute Line | +----------------+ | v (Continues for next line until end of program or error) ``` Source Code: The program written by the developer in a high-level language.
Interpreter: Reads and translates the source code one line or one statement at a time.
Translate & Execute Line: Each translated line is executed immediately. If an error (syntax or runtime) is found on a specific line, the interpreter stops execution at that point and reports the error. The program then terminates. * If no error, it proceeds to the next line. This process continues until the end of the program or an error occurs. Adhere to established coding style guides and best practices for consistency and readability. 2.
4. Steps Involved in Program Development (Program Development Life Cycle - PDLC) The process of creating a program typically follows a structured sequence of steps:
1. Problem Definition / Analysis: This initial phase involves understanding exactly what the program needs to do. It requires clear communication with the client or end-users to gather detailed requirements.
Programmers ask questions like: What is the problem to be solved? What are the inputs? What are the desired outputs? What are the constraints (e.g., budget, time, hardware)?
Example: A school wants a system to manage student attendance.
The analysis would define: how attendance is recorded (manual input, biometric), what data is collected (student ID, date, time), and what reports are needed (daily attendance, absentees list).
2. Program Design: Once the problem is understood, the next step is to plan the solution logically. This involves creating an algorithm. An algorithm is a step-by-step procedure for solving a problem. It describes the sequence of operations to be performed.
Design tools used: Flowcharts: Graphical representation of an algorithm using standard symbols (e.g., rectangle for process, diamond for decision, oval for start/end).
Pseudocode: A high-level description of an algorithm using a combination of natural language and programming-like constructs, but without strict syntax.
Example (for school attendance): Algorithm: START -> Get student ID -> Check if student ID is valid -> If valid, record attendance and timestamp -> If invalid, display error -> EN
D. Flowchart: (See diagram in objective 7 for symbol representation)
Pseudocode: ``` START INPUT student_ID IF student_ID is valid THEN RECORD attendance with current timestamp DISPLAY "Attendance recorded successfully" ELSE DISPLAY "Invalid Student I
D. Please try again." END IF END ```
3. Program Coding: This phase involves translating the program design (algorithm, flowchart, pseudocode) into actual instructions using a chosen programming language (e.g., Python, C++, Java). Programmers write the "source code." It's crucial to follow good coding practices, including modularization, comments, and meaningful variable names.
Example: Writing the actual Python or Java code based on the pseudocode above to implement the attendance system.
4. Program Testing and Debugging: Testing involves running the program with various inputs (including valid, invalid, and boundary cases) to find errors (bugs). Debugging is the process of locating and correcting errors found during testing.
Types of errors: Syntax errors: Mistakes in the grammar or rules of the programming language (e.g., forgetting a semicolon). The compiler/interpreter typically catches these.
Logical errors: The program runs but produces incorrect results due to flaws in the algorithm or logic. These are harder to detect.
Runtime errors: Errors that occur during program execution (e.g., division by zero, trying to access a file that doesn't exist).
Example: Inputting a student ID that doesn't exist to see if the error message appears, inputting a valid ID to ensure attendance is recorded correctly.
5. Program Documentation: This involves creating written materials that describe the program.
Internal documentation: Comments within the source code.
External documentation: User Manual: Explains how to use the program for end-users.
Technical Manual: Details the program's design, code structure, data flow, and maintenance procedures for other developers.
System Requirements: Specifies hardware/software needed.
Example: A user manual for the school attendance system explaining how to log in, record attendance, and generate reports. A technical document explaining the database schema and code modules.
6. Program Implementation and Maintenance: Implementation: Installing and deploying the program in the real-world environment where it will be used. This may involve training users.
Maintenance: Ongoing process of keeping the program operational and up-to-date.
Corrective maintenance: Fixing bugs discovered after deployment.
Adaptive maintenance: Modifying the program to adapt to changes in the operating environment (e.g., new operating system version).
Perfective maintenance: Enhancing the program by adding new features or improving performance.
Example:* Installing the attendance software on the school's computers, training administrative staff, then later updating it to include a new feature like automated SMS notifications for This section outlines practical activities for both the teacher and students to facilitate understanding.
Teacher Activities: Introduction (5 min): Teacher begins by asking students about various software they use daily (e.g., WhatsApp, calculator app, banking app). Teacher asks how they think these applications are created, linking to the idea of a "program." Teacher introduces the topic: Programme Development.
Concept Explanation (20 min): Teacher defines "program" using clear, relatable examples. Teacher explains the characteristics of a good program, using Nigerian real-world software examples (e.g., a reliable JAMB portal, a user-friendly mobile banking app). Teacher discusses precautions to be taken when writing programs, emphasizing the importance of planning and testing.
PDLC Explanation (25 min): Teacher introduces the steps of program development sequentially. For each step, the teacher provides a detailed explanation and a practical, simplified example relevant to students (e.g., developing a simple program to calculate average scores for students, manage inventory for a small shop). Teacher demonstrates simple algorithms or flowcharts on the board or projector for a familiar problem (e.g., preparing a cup of tea, withdrawing cash from ATM).
Translator Explanation (15 min): Teacher explains the difference between compilers and interpreters, using analogies like translating a full book vs. translating sentence by sentence. Teacher lists examples of languages for each type. Teacher draws and explains the flow diagrams for compiler and interpreter workflows on the board.
Guided Practice & Discussion (10 min): Teacher poses questions related to the definitions, characteristics, steps, and translator types. Teacher encourages students to ask questions and clarifies misconceptions.
Activity Wrap-up (5 min): Teacher summarises key concepts and assigns independent practice.
Student Activities: Brainstorming & Discussion: Students share examples of software they use and discuss how they think it's created during the introduction.
Note-taking: Students actively listen and take notes on definitions, characteristics, steps, precautions, and examples.
Active Participation: Students answer teacher's questions, provide examples, and ask clarifying questions during explanations.
Problem-solving (Group/Individual): Students may be asked to suggest a simple algorithm or pseudocode for a routine task (e.g., preparing a Nigerian meal, getting ready for school). Students attempt to draw a simple flowchart for a given scenario (e.g., deciding whether to wear a raincoat based on weather).
Comparison & Contrast: Students mentally or verbally compare and contrast compiled and interpreted languages based on the teacher's explanation.
Independent Practice: Students attempt the independent practice questions.
This topic has extensive real-world relevance, particularly in the Nigerian context: Development of FinTech Solutions: Many Nigerian start-ups are developing financial technology solutions (e.g., mobile banking apps like OPay, Kuda Bank; payment gateways like Paystack, Flutterwave). All these require rigorous program development, following the PDLC steps from defining user needs for easy transactions to designing secure payment processing, coding the application, and extensive testing to prevent fraud or errors. Educational Software and E-learning Platforms: The increasing demand for online education and standardized test preparation in Nigeria (e.g., JAMB CBT practice software, e-learning platforms for universities) relies heavily on systematic program development. This involves defining educational content requirements, designing interactive user interfaces, coding the learning modules, and continually maintaining the platforms with new content and features.
Agricultural Technology (Agri-tech): Programs are being developed to help Nigerian farmers manage crops, track livestock, monitor weather patterns, and access market prices. For example, a program might be developed to help farmers calculate optimal fertilizer use (problem definition), design an algorithm for crop yield prediction (program design), code a mobile app for data entry (coding), test its accuracy with real farm data (testing), and provide user manuals for local farmers (documentation and implementation).
Government E-services: Initiatives like the National Identity Management Commission (NIMC) portal, online tax filing systems (e-Tax), and land registration systems all involve complex program development. These systems must be robust, secure, and user-friendly to serve millions of Nigerian citizens, requiring strict adherence to the PDLC.