390 likes | 583 Views
Figure:. Computer Science an overview EDITION 7. J. Glenn Brookshear. C H A P T E R 5. Programming Languages. Figure 5.1: Generations of programming languages. Figure 5.2: The evolution of programming paradigms.
E N D
Figure: Computer Science an overview EDITION 7 J. Glenn Brookshear
C H A P T E R5 Programming Languages
Figure 5.3: A function that computes the average of a list of numbers constructed from the simpler functions Sum, Count, and Divide
Figure 5.4: The composition of a typical imperative program or program unit
Figure 5.5: The same variable declarations in different languages
Figure 5.6: A two-dimensional array with two rows and nine columns
Figure 5.7: Declaration of heterogeneous arrays in Pascal and C (continued)
Figure 5.7: Declaration of heterogeneous arrays in Pascal and C
Figure 5.8: Control struc-tures and their representations in C, C++, C#, and Java (continued)
Figure 5.8: Control struc-tures and their representations in C, C++, C#, and Java
Figure 5.9: The for loop structure and its representation in Pascal, C++, C#, and Java (continued)
Figure 5.9: The for loop structure and its representation in Pascal, C++, C#, and Java
Figure 5.11: The procedure Project Population written in the programming language C
Figure 5.12: Executing the procedure Demo and passing parameters by value (continued)
Figure 5.12: Executing the procedure Demo and passing parameters by value (continued)
Figure 5.12: Executing the procedure Demo and passing parameters by value
Figure 5.13: Executing the procedure Demo and passing parameters by reference (continued)
Figure 5.13: Executing the procedure Demo and passing parameters by reference (continued)
Figure 5.13: Executing the procedure Demo and passing parameters by reference
Figure 5.14: The function CylinderVolume written in the programming language C
Figure 5.17: A syntax diagram of our if-then-else pseudocode statement
Figure 5.18: Syntax diagrams describing the structure of a simple algebraic expression
Figure 5.19: The parse tree for the string x + y z based on the syntax diagrams in Figure 5.18
Figure 5.20: Two distinct parse trees for the statement if B1 then if B2 then S1 else S2 (continued)
Figure 5.20: Two distinct parse trees for the statement if B1 then if B2 then S1 else S2 (continued)
Figure 5.21: An object-oriented approach to the translation process
Figure 5.23: The structure of a class describing a laser weapon in a computer game
Figure 5.25: Our LaserClass definition using encapsulation as it would appear in a Java or C# program
Figure 5.26: Resolving the statements (P OR Q) and (R OR Q) to produce (P OR R)
Figure 5.27: Resolving the statements (P OR Q), (R OR Q), R, and P