Introduction to Programming and Program Development Life Cycle

Fundamentals of Computer Programming and Software Engineering

  • Computer Programmers and Software Engineers:

    • Computer programmers are also officially recognized as software engineers.
    • A computer programmer is defined as an individual who creates computer programs or software.
    • Core responsibilities of computer programmers include creating, designing, and testing logical structures designed to solve computer-related problems.
    • Programmers work with various computer programming languages, including C, C++, Java, and PHP.
    • Mastering program creation requires a thorough understanding of programming languages and the precise ways computers process data and follow instructions.
  • Definition of Computer Program:

    • A computer program is a set of comprehensive instructions made up of code that devices or computers execute or follow.

Evolution and Elements of Programming Languages

  • Definition and Role of Programming Languages:

    • Learning to program is a prerequisite for becoming an expert in designing or creating mobile applications, websites, video games, or general software.
    • A programming language defines a structured set of instructions used to generate various types of output.
    • It functions as an artificial language designed specifically to write instructions or programs.
    • Once written, the program is translated into machine language and subsequently executed by a machine or computer.
  • Evolution of Programming Languages:

    • Programming languages have evolved progressively through distinct stages and paradigms:
    • Hex (Machine code level representation)
    • Assembler (Assembly language)
    • C
    • Fortran
    • C++
    • Java
    • Ruby

The Evolution Of Computer Programming Languages

  • Core Elements of Programming Languages:
    • Every programming language consists of two fundamental elements:
    • Syntax (Form):
      • The set of precise rules that define the valid combinations of symbols needed to construct a correctly structured program in a given language.
      • Example of incorrect syntax: =7>8= 7 > 8
    • Semantics (Meaning):
      • The description of the actual logic and behavior that a computer executes when running a program written in that language.

Syntax and Semantics

Categories of Programming Languages

  • Object-Oriented Programming (OOP):

    • Regarded as the most modern class of programming language.
    • Representative languages include C++ and Java.
    • Key methodology:
    • Instructions are structured around specific objects that need to be manipulated.
    • Programmers must identify these objects and define the precise relationships existing between them.
  • Structured Programming Languages:

    • A class of programming language that utilizes a top-down design model resembling a hierarchical structure.
    • Representative languages include C, Turbo Pascal, and Ada.
    • Key methodology:
    • The overall architecture of the program is mapped out and divided into distinct subsections.
    • Initial overviews contain minimal specific details regarding individual components.
    • Specific details are filled in progressively by defining logical iterations within instructions or branches of the hierarchy.
  • Procedural Programming Languages:

    • A class of programming language that employs a top-down approach by solving problems starting from the top line of code and moving sequentially down to the bottom.
    • Representative languages include BASIC, C, Fortran, and Pascal.
    • Key methodology:
    • Operates through a starting phase, sequential lists of instructions, and an ending phase.
    • Relies heavily on grouped units of code called blocks, as well as scopes (the binding of names to entities).
    • Utilizes concise code sections designated as procedures, subroutines, or methods.
    • Employs modules to enable reusability of code segments without copying code repeatedly.

Program Development Life Cycle (PDLC)

  • Overview of PDLC:

    • The Program Development Life Cycle is a standardized series of stages or steps followed when creating a computer program.
    • The cycle remains uniform and constant regardless of which programming language is used.
    • Serves as an essential guiding framework for developers, providing structure similar to managing school deadlines across multiple assignments.
  • Phases of the PDLC:

    • The PDLC consists of six sequential phases:
    1. Problem Definition
    2. Program Design
    3. Coding
    4. Debugging and Testing
    5. Documentation
    6. Maintenance

Program Development Life Cycle Diagram

Stages of Program Development

  • Stage 1: Problem Definition:

    • Focuses on identifying and defining the precise problem to solve.
    • Involves outlining the required solution by specifying input, output, and processing requirements, along with determining the expected appearance of the final output.
    • Concludes only when all clarifying questions from the programmer have been resolved and requirements are thoroughly understood.
  • Stage 2: Program Design:

    • Focuses on constructing the workflow and algorithm logic rather than writing actual code.
    • Solutions are formulated in step-by-step order, typically rendered through flowcharts and structured statements.
    • Serves as the blueprint for the subsequent program code flow.
    • Core Program Design Techniques:
    • Modular Programming: Long programs are divided into smaller, self-contained modules that can be designed, written, and debugged independently with minimal interaction.
    • Top-Down Design: The overall task is broken down into generalized sub-tasks, which are then sequentially subdivided until specified at a level executable by a computer.
    • Structured Programming: Code is written following restricted, specifically defined logic forms; these forms can be nested to manage complex logical scenarios.
  • Stage 3: Coding:

    • The phase where the program design is translated into concrete computer programming code.
    • Actual program construction takes place using languages such as C, C++, and Java.
  • Stage 4: Debugging and Testing:

    • Bug Definition: A mistake, defect, or error present in software code.
    • Debugging Definition: The systematic process of finding and removing errors from software code.
    • Code execution is systematically evaluated to verify if it works according to design. If the output fails or fails to address the defined problem, code errors must be identified and corrected.
    • Distinction between Verification and Validation:
    • Verification: Confirms that the program functions as intended by the programmer.
    • Validation: Assures that the program arrives at correct outputs and resolutions across various test data inputs.
    • Key Goals of a Test Program:
    1. Demonstrating complete comprehension of program specifications through a detailed test plan.
    2. Utilizing the test plan during execution to prove total program correctness.
  • Stage 5: Documentation:

    • The process of recording written instructions explaining how the program was designed, including technical issues encountered and their resolution solutions.
    • Executed simultaneously with program design, testing, and debugging.
    • Documentation Techniques:
    • Flowcharts
    • In-code comments
    • Memory maps
    • Parameter definitions
    • Data lists
    • Program library forms
    • Primary Advantages:
    • Enables future programmers to understand, maintain, and expand the software application.
    • Facilitates seamless code reusability across projects.
    • Significantly reduces maintenance requirements over the software's lifespan.
  • Stage 6: Maintenance:

    • The ongoing process of modifying and updating software to accommodate changing conditions in experience or operating environments.
    • Triggers for maintenance include fixing newly discovered bugs, handling specification changes or expansions, and adjusting for hardware changes.
    • Redesigning software during maintenance requires repeating previous steps of the Program Development Life Cycle.

Educational Portal Activity Reference

  • Peniel School Portal Resource File:
    • File Name: WSCOMPUTER9.U1Lesson 1_PROGRAM DEVELOPMENT