Professional Documents
Culture Documents
Introduction
In todays IT driven business era, Managers must understand the working of software, which is the driving force of IT. Understanding software programming helps the managers to develop problem solving skills using computers, to know what software development is and what software developer do It helps Managers to be familiar with programming concepts and terminology to facilitate communication with software developers.
Problem Definition
Generally the problems in real life are not precise and sometimes may be ambiguous. To obtain solutions for such problems we need to define problem specifically. The problem must be clearly understood as to what must be done rather than how to do it. The problem definition should in users language and should be described from the users point of view. It usually should not be stated in technical computer terms.
Requirement Analysis
An explicit set of requirements is important as they help to ensure that the user rather and not the programmer drives the programs functionality. Only if the requirements are explicit the user can review them and agree to them, which reduce the burden on programmer to guess what the user wants. Specifying requirements adequately is a key to the programs success. Essentially, we must look for three main components
1.What is given as input 2.What is expected as output 3.How to arrive at the solution
Example
A program is required to retrieve motor vehicle registration records from a file upon receipt of a request from an operator at a terminal. The operator will supply a vehicle registration number and the program will display the details of its vehicle and its owner. An error message will be displayed if the program is unable to locate the vehicles record.
Example
Input :-Vehicle Registration number Process :-Using the registration number, search for it , and if found, retrieve the details of the vehicle and its owners name from the disk. Output :- If retrieval was successful, then allow the details of the vehicle to be displayed on the screen but if unsuccessful, indicate the absence of the vehicle registration on the disk and display a suitable error message .
Dry Run
It is a manual way of testing an algorithm for its correctness and functionality. In this method, a table is prepared with columns for each variable used in the algorithm and the value of each variable is updated in the table as we proceed through the algorithm, one step at a time. Success of the Dry Run method depends upon the ability to step through the instructions exactly as a computer would execute them.
Dry Run
Step 1 START Step 2 X= 5 Step 3 Y =1 0 Step 4 Z = 0 Step 5 Z = X+Y+(X * Y) Step 6 Y = Y+6 Step 7 Z = Z+Y Step 8 DISPLAY X,Y,Z Step 9 END X Initial Value After step 5 After step 6 After step 7 5 5 5 5 Y 10 10 16 16 Z 0 65 65 81
Independent inspection
In this method the specification and designed solution is handed over to the developer's colleague for comments. The solution is checked by inspection or dry run. This method must be adopted as it brings objectivity in the design of the algorithm. The person who has developed the algorithm will always view it with a bias and may not be thinking of situations that may arise, other than those already taken care of. A person who has not developed the algorithm is in a better position to evaluate the algorithm against all possible occurrences and hence any errors in the algorithm can be taken care of before coding.
Structured Walkthrough
This method involves a presentation of the algorithm to a team of peers. The team points out inconsistencies, better procedures and errors if any in the algorithm. One member takes notes on the action points to be taken by the presenter. Spotting of errors becomes easier while explaining the logic to others. The solution is either accepted completely, or accepted after minor modifications, or rejected completely. T This method is more productive than a dry run or an independent inspection.
Syntax means the correct way or "grammar" of writing a command and Semantics means the logical meaning of a statement.
but through oversight, while coding, the formula is written as Net Salary = Basic Salary - Allowances + Deductions This will obviously produce a wrong result. Such errors can be detected only by a dry run.
Note: Compiler converts the entire program into its equivalent machine and hence all the errors are displayed together after the compilation process. Interpreter converts the program line by line and hence the errors are displayed as when they are encountered.
Documentation
Once the program has been written and debugged, it is ready for use and hence requires documentation or a written procedure of how to run the program, enter data, what problems to expect, how to handle them, etc. Documentation of a program will consist of flowcharts/pseudo codes, program listings and detailed written statements of algorithms and procedures involved. Documentation is necessary for program maintenance. Without proper documentation, it will be difficult to change a program at a later date. It is a mis-held notion that documentation is the last step in the algorithm development stage. In fact, it should be interwoven with the entire phase of the programming process, especially with the design and implementation, because documentation is supposed to enable individuals to understand the logic of programs.