Page 43 - Introduction to Programming with Java: A Problem Solving Approach
P. 43
1.3 Program Development
As mentioned earlier, a program is a set of instructions that can be used to solve a problem. Often, a pro- gram contains many instructions, and the instructions are rather complicated. Therefore, developing a suc- cessful program requires some effort. It requires careful planning, careful implementation, and ongoing maintenance. Here is a list of typical steps involved in the program development process:
• Requirementsanalysis
• Design
• Implementation
• Testing
• Documentation
• Maintenance
Requirements analysis is determining the program’s needs and goals. Design is writing a rough outline
of the program. Implementation is writing the program itself. Testing is verifying that the program works.
Documentation is writing a description of what the program does. Maintenance is making improvements
and fixing errors later on. The steps are ordered in a reasonable sequence in that you’ll normally perform
requirements analysis first, design second, and so on. But some of the steps should be performed throughout
the development process rather than at one particular time. For example, you should work on the documen-
tation step throughout the development process, and you should work on the testing step during and after
the implementation step and also after the maintenance step. Be aware that you’ll often need to repeat the
sequence of steps as needs arise. For example, if one of the program’s goals changes, you’ll need to repeat
Apago PDF Enhancer
all of the steps in varying degrees.
We discuss the requirements analysis step and the design step in this section. We discuss the design step
in detail in Chapter 2, and we illustrate it with examples throughout the book. We discuss the implementa- tion step in this chapter’s “Source Code” section, and we illustrate it with examples throughout the book. We discuss the testing step in Chapter 8. We discuss the documentation step starting in Chapter 3 and illustrate it with examples throughout the book. We discuss the maintenance step in Chapter 8 and illustrate it with examples throughout the book.
Requirements Analysis
The first step in the program development process is a requirements analysis, where you determine the needs and goals of your program. It’s important that the programmer thoroughly understands the customer’s wishes. Unfortunately, it’s all too common for programmers to produce programs only to find out later that the customer wanted something different. This unfortunate circumstance can often be blamed on imprecise communication between the customer and the programmer at the beginning of the project. If a customer and programmer rely solely on a verbal description of the proposed solution, it’s easy to omit important details. Later on, those omitted details can be a problem when the customer and programmer realize that they had different assumptions about how the details would be implemented.
To aid the up-front communication process, the customer and programmer should create screen shots of data-entry screens and output reports. A screen shot is a picture of what the computer screen looks like. To create screen shots, you can write short programs that print data-entry screens with hypothetical input, and you can write short programs that print reports with hypothetical results. As a quicker alternative, you can create screen shots with the help of drawing software or, if you’re a decent artist, with pencil and paper.
1.3 Program Development 9