knowt logo

Basics Computer Programming

  • Programming: A process of designing or creating a program.

  • Programmer: A person who writes the program (e.g., Aldred Custodio).

  • Program: A set of step-by-step instructions that directs a computer to perform a specific task and produce required results.

  • Programming Language: A system of notation for writing computer programs.

    • Writing games.

    • Writing application programs.

Types of Programming Languages

  1. Low-Level Language (LLL):

    • Machine dependent.

    • Machine Language: Only understood by machines, written in binary (1’s and 0’s).

      • First generation of programming language.

      • Only language that the computer directly recognizes.

      • Disadvantages: Extremely cryptic instructions, lengthy programs, machine-dependent, not portable.

    • Assembly Language:

      • Allows programmers to communicate with the machine.

      • Second generation of programming language.

      • Uses symbols for codes (e.g., A = Addition, C = Compare).

      • Disadvantages: Difficult to learn, must use an assembler to convert, lengthy programs, machine-dependent, not portable.

  2. High-Level Language (HLL):

    • English-like, easier to understand.

    • Must be converted to machine language before execution.

    • Portable.

Programming Language Paradigms

  • Structured: FORTRAN, COBOL, BASIC, C, Pascal, Ada.

  • Object-Oriented: Smalltalk, C++, Visual Basic, Java, C#, F#.

  • Functional: LISP, Scheme.

  • Declarative: Prolog.

Programming Life Cycle

  1. Problem Analysis

  2. Problem Design

  3. Problem Coding

  4. Testing and Debugging

  5. Maintenance

Translators

  • Translator Program: Translates source program to object program.

  • Source Program: Program written in HLL.

  • Object Program: Source Program translated into machine language.

  • Types of Translators:

    • Assembler: Translates assembly to machine language.

    • Interpreter: Translates HLL to machine language.

    • Compiler: Translates source to object (machine language).

Problem Solving in Programming

  1. Analyze the problem.

  2. Outline the problem requirements.

  3. Specify the solution (what will it do).

  4. Design the steps.

  5. Verify or test.

Input Process Output (IPO) Analysis

  • Output: Display the results.

  • Input: Read the data.

  • Process: Perform the computation.

FJ

Basics Computer Programming

  • Programming: A process of designing or creating a program.

  • Programmer: A person who writes the program (e.g., Aldred Custodio).

  • Program: A set of step-by-step instructions that directs a computer to perform a specific task and produce required results.

  • Programming Language: A system of notation for writing computer programs.

    • Writing games.

    • Writing application programs.

Types of Programming Languages

  1. Low-Level Language (LLL):

    • Machine dependent.

    • Machine Language: Only understood by machines, written in binary (1’s and 0’s).

      • First generation of programming language.

      • Only language that the computer directly recognizes.

      • Disadvantages: Extremely cryptic instructions, lengthy programs, machine-dependent, not portable.

    • Assembly Language:

      • Allows programmers to communicate with the machine.

      • Second generation of programming language.

      • Uses symbols for codes (e.g., A = Addition, C = Compare).

      • Disadvantages: Difficult to learn, must use an assembler to convert, lengthy programs, machine-dependent, not portable.

  2. High-Level Language (HLL):

    • English-like, easier to understand.

    • Must be converted to machine language before execution.

    • Portable.

Programming Language Paradigms

  • Structured: FORTRAN, COBOL, BASIC, C, Pascal, Ada.

  • Object-Oriented: Smalltalk, C++, Visual Basic, Java, C#, F#.

  • Functional: LISP, Scheme.

  • Declarative: Prolog.

Programming Life Cycle

  1. Problem Analysis

  2. Problem Design

  3. Problem Coding

  4. Testing and Debugging

  5. Maintenance

Translators

  • Translator Program: Translates source program to object program.

  • Source Program: Program written in HLL.

  • Object Program: Source Program translated into machine language.

  • Types of Translators:

    • Assembler: Translates assembly to machine language.

    • Interpreter: Translates HLL to machine language.

    • Compiler: Translates source to object (machine language).

Problem Solving in Programming

  1. Analyze the problem.

  2. Outline the problem requirements.

  3. Specify the solution (what will it do).

  4. Design the steps.

  5. Verify or test.

Input Process Output (IPO) Analysis

  • Output: Display the results.

  • Input: Read the data.

  • Process: Perform the computation.

robot