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

Full Transcript

14 Programming Definitions Definitions Eng. Omar El Safty General Programming Terms 1. Program Definition: A list of instructions that does a specific task It can be written in high-level language or low-l...

14 Programming Definitions Definitions Eng. Omar El Safty General Programming Terms 1. Program Definition: A list of instructions that does a specific task It can be written in high-level language or low-level language 2. Pseudocode Definition: Method that uses English words and mathematical notations to design the steps of a program. 3. Flowcharts Definition: Diagram that designs the steps of a program by using a standard set of symbols joined by lines to show the direction of flow. 4. Trace Table Definition: Table that can be used to record the results from each step in an algorithm It is used to record the value of a variable each time it changes Used to document the dry run of program 5. Tracing (Dry Run) The manual exercise of working through an algorithm step by step 6. Variable Definition: A named data store that contains a value that can change during the execution of a program. 7. Constant Definition: A named data store that contains a value that does not change during the execution of a program. 110 Definitions Eng. Omar El Safty 8. Comments Definition: Blocks of text in the pseudocode that are not executed used to explain the code. 9. Features of a maintainable program Use comments … … to explain the purpose of each section of code Use meaningful identifier names to … … clearly identify the purpose of variables, constants, arrays, procedures and functions Use procedures and functions … … to avoid repeated code … and to simplify logic Use indentation and white space … … to make the program readable 10. Component parts after decomposition inputs – the data that needs to be entered to the system processes – the tasks that need to be performed using the input data and any previously stored data outputs – information that needs to be displayed or printed for the users storage – data that needs to be stored in files for use in the future 11. Top-Down design Definition: The breaking down of a computer system into set of sub systems and then breaking each subsystem into set of smaller ones until each sub system performs a single action. Stepwise refinement definition: Process of breaking down into smaller sub-systems Module definition: An individual section of code that can be used by other programs 111 Definitions Eng. Omar El Safty 12. Structure Chart // Structure Diagram Definition: Diagram that shows the design of a computer system in a hierarchal way, with each level giving a more detailed breakdown of the system. Purpose: To provide an overview of the system hierarchy To provide overview of how a problem is broken down 13. Ways to represent an algorithm Flowcharts Pseudocode Structure Diagrams 14. Basic concepts (constructs) to use when developing a program: Data use – variables, constants and arrays Sequence – order of steps in a task Selection – choosing a path through a program Iteration – repetition of a sequence of steps in a program Operator use – arithemtic operations for calculation and logical and boolean operators for decisions Program Development Lifecycle 15. Stages of Program Develeopment Lifecycle Analysis Identification of the problem and requirements May include breaking down the problem into smaller parts Includes abstractions (removal of details) Design Drawing flowcharts to solve the problem Writing pseudocode statement to solve the problem Decomposing the problem into smaller parts using structure diagrams Coding Writing program code solutions (using a programming language) May include early testing Testing Testing the program code using test data 112 Definitions Eng. Omar El Safty Tasks performed in analysis: abstraction decomposition identification of the problem and requirements (requirement specification) Abstraction Definition: simplifying the problem selecting elements required filtering out irrelevant characteristics from those elements Decomposition Definition: breaking down a complex problem into smaller parts which can then be divided into even smaller parts that can be solved easily Tasks performed in design: decomposition structure diagrams flowcharts pseudocode Tasks performed in coding: writing program code iterative testing Iterative Testing Definition: tests are conducted to each sub-system of the program errors are corrected tests are repeated until the sub-system performs as required Tasks performed in testing: testing program code… … using test data Testing Definition: The completed program or set of programs is run many times… …with different sets of test data …to ensure all the completed tasks work together as specified in the program design 113 Definitions Eng. Omar El Safty 16. Operators Operators definition and purpose: A special character or word in programming that identifies an action to be performed Arithmetic Operators Definition and purpose: Operators that are used to perform calculations. Logical Operators Definition and purpose: Operators that allow the computer to decide whether an expression is true or false Boolean Operators Definition and purpose: Operators that are used that is used with logical operators to form a more complex expression. 17. Program data types: Data type Definition Examples A positive or negative whole number be used 150 Integer in mathematical operations -100 A positive or negative number that has a 100.5 Real fractional part that can be used in -15.2 mathematical operations Char A single character from the keyboard H Hello World String A sequence of characters A312_@odq Boolean Data with two possible values TRUE/FALSE 18. Sequential statements Definition: Statements are executed one after another according to their order. 19. Assignment Statement A statement that changes the value of a variable or an element in an array Example: Value =5 or

Use Quizgecko on...
Browser
Browser