GE2112 - FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III PROBLEM SOLVING AND OFFICE APPLICATION SOFTWARE Plaig the Computer Program Purpose Algorithm Flow Charts Pseudocode -Applicatio Software Packages- Itroductio to Office Packages (ot detailed commads for examiatio). PLANNING THE COMPUTER PROGRAM The Programmig Process - Purpose Uderstad the problem Read the problem statemet Questio users Iputs required Outputs required Special formulas Talk to users Pla the logic Visual Desig Tools Iput record chart Priter spacig chart Hierarchy chart Flowchart Verbal Desig Tools Narrative Descriptio Pseudocode Code the program Select a appropriate programmig laguage Covert flowchart ad/or Pseudocode istructios ito programmig laguage statemets Test the program Sytax errors Rutime errors Logic errors Test Data Set 1
Implemet the program Buy hardware Publish software Trai users Implemetatio Styles Crash Pilot Phased Dual Maitai the program Maiteace programmers Legacy systems Up to 85% of IT departmet budget ALGORITHM Algorithm Set of step-by-step istructios that perform a specific task or operatio Natural laguage NOT programmig laguage Pseudocode Set of istructios that mimic programmig laguage istructios Flowchart Visual program desig tool Sematic symbols describe operatios to be performed Defiitios: FLOWCHARTS A flowchart is a schematic represetatio of a algorithm or a stepwise process, showig the steps as boxes of various kids, ad their order by coectig these with arrows. Flowcharts are used i desigig or documetig a process or program.[ A flow chart, or flow diagram, is a graphical represetatio of a process or system that details the sequecig of steps required to create output. A flowchart is a picture of the separate steps of a process i sequetial order. 2
Types: High-Level Flowchart A high-level (also called first-level or top-dow) flowchart shows the major steps i a process. It illustrates a "birds-eye view" of a process, such as the example i the figure etitled High-Level Flowchart of Preatal Care. It ca also iclude the itermediate outputs of each step (the product or service produced), ad the sub-steps ivolved. Such a flowchart offers a basic picture of the process ad idetifies the chages takig place withi the process. It is sigificatly useful for idetifyig appropriate team members (those who are ivolved i the process) ad for developig idicators for moitorig the process because of its focus o itermediate outputs. Most processes ca be adequately portrayed i four or five boxes that represet the major steps or activities of the process. I fact, it is a good idea to use oly a few boxes, because doig so forces oe to cosider the most importat steps. Other steps are usually sub-steps of the more importat oes. Detailed Flowchart The detailed flowchart provides a detailed picture of a process by mappig all of the steps ad activities that occur i the process. This type of flowchart idicates the steps or activities of a process ad icludes such thigs as decisio poits, waitig periods, tasks that frequetly must be redoe (rework), ad feedback loops. This type of flowchart is useful for examiig areas of the process i detail ad for lookig for problems or areas of iefficiecy. For example, the Detailed Flowchart of Patiet Registratio reveals the delays that result whe the record clerk ad cliical officer are ot available to assist cliets. Deploymet or Matrix Flowchart A deploymet flowchart maps out the process i terms of who is doig the steps. It is i the form of a matrix, showig the various participats ad the flow of steps amog these participats. It is chiefly useful i idetifyig who is providig iputs or services to whom, as well as areas where differet people may be eedlessly doig the same task. See the Deploymet of Matrix Flowchart. ADVANTAGES OF USING FLOWCHARTS The beefits of flowcharts are as follows: 1. Commuicatio: Flowcharts are better way of commuicatig the logic of a system to all cocered. 2. Effective aalysis: With the help of flowchart, problem ca be aalysed i more effective way. 3. Proper documetatio: Program flowcharts serve as a good program documetatio, which is eeded for various purposes. 4. Efficiet Codig: The flowcharts act as a guide or blueprit durig the systems aalysis ad program developmet phase. 5. Proper Debuggig: The flowchart helps i debuggig process. 6. Efficiet Program Maiteace: The maiteace of operatig program becomes easy with the help of flowchart. It helps the programmer to put efforts more efficietly o that part Advatages Logic Flowcharts are easy to uderstad. They provide a graphical represetatio of actios to be take. Logic Flowcharts are well suited for represetig logic where there is itermiglig amog may actios. 3
Disadvatages Logic Flowcharts may ecourage the use of GoTo statemets leadig to software desig that is ustructured with logic that is difficult to decipher. Without a automated tool, it is time-cosumig to maitai Logic Flowcharts. Logic Flowcharts may be used durig detailed logic desig to specify a module. However, the presece of decisio boxes may ecourage the use of GoTo statemets, resultig i software that is ot structured. For this reaso, Logic Flowcharts may be better used durig Structural Desig LIMITATIONS OF USING FLOWCHARTS 1. Complex logic: Sometimes, the program logic is quite complicated. I that case, flowchart becomes complex ad clumsy. 2. Alteratios ad Modificatios: If alteratios are required the flowchart may require re-drawig completely. 3. Reproductio: As the flowchart symbols caot be typed, reproductio of flowchart becomes a problem. 4. The essetials of what is doe ca easily be lost i the techical details of how it is doe. GUIDELINES FOR DRAWING A FLOWCHART Flowcharts are usually draw usig some stadard symbols; however, some special symbols ca also be developed whe required. Some stadard symbols, which are frequetly required for flowchartig may computer programs. Start or ed of the program Computatioal steps or processig fuctio of a program Iput or output operatio Decisio makig ad brachig Coector or joiig of two parts of program Magetic Tape 4
Magetic Disk Off-page coector Flow lie Aotatio Display Flowchart Symbols The followig are some guidelies i flowchartig: a. I drawig a proper flowchart, all ecessary requiremets should be listed out i logical order. b. The flowchart should be clear, eat ad easy to follow. There should ot be ay room for ambiguity i uderstadig the flowchart. c. The usual directio of the flow of a procedure or system is from left to right or top to bottom. d. Oly oe flow lie should come out from a process symbol. e. Oly oe flow lie should eter a decisio symbol, but two or three flow lies, oe for each possible aswer, should leave the decisio symbol. or f. Oly oe flow lie is used i cojuctio with termial symbol. 5
g. Write withi stadard symbols briefly. As ecessary, you ca use the aotatio symbol to describe data or computatioal steps more clearly. h. If the flowchart becomes complex, it is better to use coector symbols to reduce the umber of flow lies. Avoid the itersectio of flow lies if you wat to make it more effective ad better way of commuicatio. i. Esure that the flowchart has a logical start ad fiish. j. It is useful to test the validity of the flowchart by passig through it with a simple test data. Examples Sample flowchart A flowchart for computig factorial N (N!) Where N! = 1 * 2 * 3 *...* N. This flowchart represets a "loop ad a half" a situatio discussed i itroductory programmig textbooks that requires either a duplicatio of a compoet (to be both iside ad outside the loop) or the compoet to be put iside a brach i the loop Sample Pseudocode ALGORITHM Sample GET Data WHILE There Is Data DO Math Operatio GET Data END WHILE END ALGORITHM 6
APPLICATION SOFTWARE PACKAGES Shareware Shareware is software developed by a idividual or software publisher who retais owership of the product ad makes it available for a small cotributio fee. The volutary fee ormally etitles users to receive olie or writte product documetatio ad techical help. Freeware Freeware is software that is provided free of charge to ayoe watig to use it. Hudreds of freeware programs are available, may writte by college studets ad professors who create programs as class projects or as part of their research. Ope Source Software A ope source software program is software whose programmig code is owed by the origial developer but made available free to the geeral public, who is ecouraged to experimet with the software, make improvemets, ad share the improvemets with the user commuity Applicatio Software for Idividual Use The thousads of applicatio programs that idividuals use to perform computig tasks at work ad at home ca be grouped ito four types: Productivity software Software for household use Graphics ad multimedia software Commuicatio software INTRODUCTION TO OFFICE PACKAGES Word Processig A word processig program ca be used to create almost ay kid of prited documet. Word processors are the most widely used of all software applicatios because they are cetral to commuicatio. Whatever the type of documet created with a word processig program, the essetial parts of the procedure remai the same: Create (eter) text Edit the text Format the documet Save ad prit the file Spreadsheets Spreadsheet software is a electroic versio of the ruled worksheets accoutats used i the past. Spreadsheet software provides a meas of orgaizig, calculatig, ad presetig fiacial, statistical, ad other umerical iformatio. Busiesses fid spreadsheets particularly useful for evaluatig alterative scearios. The spreadsheet uses what if calculatios to evaluate possibilities. By eterig various data values ad formulas ito a spreadsheet, questios ca be aswered quickly ad accurately. 7
For the idividual user, spreadsheets fulfill may purposes, icludig: Preparig ad aalyzig persoal or busiess budgets Recocilig checkbooks Aalyzig fiacial situatios Trackig ad aalyzig ivestmets Preparig persoal fiacial statemets Estimatig taxes 8