- Home
- Logic & Programming
- C PROGRAM MAINTENANCE
C PROGRAM MAINTENANCE Essay Example
- Category:Logic & Programming
- Document type:Essay
- Level:Undergraduate
- Page:2
- Words:774
C Program Maintenance
Question 1: Program maintainability
Program maintainability refers to the degree to which a program can be understood. The assumption is that if it easy to understand the program then it is also easy to identify errors and repair the program. It also refers to the degree to which a program can be enhanced, however, understanding the program is the main area of focus. Maintainability also touches on the ability to test the program. The main way of determining the understandability of a program is by counting the number of lines of comments. Comments enhance code readability and, therefore, improve understandability which then improves the other areas – testing, repairing, and enhancing of the program. A very maintainable program should have as many comments as possible. The number is counted for the program page.c and it is found that comments take about 19 lines of the program. Based on the fact that the whole program has a source code of 37 lines; the number of comments is about half of the program making it very understandable. The page.c program maintainability is therefore 19 lines of comments.
Question 2: Program size
Program size can be defined simply as the amount of memory space the program requires. Program size also refers to the number of parts that a program has. A program is usually made up of several parts which may be worked on separately or together to come up with the complete program. The size of a program determines the amount of time that is required to work on it and so it is important for developers to know it before allocating such resources. The best way to determine the size of a program is by measuring the program requirements for each part. The best way to do this is by determining the number of characters that a program has in terms of bytes. The characters in the program are split and distributed among various individual functions and parts within the program. The page.c program’s size is also determined through the same way – determining the size of the number of characters making up the program. Taking this measure leads to the observation that the page.c program has a size of 2113.
Question 3: Size of Source Codes
Size of source code is the number of lines making the useful source code of a program. It is a determination of the space that source code occupies in a file as the code is written within that file. The size of source code is a very important metric in programming as it is used in determining important measures such as the productivity of programmers. Source code is the useful part of the program in the perspective of the compiler because it is the part of the program that is executed to perform a set objective function. This means that spaces and comments are not counted as part of source code. Comments are given to provided readers with more information that will boost the understanding of the program by the reader. Space lines are included by most program to make the program look neat, less congested and so very readable. The compiler does not execute space lines and comments when compiling the program. The page.c program has 37 useful lines of code. The size of source code is therefore 37.
Question 4: Modularity of a Program
The modularity of a program refers to the ability of the program to be split into simpler, interchangeable and executed components/functions. A program may be aiming at carrying various operations on a specified entity. The operations that the program is to carry out on the item can be split into several components that are able to accomplish what is required of them independently. A modular program is very efficient and is a high-quality program because it allows for separation of tasks leading to a faster execution of the operations. Depending on the objectives of a program, a good program in terms of modularity is that which has many modules – can be classes or functions. In modularity using functions/methods, the functional components of the program are split into methods which are then separately implemented to achieve part of the objectives of the project. When determining the modularity of a program, the main function is n not counted as a module because it is responsible for calling to execution all the other modules[ CITATION Bal00 l 1033 ]. Going by this, the page.c program has a modularity of two.
References
Baldwin, Carliss Young and Kim B. Clark. Design rules: The power of modularity. Vol. 1. MIT press, 2000. Book.