program-logic-formulation

Cards (24)

  • PROGRAMMING CONCEPTS:
    • Logic
    • Programming
    • Programmer
    • Programming Language
    • Logic The systematic study of reasoning that provides standards by which valid reading can berecognized
    • Programming Computer process data under the control set of instruction.
    • Programmer - Computer program guide the computer through orderly sets of actions by people.
    • Programming Language - A set of rules that provides a way of telling a computer what operation toperform.
  • FIVE (5) BASIC PROGRAMMING ELEMENTS
    1. Input
    2. Output
    3. Arithmetic
    4. Conditional
    5. Looping
    1. Input – getting data and commands into the computer
    1. Output – getting your results out of the computer
    1. Arithmetic – performing mathematical calculations on your data
  • Conditional – testing to see if a condition is true or false
  • Looping – cycling through a set of instructions until some condition is met
  • PROGRAMMING CYCLE
    • The computer is basically a problem-solving tool. Once it is properly provided with a valid program, the computer becomes self-operational, that is, it requires no human intervention during processing.
  • PSEUDOCODE - A very high level quite informal description of a program that typically contains the essential elements. Logic of the program but does not include all the details that will be required for the actual code.
  • PSEUDOCODE
  • ALGORITHM - A finite set of instructions which when followed accomplish a particular task. Is also defined as step by step instructions.
  • Algorithm can be defined as: “A sequence of activities to be processed for getting desired output from a given input.”
  • ALGORITHM
    • TYPE OF ALGORITHMS: Sequence Branching (Selection) Loop (Repetition)
  • The sequence is exemplified by sequence of statements place one after the other – the one above or before another gets executed first. In flowcharts, sequence of statements is usually contained in the rectangularprocess box.
  • The branch refers to a binary decision based on some condition. If the condition is true, one of the two branches is explored; if the condition is false, the otheralternative is taken. This is usually represented by the ‘if-then’ constructin pseudo-codes and programs. In flowcharts, this is represented by the
    diamond-shaped decision box. This structure is also known as the selection structure.
  • The loop allows a statement or a sequence of statements to be repeatedly executed based on some loop condition. It is represented by the ‘while’ and ‘for’ constructs in most programming languages, for unbounded loops and bounded loops respectively. This is also known as the repetition structure.
  • SEQUENTIAL
  • CONDITIONAL (DECISION)
  • LOOP(ITERATION)