PSEUDOCODE Conditional step has the general form if p then a else The expression P must be evaluated to either true or false P is the logical expression a boolean expression or a predicate The letters a and b denotes steps or sequences of steps P is evaluated if the result is true. a is executed. Otherwise B is executed. In all cases exactly one of a or b is executed The conditional step is a one-entry, one exit structure in order to maintain the structured programming concept PROGRAM MINGMETHDOLODGY AND SOFTWAREENGINEERING 港城市大 Copyrighto1998 Angus Wu ol Hone Kone
PROGRAMMING METHDOLODGY AND SOFTWARE ENGINEERING Copyright©1998 Angus Wu PSEUDOCODE Conditional step has the general form if P then A else B The expression P must be evaluated to either true or false: P is the logical expression, a Boolean expression, or a predicate. The letters A and B denotes steps or sequences of steps. P is evaluated; if the result is true, A is executed. Otherwise, B is executed. In all cases, exactly one of A or B is executed. The conditional step is a one-entry, one exit structure in order to maintain the structured programming concept
PSEUDOCODE Loop step has the general form while p do A The layout is important that a has to be indented with respect to while P is the predicate and a is a step or sequence of steps The while loop is a one-entry, one-exit control structure. If the predicate P is false when the loop is entered the body, A, is not executed at all. The loop will be terminated only when the predicate P is false PROGRAMMINGMETHDOLODGY AND SOFTWAREENGINEERING 港城市大 Copyrighto1998 Angus Wu
PROGRAMMING METHDOLODGY AND SOFTWARE ENGINEERING Copyright©1998 Angus Wu PSEUDOCODE Loop Step has the general form while P do A The layout is important that A has to be indented with respect to while. P is the predicate and A is a step or sequence of steps. The while loop is a one-entry, one-exit control structure. If the predicate P is false when the loop is entered the body, A, is not executed at all. The loop will be terminated only when the predicate P is false
PSEUDOCODE Sequence of steps has the general form gin SI S2: S3 end It starts with a begin and terminated by end. There must be a semicolon, between each pair of steps and there may be a semicolon after the last step of the sequence PROGRAM MINGMETHDOLODGY AND SOFTWAREENGINEERING 港城市大 Copyrighto1998 Angus Wu
PROGRAMMING METHDOLODGY AND SOFTWARE ENGINEERING Copyright©1998 Angus Wu PSEUDOCODE Sequence of Steps has the general form begin S1; S2; S3 end It starts with a begin and terminated by end. There must be a semicolon, “;”, between each pair of steps and there may be a semicolon after the last step of the sequence
PROGRAM DESIGN LANGUAGE (PDL Program Design Language is a developed by Caine, Farber and Gordon in 1975 with the motivation to provide a form of language to implement software design in the same way programming languages implement an algorithm 港城市大 PROGRAMMING METHDOLOGY AND SOFTWAREENGINEERING Copyrighto1998 Angus Wu ol Hone Kone
PROGRAMMING METHDOLOGY AND SOFTWARE ENGINEERING Copyright©1998 Angus Wu PROGRAM DESIGN LANGUAGE (PDL) Program Design Language is a developed by Caine, Farber and Gordon in 1975 with the motivation to provide a form of language to implement software design in the same way programming languages implement an algorithm
PROGRAM DESIGN LANGUAGE a program design language is a programming language that enforces procedural design with structured programming methodology Characteristics of a procedural design language are Use a limited set of logical constructs Sequence Conditional -if then else. select case Loop-do while, repeat until It leads to more readable, testable code, and supported by most modern programming languages 港城市大 PROGRAMMING METHDOLOGY AND SOFTWAREENGINEERING Copyrighto1998 Angus Wu ol Hone Kone
PROGRAMMING METHDOLOGY AND SOFTWARE ENGINEERING Copyright©1998 Angus Wu PROGRAM DESIGN LANGUAGE A program design language is a programming language that enforces procedural design with structured programming methodology. Characteristics of a procedural design language are: Use a limited set of logical constructs: •Sequence •Conditional - if then else, select case •Loop - do while, repeat until It leads to more readable, testable code, and supported by most modern programming languages