🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

Program Logic Formulation Hello! I’m Prof. JOYCE LYN MATEO-ABAOAG, your mentor in ITE4 Programming 1. We will be together for the whole semester as you start your journey in programming. Data vs Information Data Processing Data processing is t...

Program Logic Formulation Hello! I’m Prof. JOYCE LYN MATEO-ABAOAG, your mentor in ITE4 Programming 1. We will be together for the whole semester as you start your journey in programming. Data vs Information Data Processing Data processing is the manipulation or transformation of raw data to produce an output which is useful to end-users. Data Processing Cycle FEEDBACK INPUT PROCESS OUTPUT STORAGE Data Processing Cycle Processing of data involves the execution of different operations like recording,communicating,classifying, comparing, calculating, summarizing sorting, storing, retrieving, duplicating, verifying and merging Data Processing Cycle At the input stage: INPUT Recording is data capturing or encoding to make raw data available for processing. Verifying is validating or checking the input data for correct format or code to eliminate errors. Data Processing Cycle In the process stage: PROCESS Calculating - the application of the mathematical operations Classifying - categorizing or grouping into some parts depending on some criteria, Comparing - evaluating in relation to some known measures Summarizing - condensing textual information or accumulating numerical values Data Processing Cycle Storing - saving, filing, or holding data/program for continuing or later use Retrieving - the opposite of saving, is recalling or recovering what is previously stored. Merging - combining two or more organized data file to form a new update data file. Duplicating - reproducing data into many forms of documents. Data Processing Cycle At the output stage : OUTPUT Communicating means decoding or deriving resultant information for the end-user. The feedback means comparison of output and the goal set in advance for any discrepancy so that re-tooling, re-engineering or re- designing may be done to introduce correction or adjustments until the desired output is achieved. The Notion of Computer Program A Computer Program is a list of coded instructions designed to direct a computer in processing data into information. Computer program development is a problem-solving process. Primarily is mental, involving analysis of problem and development of computer- based solutions. Programming Programming - process of writing a computer program Program - list of computer instructions required to arrive at the desired results. Algorithm - step-by-step list of instructions for solving a problem. Programming Language A programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. Each programming language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions. Programming Language A formalize notation that allows algorithms to be presented in a rigorous and precise way. Types: machine language, assembly language, high-level language, very high- level language (or 4GL Seven Basic Elements of Programming 1. Data: constants, variables 2. Input: reading of values from input devices 3. Output: writing of information to any output device 4. Operations: comparing values, assigning values, combining values Seven Basic Elements of Programming 5. Conditions / Selections: If-Then-Else, Case, Switches 6. Loops / Iterations: While-Do, Repeat- Until, For-Do 7. Subroutines / Modules: functions, procedures Problems that can be solved on computers: 1. Computational -Problems involving some kind of mathematical processing 2. Logical - Involve relational or logical processing 3. Repetitive - Involve repeating a set of mathematical and/or logical instructions Programming Algorithm may be expressed through: Pseudocode A textual representation of an algorithm; close to natural language; becomes part of the program documentation Flowchart A system of symbols for expressing algorithms; indicates flow of control/sequence of operations. Pseudolanguage Instructions Format: OPERATION where: OPERATION – pseudocode operation or instruction operand/s – object/s of a pseudocode operation or instruction Pseudolanguage Instructions OPEN – Allows the program that contains the statement to have access to the records of the designated file. READ – Used to copy the contents of a record from an external magnetic medium into an input memory area. Pseudocode Example BEGIN MAIN-ROUTINE OPEN INPUT ADDRESS-FILE OUTPUT MAIL- LABELS-FILE READ ADDRESS-FILE PERFORM UNTIL EOF=“T” PERFORM PRINT-ADDRESS END PERFORM READ ADDRESS-FILE END PERFORM CLOSE ADDRESS-FILE OUTPUT MAIL-LABELS-FILE END MAIN- ROUTINE

Use Quizgecko on...
Browser
Browser