While typing a paper into your favorite word processor, or perhaps while playing the hottest new computer game, you might have at some point wondered: how do people create these great programs? The answer, of course, is with programming languages. Programming languages provide a way to express computer algorithms in a form that is both human-palatable yet easily translated into a computer's machine language.
In class, we have studied machine language and discussed the use of assembly language as a slightly more human-friendly alternative to machine language. Even assembly language is a far cry from the pseudocode that we used to write algorithms -- assembly language is cumbersome to write and hard to understand. In addition, assembly language programs are not readily portable, which means that they cannot be easily converted to a working program on a different kind of computer. (We'll talk more about portability later on).
To solve these two problems (comprehensibility and portability), high-level programming languages have been developed. Such languages contain a syntax closer to that of spoken language, and they can be easily translated into a working program on any computer, provided that a translator program exists for that computer. Some examples of high-level languages are Pascal, FORTRAN, C, C++, and Java.
In this lab (and the next two) you will explore the use of a particular programming language, Java, to express algorithms. Java is a modern, object-oriented, high-level programming language that was designed particularly to be used with the Web. We do not expect you to become full-fledged Java programmers. Much of each Java program has been written for you, and you don't need to know how many of the parts work (there are comments saying what they do). However, you will need to write enough Java to express an algorithm or implement a set of actions related to a user interface. This will give you an understanding of what these programs really look like and what is involved in programming, i.e. what is involved in taking an algorithm and turning it into a precise program implementing that algorithm.
For further information on Java, follow this link.
Page 1: Introduction (this page)
Page 2: Object-Oriented Programming
Page 3: Java Programming
Page 4: Graphical User Interfaces
Page 5: Editing, Compiling and Running Java Applets
Page 6: Writing your own Java Applet
Page 7: Finishing up and Shutting down