Presentation is loading. Please wait.

Presentation is loading. Please wait.

Invitation to Computer Science 5 th Edition Chapter 9 Introduction to High-Level Language Programming.

Similar presentations


Presentation on theme: "Invitation to Computer Science 5 th Edition Chapter 9 Introduction to High-Level Language Programming."— Presentation transcript:

1 Invitation to Computer Science 5 th Edition Chapter 9 Introduction to High-Level Language Programming

2 Invitation to Computer Science, 5th Edition2 Objectives In this chapter, you will learn about: The language progression A family of languages Two examples in five-part harmony Feature analysis Meeting expectations Software engineering

3 The Language Progression Using computers to solve problems –Often involves writing programs in a high-level programming language Invitation to Computer Science, 5th Edition33

4 Where Do We Stand and What Do We Want? Disadvantages of assembly language –Programmer must “manually” manage the movement of data items –Programmer must take a microscopic view of a task, breaking it down into tiny subtasks at the level of what is going on in individual memory locations –Assembly language program is machine specific –Statements are not natural-language-like Invitation to Computer Science, 5th Edition44

5 Where Do We Stand and What Do We Want? (continued) Expectations of a program written in a high-level language –Programmer need not manage the details of the movement of data items within memory –The programmer can take a macroscopic view of tasks, thinking at a higher level of problem solving Invitation to Computer Science, 5th Edition5

6 6 Getting Back to Binary Compiler –Converts high-level language instructions into machine language instructions Linker –Inserts requested object code from code libraries into the object code for the requesting program

7 Invitation to Computer Science, 5th Edition7 Figure 9.1 Transitions of a High-Level Language Program

8 Invitation to Computer Science, 5th Edition8 A Family of Languages Procedural languages –Program consists of sequences of statements that manipulate data items –Follow directly from the Von Neumann computer architecture –Random access memory stores and fetches values to and from memory cells

9 Invitation to Computer Science, 5th Edition9 Two Examples in Five-Part Harmony Favorite number –Figure 9.2 shows pseudocode algorithm –Algorithm implemented in Ada (Figure 9.3), C++ (Figure 9.4), C# (Figure 9.5), Java (Figure 9.6), and Python (Figure 9.7)

10 Invitation to Computer Science, 5th Edition10 Figure 9.2 Pseudocode Algorithm for Favorite Number

11 Invitation to Computer Science, 5th Edition11 Figure 9.3 Ada Program for Favorite Number

12 Invitation to Computer Science, 5th Edition12 Figure 9.4 C++ Program for Favorite Number

13 Invitation to Computer Science, 5th Edition13 Figure 9.5 C# Program for Favorite Number

14 Invitation to Computer Science, 5th Edition14 Figure 9.6 Java Program for Favorite Number

15 Invitation to Computer Science, 5th Edition15 Figure 9.6 Java Program for Favorite Number (continued)

16 Invitation to Computer Science, 5th Edition16 Figure 9.7 Python Program for Favorite Number

17 Invitation to Computer Science, 5th Edition17 Data Cleanup (Again) In this problem: –Input is a set of integer data values that may contain 0s, and 0s are considered to be invalid data –Output is to be a clean data set where the 0s have been eliminated

18 Invitation to Computer Science, 5th Edition18 Figure 9.8 The Converging-Pointers Algorithm for Data Cleanup

19 Invitation to Computer Science, 5th Edition19 Figure 9.9 Ada Converging- Pointers Algorithm

20 Invitation to Computer Science, 5th Edition20 Figure 9.9 Ada Converging- Pointers Algorithm (continued)

21 Invitation to Computer Science, 5th Edition21 Figure 9.10 C++ Converging- Pointers Algorithm

22 Invitation to Computer Science, 5th Edition22 Figure 9.10 C++ Converging-Pointers Algorithm (continued)

23 Invitation to Computer Science, 5th Edition23 Figure 9.11 C# Converging-Pointers Algorithm

24 Invitation to Computer Science, 5th Edition24 Figure 9.11 C# Converging- Pointers Algorithm (continued)

25 Invitation to Computer Science, 5th Edition25 Feature Analysis If you have studied one (or more) of the online chapters for Ada, C++, C#, Java, or Python: –Compare them with the features of the other languages by scanning Figure 9.15

26 Invitation to Computer Science, 5th Edition26 Figure 9.15 Feature Analysis of Five High-Level Languages

27 Invitation to Computer Science, 5th Edition27 Figure 9.15 Feature Analysis of Five High- Level Languages (continued)

28 Invitation to Computer Science, 5th Edition28 Figure 9.15 Feature Analysis of Five High-Level Languages (continued)

29 Invitation to Computer Science, 5th Edition29 Figure 9.15 Feature Analysis of Five High- Level Languages (continued)

30 Invitation to Computer Science, 5th Edition30 Figure 9.15 Feature Analysis of Five High- Level Languages (continued)

31 Invitation to Computer Science, 5th Edition31 Figure 9.15 Feature Analysis of Five High- Level Languages (continued)

32 Invitation to Computer Science, 5th Edition32 Meeting Expectations Expectations for programs written in a high-level programming language –Programmer need not manage details of the movement of data items within memory or pay any attention to exactly where those items are stored –Programmer can take a macroscopic view of tasks, thinking at a higher level of problem solving

33 Invitation to Computer Science, 5th Edition33 Meeting Expectations (continued) Expectations for programs written in a high-level programming language (continued) –Programs written in a high-level language will be portable rather than machine specific –Programming statements in a high-level language will be closer to natural language and will use standard mathematical notation

34 Invitation to Computer Science, 5th Edition34 The Big Picture: Software Engineering Software development life cycle –Overall sequence of steps needed to complete a large-scale software project Studies have shown that on big projects: –Initial implementation of the program may occupy only 10–20% of the total time –25–40% of time is spent on problem specification and program design –40–65% is spent on tasks that follow implementation

35 Invitation to Computer Science, 5th Edition35 Figure 9.16 Steps in the Software Development Life Cycle

36 Invitation to Computer Science, 5th Edition36 Scaling Up Figure 9.17 categorizes software products in terms of : –Size –Number of programmers needed for development –Duration of the development effort Software engineering –Large-scale software development

37 Invitation to Computer Science, 5th Edition37 Figure 9.17 Size Categories of Software Products

38 Invitation to Computer Science, 5th Edition38 The Software Development Life Cycle The feasibility study Problem specification Program design Algorithm selection or development, and analysis Coding

39 Invitation to Computer Science, 5th Edition39 The Software Development Life Cycle (continued) Debugging Testing, verification, and benchmarking Documentation Maintenance

40 Invitation to Computer Science, 5th Edition40 Modern Environments Integrated Development Environment –Lets programmer perform a number of tasks within the shell of a single application program Rapid prototyping –Allows miscommunications between the user and the programmer to be identified and corrected early in the development process

41 Invitation to Computer Science, 5th Edition41 Summary In a high-level language, the programmer: –Need not manage storage –Can think about the problem at a higher level –Can use more powerful program instructions that are more like natural language –Can write a much more portable program

42 Invitation to Computer Science, 5th Edition42 Summary (continued) Software development life cycle –Overall sequence of steps needed to complete a large-scale software project


Download ppt "Invitation to Computer Science 5 th Edition Chapter 9 Introduction to High-Level Language Programming."

Similar presentations


Ads by Google