PROGRAM DEVELOPMENT : DEFINITION AND CHARACTERISTICS OF A GOOD PROGRAM - SS2
PROGRAM DEVELOPMENT
DEFINITION,CHARACTERISTICS OF A GOOD PROGRAM, AND PRECAUTIONS IN WRITING PROGRAM.
Definition of Program
A program is a set of instructions that are executed by the CPU. A program can also be defined as an organized list of instructions that when executed cause the computer to behave in a predetermined manner. Without a program the computer is useless. Programs are written in computer programming language such as: PYTHON, PHP, JAVASCRIPT, CSS e.t.c
Characteristic of a Good Program
The following are characteristics of a good program.
1. Accuracy: Program should be sufficiently accurate to get the desired results.
2. Extensibility: this means that you should design the program so that you can add and remove an element from your program without disturbing the underlying structure of the program.
3. Maintainability: this is making your code easy to update
4. Efficiency: a good program should be designed to use the least amount of primary memory and the fewest devices possible.
5. Generality: Design the program to be generalized and flexible.
6. Portability: a good program should be moved to another environment
7. Simplicity: program logic should be as simple and as uncomplicated as possible.
8. Transferability: plan the program to be as machine independent as possible.
9. Reusability: write code that will be able to be used in unrelated projects.
10. Leanness: leanness means making the design with no extra parts.
Precautions To be Taken When Writing a Program
1. Do not rush: Be careful, stable and patient when writing programs
2. No steps should be skipped
3. The order of execution must be followed sequentially
2. Problem analysis
3. Flowcharting
4. Desk checking
5. Program coding
6. Program compilation
7. Testing/Debugging
8. Program documentation
9. Program Running
10. Maintenance
1. Problem Definition: This is the formal definition of task. It includes specification of inputs and outputs processing requirements, system constraints and error handling methods.
2. Problem Analysis: this step is the process of becoming familiar with the problem that will be solved with the computer program.
3. Flowcharting: A flowchart is a pictorial representation in which symbols are used to show the various operations and decisions to be followed in solving a problem. Flow chart depicts the logic involved in the problem solution and therefore, is a step-by-step sequence that the program will describe to the computer.
4. Desk-checking: Desk-checking is a manual (non-computerized) technique for checking the logic of an algorithm
5. Program coding: this is the process of transforming the program logic document into a computer language format.
6. Program compilation: A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code. The process of transforming source code into object code is called compilation.
7. Testing and debugging: This stage is the discovery and correction of programming errors.
8. Program documentation: Comprehensive information on the capabilities, design details, features, and limitations of the program so that those who use and maintain it can understand it so that the program can be extended to further applications.
9. Program Running: This is the actual running or execution of the program with compiler or interpreter so as to check if the desired output is generated.
10. Maintenance: It is the process of updating or amending a previously written program for current use.
INTERPRETED AND COMPILED PROGRAM
COMPILER CHARACTERISTICS
1. Spends a lot of time analyzing and processing the program
2. The resulting executable is some form of machine-specific binary codes.
3. The computer hardware interprets (executes) the resulting code program.
4. Execution is fast
Examples of compiled programs languages are: C, C++, C#, Ada, ALGOL, Java, COBOL, Visual Basic, Lisp, FORTRAN, Pascal
INTERPRETER CHARACTERISTICS
1. Relatively little time is spent analyzing and processing the program.
2. The resulting code is some sort of intermediate code.
3. The resulting code is interpreted by another program.
4. Program execution is relatively slow
Examples of interpreted languages are: QBASIC, JavaScript, PHP, ASP, APL
FLOW DIAGRAM ON HOW COMPILER AND INTERPRETER WORK
Class Activities
1. Define a program and list four (4) examples of programming language
2. Explain any five (5) characteristics of a good program.
3. If a step is skipped in a program, what could be the result?
4. List and explain any five (5) steps in program development.
5. List three (3) examples of compiled and interpreted languages
Comments
Post a Comment