1.2. Designing Good ProgramsProgramming is not simply a question of typing Java code. It involves a considerable amount of planning and careful designing. Badly designed programs rarely work correctly. Even though it is tempting for novice programmers to start entering code almost immediately, one of the first rules of programming is Java Programming Tip
In other words, the more thought and care you put into designing a program, the more likely you are to end up with one that works correctly. The following subsections provide a brief overview of the program development process. 1.2.1. The Software Engineering Life CycleSoftware engineering is the process of designing and writing software. The software life cycle refers to the different phases involved in the design and development of a computer program. Our presentation of examples in the book will focus on four phases of the overall life cycle. In the specification phase we provide a statement of the problem and a detailed description of what the program will do. In the design phase we describe the details of the various classes, methods, and data that will be used in the program. The implementation phase refers to the actual coding of the program into Java. In the testing phase we test the program's performance to make sure it is correct, recoding it or redesigning it as necessary. Figure 1.1 gives a more detailed overview of the program-development process, focusing most of the attention on the design phase of the software life cycle. It shows that designing an object-oriented program is a matter of asking the right questions about the classes, data, and methods that make up the program. Figure 1.1. An overview of the program-development process. |