CISB 11 CH 11
Repetition control structure (test)
(iteration control structure) -Series of statements in a loop that are repeated until a particular condition is met *Do while structure: Statements are repeated as long as a condition is true If initially false, statements will not be executed *Do until structure: Statements are repeated until a condition is true Statements are always executed one time
Fourth-generation languages (4GLs)
(very-high-level languages) -Even closer to natural languages and easier to work with than high-level languages -Declarative rather than procedural *You tell the computer what to do and it figures out how to do it -Commonly used to access databases *Structured query language (SQL) -Can result in less efficient code when compiled
Assembly language
*Uses names and other symbols to replace some of the 1s and 0s in machine language *Second generation of programming languages *Programs take longer to write and maintain
Program implementation and maintenance
-Implementation: Getting the tested program installed and up and running -Program maintenance: Updating software as needed so it continues to be useful
Compiler
-Language translator that converts an entire program into machine language before executing it -Designed for specific programming languages such as Java or Python
Machine language
-Written at a very low level, just using 1s and 0s -First generation of programming languages
Program Development Life Cycle (PDLC)
1. Problem Analysis program specifications 2. Program Design design specifications 3. Program Coding documented source code 4. Program Debugging and Testing complete program package 5. Program Implementation and Maintenance amended program package
Selection control structure (test)
Multiple paths, direction depends on the result of a certain condition *If-then-else (two possibilities) *Case control structure (more than two possibilities)
Sequence control structure (test)
Series of statements that follow one another
Variables
are named memory locations that are defined for a program -Used to store the current value of data items used in the program
logic errors (test)
errors in the logic of the program -Program will run but produces incorrect results -Dummy print statements can help locate the error
syntax errors
errors that occur when the programmer has not followed the rules of the programming language *Spell a command wrong, faulty punctuation, etc. -Error messages are typically displayed
Structured programming
goes even further, breaking the program into small modules and prohibiting GOTO
control structure (test)
illustrates when, how, and in what order the statements in a computer program, module, or method are performed
Program coding
involves writing code using a programming language -Choosing a programming language *Suitability to the application *Integration with other programs *Standards for the company *Programmer availability *Portability if being run on multiple platforms *Development speed
Program debugging and testing
is the process of ensuring a program is free of errors (bugs) and works as it is supposed to *Translating coded programs into executable code -Coded programs need to be translated from source code written by the programmer to object code the computer can execute -Converted using a language translator (a program that converts source code to object code) *Typically included in the programming application
Procedural programming
separates a program into small modules that are called by the main program or another module when needed -Allows each procedure to be performed as many times as needed; multiple copies of code not needed -Prior to procedural programming, programs were one large set of instructions (used GOTO statements)
problem analysis
the problem is considered and the program specifications are developed -Specifications developed during the SDLC are reviewed by the systems analyst and the programmer (the person who will code the program) -Goal is to understand the functions the software must perform, determine the appropriate programming language, determine how the program interacts with other programs, etc. *Documentation: Program specifications that outline what the program must do
program design
the program specifications are used to develop an algorithm (the steps the program must do) for that program -Careful planning and design of a computer program are extremely important -Good program design helps the development process as well as makes revisions easier to do in the future -The coding stage cannot occur until the program design is complete and tested