Section 4.1. Introduction


[Page 150]

4.1. Introduction

One of the most important parts of learning a programming language is learning how to program an application to accept input and produce output (I/O). Computers wouldn't be very useful if we could not give them data to manipulate and compute, and if we were not able to read or understand the results they produce. In general, a computer program's input and output capabilities are known collectively as its user interface.

An input operation is any action that transfers data from the user to the computer's main memory via one of the computer's input devices. An output operation is any action that transfers data from the computer's main memory to one of the computer's output devices.

In this chapter, we will introduce three simple user interfaces: a command-line interface and two graphical user interfaces (GUIs). These interfaces can be used interchangeably with the material in most of the subsequent chapters. Indeed, one of the most important design principles emphasized in this chapter is that the user interface should be designed to function independently of the computational task. In other words, it should be possible to take an application, such as a computer game, and design it for use with a variety of different user interfaces.




Java, Java, Java(c) Object-Orienting Problem Solving
Java, Java, Java, Object-Oriented Problem Solving (3rd Edition)
ISBN: 0131474340
EAN: 2147483647
Year: 2005
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net