8.1 Introduction
We have now reached the halfway point in our discussion of software. As such, this is a good place to review where we have been and to summarize where we are going.
Chapter 5 focused on the problem solving process in general and introduced the concept of an algorithm. Chapter 6 presented a simple programming language for drawing graphical images. That language, the Watson Graphics Language (WGL), was used to introduce many of the basic features of imperative programming languages. These features include data types, constants, variables, assignment statements, and output statements; as well as the control constructs “sequence” and “repetition”. The lab that accompanied Chapter 6 gave you an opportunity to explore the behavior of several existing WGL programs, and to begin writing programs yourself. Chapter 7 focused on data structures and addressed the question of how data can be organized to facilitate the problem solving process.
In this chapter and the next we will examine the programming process in more detail.
Over the past forty years or so, three general classes, or paradigms, of programming languages have emerged. These paradigms include the imperative paradigm, the functional paradigm, and the logical paradigm. In addition, during the past decade or so these paradigms have been extended to include object-oriented features. A language is classified as belonging to a particular paradigm based on the programming features it supports.
Object-oriented, imperative languages are, by far, the most popular type of programming languages. Both Java and C++ are object-oriented, imperative languages. The Watson Graphics Language, WGL, is also an imperative language, though it is not object-oriented.
This chapter continues the exploration of the imperative paradigm by discussing Watson JavaScript. Watson JavaScript is an extended subset of JavaScript, a widely used imperative programming language incorporated into many web pages. Using Watson JavaScript, we will examine programming structures common to most imperative programming languages. A relatively large number of small programs will be presented in order to illustrate how these program structures can be used to solve problems.
The chapter following this one, Chapter 9, discusses the functional and logical programming paradigms. Functional programming is illustrated with the language Lisp. Logic programming is introduced with Prolog. Both of these languages are frequently used in the study of A. I., or artificial intelligence.
The last chapter in this part of the book is Chapter 10: Building Large Software Systems. Chapter 10 begins with a discussion of object-oriented programming. Object-oriented features influence the ways in which the parts of a program are organized and how they communicate with one another. Object-oriented languages are extremely useful for writing complex programs that support mouse-based, graphical user interfaces. Chapter 10 also includes an introduction to the field of software engineering, which focuses on the unique challenges that must be faced when constructing large programs, such as those that require many thousands of worker-hours to complete.