You are on page 1of 13
SOFTWARE DEVELOPMENT (PROGRAM DEVELOPMENT] 10 now 2.1 Introduction to program development/software development 2.2 Program Development Life Cycle. 2.2.1 Problem identification 2.2.2 Problem Analysis/Requirement Analysis 2.2.3 Program Design Phases of program Design (Data desi design) 2.2.4 Program coding 2.2.5 Program Testing and Debugging, 2.2.6 Program Delivery/Implementation and Evaluation 2.2.7 Program Maintenance 2.2.8 Documentation 2.3 Programming Tools 2.3.1 Algorithm 2.3.2 Flowchart 2.3.3 Decision Table 2.3.4 Pseudocode 2.4 Comparison of them 2.5 Advantages and Disadvantage of Them 2.6 Symbols and some examples Input, Output, Procedure, File Program Development In order to solve a computation problem, its solution must be specified in terms of computation steps each of which may be eflectively performed by a digital computer. ‘The language that is used to provide systematic notation for writing such computation steps is known as programming language. And, the sequence of computation steps to solve a specific problem written in any programming language is called a program. The task of developing program for the solution of computation problems is refers to as programming. A person or group of persons involved in this activity of programming is known as programmers. Program development life cycle The following steps are involved in writing computer programs: 1. Problem identification Problem Analysis/Requirement Analysis Program Design Program coding Program Testing and Debugging Program Delivery/Implementation and Evaluation Program Maintenance Documentation 1) Problem Identification: ‘The first step in program development is problem identification. Before solving any problem, problem must be identified accurately, wrong problem identification lead to wrong solution. It starts with the discovery that some problem exists in the current system and conchides when both the person with business problem (end users) and the person assign to identify the problem (system analyst) are agreed about the exact problem to be solved. The system analyst work together with management level persons and user of the program to identify problems. The starting point for the design of any computer program must be a proper specification of its required behaviors. To deseribe this behavior pattern necessary input and output must be identified. In addition to the description of fundamental input and outputs, a program specification may include a description of any constraints which must apply to the solution, This may include details of run time or spac deadlines. limitations, available equipments, tools and project 2) Problem analysis/Requirement Analysis(Task Analy: System analyst is involved in requirement analysis or task analysis. Bi this step is to identify all business requirements that must be fulfilled by the software program. To identify requirements, system analyst uses different techniques such as interview of users, questionnaire, work observation, online help ete. Some of the questions which need to be answer in this step are: 1,) For Source Documents What source documents must be provided, how often and by whom? * How will information on the source document be transformed into the machine readable forms? What is the layout of source document and computer input form? 2.) For Files What computer files will be maintained? © What type of file media and file organization will be used? What will be the size of the file and growth rate? ‘© What is the layout of computer records and computer file? 3.) For Processing ‘© What type of processing is required that means manual or automatic? * How frequently processing must be performed? * What volume of transactions must be process? © What processing approach will be used? ‘© What offline equipment will be necessary? 4.) For Output What is the format of the output report? * To whom the report will be distributed? The result of this analysis of requirements is a set of specifications describing the information needed. The specification describes the problem, the data to be provided, the persons to receive the output, frequency of the output, and an estimate of the volume of transactions to be processed. This is the statement of users’ requirement. ic objective of 3) Program Design i) Data Analysis and Input Design: Data analysis is the process of identifying all data required for a software program. In addition to all the basic data we must also mention the type of every data item, their size as well as the relationship between data item if exist. This step analysis all type of data required for the successful operation of the program. Input design is the process of converting an external user oriented description of the input to a computer system into machine oriented format. This step focuses on identifying all the required data on the basis of following rules: i.) Layout the sequence in which data entry operator can enter data system. ii.) If required, group the data element to be entered separately from those that are not be entere: Computer programs may generate errors or incorrect output due to the incorrect input. So, to develop a successful program the input data must be analyzed properly. i) Output Identification and Specification: The main purpose of this step is to identify all types of outputs expected by users from the program and the structure of those output. A program may generate output in different forms such as hard copy output using printer and softcopy outputs that are displayed in monitor. Printer and page layou To take a hard copy output from a program we use printer. Bills Report, Balance Sheet etc. are example of those outputs that which must be printed on paper. While designing such outputs two things must be considered, printer type and page layout. There are different types of printer like dot matrix, leaser printer ete, and while designing output we must know in advance which printer have to be used , this is because different printer have different capabilities in terms of the paper accepts, number of characters that can print per line and width of the paper. Similarly, while choosing paper we must specify different arcas on paper for different purposes such as for report printing the page layout should be as: nto the > Margin iv) Designing the Solution: Before starting writing programs by programmers, it is essential to define and design the complete solution of the problem. After designing the solution programmers can use any programming language according to their convenient and can develop program without bothering the logic of the programs While designing solution, problem specification is given in terms of desired relation between input and output. The desired relation means how can be achieved the desired output form the given inputs. This relation describes a detail procedure to convert input into outputs While designing the solution, the solution designer must use some standard tools so that the solution can be easily understood by all programmers. For this purpose different tools can be used and some of them are: i.) Algorithm ii) Flow Chart iii.) Pseudo code iv.) Decision Table v) Decision Tree There may me multiple alternative solutions for a given problem but a good program should economize both computation time and the storage space required to represent the program and data structure is known as time efficient and space efficient, To solve a large and complex problem we follow the concept of modular programming. In modular designing of a problem, problem is decomposed into multiple, similar and simple modules. This modular design can be implemented either by following the top- down approach or Bottom-up approach. 4) Program Codin Coding the programs means translating the solution of the problem which is specified either by flow chart or algorithm into a programming language. The language chosen depends on what the program expected to do and what facilities are available to the programmer. The programming activity continues with the coding of the logic, describing in the flowchart or algorithm into the instructions of particular programming language. 5) Testing and Debugging Debugging: Debugging is the process of detecting and correcting the errors in a program debugging is a time consuming process but to design a correct program it is essential. During debugging different types of program errors are located and eliminated. Types of Errors: In general bugs or errors can be i) Syntax error ii) Logical error iii.) Run-time error i) Syntax Error: Syntax error occurs when the rules or syntax of the programming language are not followed while writing the instructions. Such error typically involves. incorrect punctuation, incorrect word sequence, undefined terms misuse of terms ete. These errors are detected during compilation process by the compiler. These errors are very easy to correct because the compiler point out where an errors has occurred and appropriate iegorized into three categories. They are: message for the cause of the error. A program can’t be successfully compiled and executed until all the syntax errors have been corrected. i) Logical Erro A logical error is an error in designing the programs logic. Due to such errors program produce incorrect output. That means a program which is free form syntax error, but has one or more logical error will be successfully compiled and executed but will not produce correct result. So these errors are difficult to identify. iii.) Run-time error: ‘The errors that may occur during the runtime of the program are called runtime errors. These errors are due to incorrect input data given by the users. For example, there is an instruction as C= A/B, If user input A=non-zero and B=non-zero then above instruction will produce correct result without any error but when if user input A=non-zero and B=0 then this instruction produce an error, which is a run-time error, Debugging a program for logic error: Unlike syntax error the computer doesn’t produce any error message for logic error in a program. Therefore logic errors are more difficult to eliminate then syntax error. However once the testing of a program indicate the presence of logie error, one or more following methods may be used to locate and correct logic errors. i) Doing manual simulation of the program: One approach for debugging a program for logic error is to take the print out of the source code of the program and go through its execution manually with the test data, which produce incorrect result. In the manual execution, we follow the same sequence of the path, which the computer program will follow for the test data. This method is normally used only for simple and small programs because manual execution of a program is difficult task and it takes a lot of time, .) Putting print statements in the program code: Another approach is to place several print statements at appropriate location in the program so that the values of different variables can be printed to display intermediate result of the calculation. This is an effective approach to find out logic errors. Once the errors have found and corrected, these print statements are removed form the program. iii) Using a debugger: This is the most commonly used approach in a high level language. A debugger is a software tool which help programmer to execute program step-by-step and allowed him to display intermediate calculation result whenever desires Testing: Testing is the process of analyzing the software item to detect the differences between existing and required conditions icc. testing is the process of making sure that the program performs its desired task. Before installing the program in the actual work environment and after the successful debugging, the program must be tested. To test the program some test data are identified and those test data are given as a input to the program and we compare the actual result of the program with the expected result. If both are similar then we can say that the program is working properly. To test a program properly we must be careful in selecting the test data. Generally, following type of data are identified to test every situation of the program. i.) Typical data: Which will test generally used program paths. ii) Unusual but valid data: This will test the program paths to handle the exception, Incorrect, incomplete and inappropriate data: Which will test the program error-handling capabilities Level of testing (level of correctness) Depending on the type of data input, we can identify three level of program correctness: «Possible correctness: It follows obtaining correct output for some arbitrary input. If outcome of such test is wrong, the program can’t be possibly be correct * Probable correctness: It follows obtaining correct output for a number of carefully selected inputs. If all problematic areas are checked in this way, the program is probably correct. + Absolute correctness: This can be demonstrated by a test that involves ever possible combination of inputs. Such a test would take a huge amount of time and cost. So it is not practicable. Types of Testin; There are mainly two types of testing techniques. They are: 1.) Top-down testing 2.) Bottom-up testing 1.) Top-down testi In this method of testing, the testing is done by beginning form the main module and shifting towards to the lower modules. When the main module is tested, it is broken down into some sub-modules. Such sub-modules are tested and again they are broken down into another sub-module. This process is repeated until the last module is tested. 2) Bottom-up testin; In this process, the lower level module is tested at first and then it is shifted towards the upper level modules. It is just opposite of top-down method of testing. After all the lowest level modules are tested, they are integrated into some common module and again tested, This process is repeated until all the modules are integrated into the main module. Both of these strategies explained above can again be divided into two types. They are: i.) Black-box testing ) While-box testing i) Black-box testing (Functional Testin; In this technique of testing only the internal coding of the program are tested. It is also called ‘functional testing’ because it tests all the function part of the codes. When we write any code, it must be tested to find whether it does real job which is wanted by the programmer. It generally tests loop and their functions, array and their boundaries ete. It is also called black-box testing because test cases are totally hidden for general users because it is done at coding level. ii.) White-box testing In this testing technique instead of testing the coding part or internal functioning or the program, the behavioral (structure) part of the program is tested, ie. it only test the structure of program. It is used to check whether all possible paths are covered or not. It is also called *Glass-box testing’ because the test cases are totally visible to general users and they can also make test cases. 6) Problem implementation and evaluation Once the program is thoroughly tested and all known errors have been removed. The program also with required hardware is installed for use by the intended users. At this stage the old system (which may be manual program or inefficient program) is phase out and new program is phased in. Once the new program is implemented and put to operation, it is necessary to evaluate the program to verify whether it is meeting its objectives or not. These objectives of the program are clearly defined in problem identification and requirement analysis steps. While evaluating a system the following points are normally considered a.) Performance Evaluation: The performance of the new program system is evaluated and compared with the old system. In general the new system should be at least as efficient of the old system on performance. b.) Cost Analysis It should be analyzed whether the cost estimate done for the various steps of the program during initial step match with the actual cost occurred in each step. ¢.) Time Analysis: It should be analyzed whether the time estimate done for the various steps of the program during the initial steps matches the actual time taken in each step. d.) User Satisfaction: It should be found whether the users are satisfied with the new system? How useful is the program for them, they receive output in time to take necessary actions? All the questions are analyzed to evaluate the level of user satisfaction. €.) Failure Rate: The quality of a program also depends on its failure rate. A program which frequently fails can’t meet its objectives successfully. f.) Ease of Modification: Soon or later all the programs need to be modify to meet new requirements. Therefore the program should be designed and developed such that itis easy to modify. 7) Documentation: Next step in program development is documentation. Documentation is the process of collecting, organizing storing and maintaining a complete record of while program ware developed, for where they ware developed and what functions they performed and how this functions are carried out. The documentation should include a.) Definition of the problem b.) Description of the system ¢.) Description of the program d.) Description of operator instructions €.) Description of program controls Most popular techniques that are used for documentation are: Flow chart, Incline comments, Data flow diagram, E1 jonship diagram, Structure diagram ete. a.) Flow chart: helps to describe the algorithm de refinement. b.) Insline comments: helps the programmer to understand the module which helps to debug, reuse and extend the code. ©.) Data flow diagram: helps to understand what system is doing and how the system is modularized. 4.) Entity relationship diagram: helps to understand the data being used by software. ¢.) Structure Diagram: helps to understand the complete modular structure and the integration of the entire program. ed during stepwise 8) Maintenance: This is the last and final step in software development life cycle. After the final system is being developed and tested, it is delivered to the market or installed to the user machine. Users start using system. The program has to be maintained. Program maintenance is the technique of updating, altering (changing) or correcting the existing program. Program maintenance may require due to error in the existing program, changes in business requirements or due to new requirements. Program maintenance is the lifetime job. Programming Tools Programming tools are those that are used to design the solution of the problem identified in the problem identification steps. Those tools are as 1. Algorithm 2, Flowchart 3. Decision Table 4. Pseudocode Algorithm An algorithm is a collection of steps written in any natural language to solve a particular problem in other words an algorithm is a finite set of rules use to solve a problem. Algorithm may involve three types of steps. = Sequential step = Conditional step = Looping step Algorithm is one of the most common approaches to describe the logic of problem solving. It does not use any graphical notations. It simply describes the solution in natural language. Properties of an algorithm: An algorithm must possess the following properties: a.) Finiteness: An algorithm must terminate after a finite number of steps. b.) Unambiguous: Each step of the algorithm is preciously defined that means the actions to be carried out are unambiguously defined and the sequence of steps to be executed is also unambiguously defined. ¢.) Completeness: The rules of algorithm are complete so that it can solve all problem of particular type for which it is designed. 4.) Effectiveness: All the operations use in an algorithm is basic so that it can be carry ‘out by a person using only paper and pencil. €) Input: One or more quantities are externally supplied for processing, which are known as inputs. £) Output: After inputs are processed, they must produce at least one quantity as output. Flowchart: A flowchart is a diagrammatic representation of various steps involves in the solution of a problem. Flowchart is connected by using some specific notations. The flowchart indicates the direction of flow of process, relevant operation and calculation, point of decision and other information which are the part of the solution Symbols of Flowchart Terminal box: start and stop Input / Output box: Accept and display result. Parallelogram Processing and assignments: It is used to process and Rectangle assignment values, Decision box: Take decision in some conditions Diamond ‘Arrows Flow lines: connect to carious component of \ flowchart and show the logical sequence of step. —> Small circle oO Connector: A long flowchart which is in multiple pages or different part of flowchart in a single page are connected to each other using this symbol. It must be filled up by a label. Exit connector, entry connector Rules for drawing flowchart: 1. Only the symbols that are available to draw the flowchart should be used. 2. The arrows in the flowchart represent the direction of flow of control in the problem. 3. The logic of a program flowchart must be top to bottom. 4. Normally flow-line should not cross each other. 5. Bach symbol except the decision box used in a flowchart should have one entry point and one exit point. 6. As far as possible the statement within the symbol of a flowchart should be independent of any programming language. 7. All decision branches should be label by true of false. 8. If a flowchart is lengthy and multi pages then use labeled connector to connect different part of the flowchart. Advantages of flowchar Flowcharts are used for a variety of applications as they progide the following advantages. 1, Better communication: A flowchart is a pictorial representation of a program, so it is easier for a programmer to explain the logic of a program through flowchart. 2. Proper Documentation: Flowchart provide valuable documentation support for the programmer using flowchart. It is easy to maintain the program whenever necessary. 3. Efficient Coding: Once a flowchart is ready, it is very easy to write the corresponding programs for the programmers. 4. Systematic Debugging: A flowchart is very helpful in detecting, locating and removing mistakes (bugs) in a program in a systematic manner because the logic if the program is in the flowehart. 5. Systematic testing: Flowchart is very helpful in designing the test data for systematic testing of programs. 6. Programming language independent: Flowcharts are language independent and knowledge of any programming language is not required to develop and understand the flowchart. 7. Provide summary to detail level logic: Flowchart provide the summary logic as well as detail logic for the problem solving. So they are valuable in solving any type of problem. Disadvantages of flowchart 1. Flowchart are very time consuming and laborious to draw with proper symbol for large and complex program. 2. Actions to be taken in specified situa are involved. 3. Sometime it required redrawing of the complete flowchart which is tedious and time consuming. 4, They take long time to draw if the problem is complex and any modifications are made in original program. 5. There are no standard for determining the amount of detail that should be included in flowchart. Pseudo code: Pseudo code is an algorithm expressed in a natural and understandable language. Pseudo means imitation or false and code refers to the instructions written in a programming language. Therefore pseudo code is an imitation of actual computer instructions. These pseudo instructions are phrases written in a natural language. Pseudo code to add two numeric values and display the result begin ions can be difficult when many decision paths accept Num Num? end dispaly Sum Advantages of pseudo code 1 ‘As compared to a flowchart, converting a pseudo code to a programming language is much easier. As compared to algorithm, it is easier to modify the pseudo code of program logic when program modifications are necessary. Writing pseudo code involves much less time and effort than drawing an equivalent flowchart. Disadvantages of pseudocode 1 2. Ttdoes involve any graphical representation of program logic. There are no standard rules to follow in writing pseudocode. Different programmers use their own style of writing pseudocode. Hence communication problem occurs due to lack of standardization. As compared to flowchart, beginners often find it more difficult to write pseudocode of program logic. Decision Table: Decision tables are graphics method for describing the logic of decisions. The decision table lists a set of conditions, set of actions and identify different combinations and decisions which lead to different combinations of actions in a tabular format. These different combinations of conditions alternatives and possible actions are known as rules. A decision table is simply a table showing the various actions to be taken for different combination of conditions. Since, it specifies only the logic rules and nothing about the procedure used. A decision table is more problem oriented than flow chart which is solution oriented. The four basic elements of decision table are: i) Condition stubs ) Condition Entries iii.) Action stubs iv.) Action entries These four elements form quadrants as, Heading, Rule numbers Condition Stub | Condition Entries ‘Action Stub ‘Action Entries Fig: Configuration of decision table The table list all the conditions related to a procedure one below the other in the condition stub and in action stub all the possible actions are listed. The condition entries and action entries together constitute one or more “rules”, each rule indicates the actions needed to be taken when a set of conditions are applied. Decision table may be of two types, 1) Limited entry table 2) Extended entry table Limited entry table gives the simple conditions with ‘yes’ or ‘no’ answer whereas in an extended entry table conditions have more than two possible states. In a limited entry table the only actions are “execute” or “do not execute”, whereas no such restrictions are applied to an extended entry table. Conditions and actions are connected by “if. then, ” relationship. Each rule identifies a set of conditions and a set of actions which have this if-—ther relationship. The condition entries consists of a combination of yes (Y) and No (N) in limited entries table whereas in extended entries table we can add extra state as an unpredicted state indicated by the action entries identify with “X’ where action to be taken and by blank or “.” where action is not to be taken. Steps in preparing limited entry decision table The steps used in the development of limited entry decision table are: 1.) List all conditions and actions. 2.) Combines a condition which descries all possibilities. 3.) Fill condition entries by Yes (¥) or No (N). 4.) Fill up action entries by marking *X’ for a possible action. 5.) Combine redundant rules to simplify the decision table. 6.) Check for completeness. 7.) Re-order decision table for most understandable order of rules. Advantages of decision table ‘The decision table is a tool that is used to demonstrate multiple conditions and their actions. It is a supporting tool to flowchart. It provides the following advantages. 2) The decision table provides a framework for a complete and accurate statement of processing or decision logic. 3.) The table is compact and easily understandable. It is very effective for communication between analyst and programmers. 4.) Decision tables can serve as a compact means of describing operations. 5.) Itis a convenient way to describe logically complex decisions. 6.) Decision table can be used to summarize much information in documentation. 7.) They offer valuable support in system design and programming. Disadvantages 1.) Large decision table become incomprehensible and can be neither checked nor use by programmers. 2.) The construction of the decision table is a complicated and time consuming process. So in some situation analyst do not prefer decision table. 3.) Decision tables ignore the flow of data and other logical concept of the problem so it is not a complete tool to describe any problem. Some examples to draw flowchart and Algorithms 1) Write an algorithm and flowchart to prepare a cup of tea. Algorithm: Step]: Start ‘Step2: Put the utensil on the stove Step3: Pour water and boil Step4: Mix milk ‘Step5: Add tea and sugar Step6: Boil it Step7: Is it well boiled? If“yes” goto step 8 If“no” goto step 6 Step8: Filter and serve Step9: Stop Start + Put utensil on stove + Pour water and Boil Mix milk ¥ ‘Add tea & sugar Boil Isit No boiling? 4 Yes End

You might also like