Structured English From userspeak to programming Plain English

  • Slides: 8
Download presentation
Structured English

Structured English

From user-speak to programming Plain English User Structured English Pseudocode Analyst Programs Programmer

From user-speak to programming Plain English User Structured English Pseudocode Analyst Programs Programmer

Modeling Logic with Structured English n n Modified form of English used to specify

Modeling Logic with Structured English n n Modified form of English used to specify the logic of information processes Uses a subset of English Action verbs n Noun phrases n No adjectives or adverbs n It should read like English n n No specific standards exist

Structured English Keep the language tight and precise, but clear enough to be readable

Structured English Keep the language tight and precise, but clear enough to be readable by the user Blocks indicate general steps; indent for structure Sequence is important Identify areas of decisionmaking (conditions) and repetition See Figure 9 -3 on the right

Writing Structured English n File Names n n n Common verbs n n READ,

Writing Structured English n File Names n n n Common verbs n n READ, ACCEPT, GET, WRITE, PRINT, SORT, MOVE, MERGE, ADD, SUBTRACT, MULTIPLY, DIVIDE Common nouns: n n Separate words with hyphens Use Title Case, e. g. Invoice-Record Variable names, attributes, data flow inputs and outputs Focus on how the process converts the inputs to outputs

Writing Structured English Conditions Repetition n n DO statements … UNTIL end-condition n BEGIN

Writing Structured English Conditions Repetition n n DO statements … UNTIL end-condition n BEGIN IF IF … THEN … n statements … ELSE END IF or or n n DO WHILE statements … END DO n SELECT CASE 1 (conditions) n n CASE 2 … n n statements … END SELECT

P&E 9. 1 n Represent the logic in this table as Structured English

P&E 9. 1 n Represent the logic in this table as Structured English

P&E 9. 2 n n See Figure 8 -16, process 5. 0. Write Structured

P&E 9. 2 n n See Figure 8 -16, process 5. 0. Write Structured English for this process. See text on page 256 for more information.