Get premium membership and access questions with answers, video lessons as well as revision papers.
1. The computer program should solve the target problem.
2. The implementation of the computer program should be free of errors; hence it must work for all valid inputs and must produce the required response.
3. The program should be well documented in order to assist in the understanding or use of a program. This can be of great value not only to those charged with maintaining or modifying a program, but also to the programmers themselves.
4. The program should be maintainable because programs require a continuing process of maintenance and modification in order to keep pace with the changing requirements and implementation technologies. A program is made maintainable by:
i) Dividing the program into modules
ii) Making sure that the program is well-documented
iii) Using symbolic constants: Many programming languages permit the declaration of a named constant, which equates a user-chosen identifier, say, CLASS_SIZE, with a literal constant. Thus, #define CLASS_SIZE 48 will occur, in only one place, namely, the constant declaration. This requires only one alteration to change the value class size throughout the program.
5. The Program must be Robust. This refers to the ability of a program being able to survive various unexpected events, such as incorrect or invalid input data. The following are some guidelines to ensure robustness:
- The input data should always be validated, hence no assumption that the data is always correct.
- Always initialize relevant variables.
- Avoid syntactic constructs that could lead to undesirable interpretation.
6. The white spaces should be used effectively. Most programming languages allow the use of blank lines and spaces embedded within the program code to improve its readability.
Example: Statements such as x = x+1 would be better written as x = x + 1.
7. The choice of identifiers for the names of modules, subprograms, types, variables, and other elements is crucial in producing a readable program. The goal is to use meaningful identifiers which help the reader remember the purpose of an identifier without constantly referring to the declarations or to a variable list external to the program.
Kavungya answered the question on May 15, 2019 at 14:58
- Describe the structure of a C++ program.(Solved)
Describe the structure of a C++ program.
Date posted: May 15, 2019. Answers (1)
- Outline the steps in creating a C++ source file.(Solved)
Outline the steps in creating a C++ source file.
Date posted: May 15, 2019. Answers (1)
- Explain the features of a C++ program.(Solved)
Explain the features of a C++ program.
Date posted: May 15, 2019. Answers (1)
- What are the guidelines to good C++ programming.(Solved)
What are the guidelines to good C++ programming.
Date posted: May 15, 2019. Answers (1)
- Describe programming in C++(Solved)
Describe programming in C++
Date posted: May 15, 2019. Answers (1)
- Write a program for input and output operations(Solved)
Write a program for input and output operations
Date posted: May 15, 2019. Answers (1)
- Write a C++ program that can compute and the sum and average of 15 numbers.(Solved)
Write a C++ program that can compute and the sum and average of 15 numbers.
Date posted: May 15, 2019. Answers (1)
- Describe Identifiers.(Solved)
Describe Identifiers.
Date posted: May 15, 2019. Answers (1)
- Differentiate between signed and unsigned integers.(Solved)
Differentiate between signed and unsigned integers.
Date posted: May 15, 2019. Answers (1)
- Define a variable.(Solved)
Define a variable.
Date posted: May 15, 2019. Answers (1)
- Describe the Typedef in programming.(Solved)
Describe the Typedef in programming.
Date posted: May 15, 2019. Answers (1)
- Describe constants in programming.(Solved)
Describe constants in programming.
Date posted: May 15, 2019. Answers (1)
- Give the three main types of constants.(Solved)
Give the three main types of constants.
Date posted: May 15, 2019. Answers (1)
- Define a selection control structure.(Solved)
Define a selection control structure.
Date posted: May 15, 2019. Answers (1)
- Describe the switch statement.(Solved)
Describe the switch statement.
Date posted: May 15, 2019. Answers (1)
- Describe the loop structure.(Solved)
Describe the loop structure.
Date posted: May 15, 2019. Answers (1)
- Describe the do while control structure.(Solved)
Describe the do while control structure.
Date posted: May 15, 2019. Answers (1)