Chapter 10: Writing a Complete Program
Chapter 10: Writing a Complete Program
Chapter Outline: 10.1 Programming Process 10.2 The Logical Flow Through a Program 10.3 Advantages of Modularization
10.1 •
Programming Process The programming process is broken 6 major steps: 1. 2. 3. 4. 5. 6. Understand the problem Plan the logic Code the program Translate the program into machine language Test the program Put the program into production
1. Understand the problem • Gain a clear understanding of what is required for the program. • State the problems clearly and unambiguously. E.g. inputs, outputs, and any additional requirements. • To satisfy the needs of the customer. 2. Plan the logic • Plans the logical steps to the program and decides what steps to include and how to order them. • There are two common design tools: flowchart and pseudocode. • The programmer breaks a large programming problem into reasonable units. • These reasonable units are typically called as modules, subroutines, procedures, functions or methods. • The process of breaking down a large program into modules is called modularization (refer to the section 10.3). 3. Code the program • Choose one or more programming languages to write the program after preparing the logical steps in the previous work. • Conduct a detailed planning before coding allows programmer to write programs that are less prompt to errors and changes. 4. Translate the program into machine language • Convert the program into machine language by using translator software for the particular programming language. • Translator software: compiler or interpreter. • Error messages are displayed as programming language statements written incorrectly.
Page 1 of 6
AACS1074 Programming Concepts and Design I
Chapter 10: Writing a Complete Program
5. Test the program • To ensure the program runs correctly and is error free. • Sample data need to be prepared. It includes