UNIT-3 PROBLEM SOLVING AND OFFICE AUTOMATION 1. PLANNING THE COMPUTER To solve a problem using computer, three phases are necessary. They are i. Identifying the purpose i. Identifying the purpose ii. Developing a program iii. Executing the program First stage of problem solving Focus on understanding the problem Two activities are performed. They are Identifying Parameters and Constraints Collecting Information ii. Developing a Program After analyzing the problem, user has to plan for developing the program. For developing, the following activities are needed Identifying the logical structure Writing algorithm to list the various steps Drawing flowchart to represent the flow of information Writing pseudocode to specify the programming specifications. Writing the computer program Program code should be syntactically and semantically correct. Debugging the program Apply debugging techniques for removing errors. iii. Executing the program After developing an error free program,it needs to be executed in order to view the solution of the original problem. 2. ALGORITHMS Algorithm is one of the most basic tools to develop the problem. They are not computer programs and cannot be executed.
An algorithm is defined as a finite sequence of explicit instructions that, when provided with a set of input value produces an output and then terminates. After finite number of steps, solution of the problem is achieved. Algorithm Properties Must be no ambiguity in any instruction Should not be any uncertainity about which instruction is to be executed next. Algorithm should conclude after a finite number of steps. Algorithm cannot be open ended. Algorithm must be general enough to deal with any contingency. Example: Algorithm for determining the largest number, out of three numbers A,B,C Step 1: Start Step 2: Read the numbers A,B,C Step 3: Find the larger number between A and B and store it in MAX_AB Step 4: Find the larger number between MAX_AB and C and store it in MAX Step 5: Display MAX Step 6: Stop. 3. FLOWCHARTS A flowchart is a pictorial representation of an algorithm in which the steps are drawn in the form of different shapes of boxes and the logical flow is indicated by interconnecting arrows. It is used to understand the logic of the program. Boxes represent operation and the arrows represent the sequence in which the operations are implemented. Flowchart Symbols Symbol Symbol name Description Flow lines Connect symbols, indicates sequence of steps and direction of flow of control. Terminator representing beginning, end, pause
Input/output input, output values representation Processing Arithmetic and data movement instructions. Decision decision to be made Connector joins different flow lines Off page connector flowchart continues on next page Document paper document produced during flowchart process Manual Input input given by a developer or programmer Manual operation process has to be done by developer/programmer Online storage online data storage such as hard disks, magnetic drums. Magnetic disk data input and output from and to a magnetic disk.
Benefits of Flowchart Makes logic clear Communication Efficient Analysis Useful in coding Proper testing and debugging Appropriate documentation Limitations of Flowchart Complex for large programs Costly Difficult to modify No update Example: Flowchart for larger of 2 numbers Start Read A,B No Is A>B yes Output B Output A Stop
4. PSEUDOCODE Pseudo means imitation and code refers to instruction, written in a programming language. It is not real programming code, but it models and look like real code. It represents a generic way of describing al algorithm without using any specific programming language related notations. It is also known as Program Design Language (PDL). It provides high level description of an algorithm. It uses some keywords like Input-READ.OBTAIN, GET, PROMPT Output-PRINT,DISPLAY,SJOW Compute-COMPUTE,CALCULATE,DETERMINE Initialise-SET, INITIALISE Add one-increment If the pseudocode is once accepted,it is transformed into actual programming code. Example: Pseudocode for calculating area of a rectangle. PROMPT the user to enter the height of the rectangle. PROMPT the user to enter the width of the rectangle. COMPUTE the area by multiplying height with width. DISPLAY the area. STOP Pseudocode Guidelines Its not a difficult task. Statements should be written in simple English and the statements are programming language independent Pseudocode describes only logic and not programming Steps must be understandable. Should be concise. Instruction should be written in separate line. Benefits of Pseudocode It is language independent,so it can be used by most programmers. Easy to develop No need of syntax East to translate pseudocode into a programming language
Use of words and phrases It is compact and does not tend to run over many pages. Limitations of Pseudocode It does not provide visual representation of the programming logic There is no accepted standard for writing pseudocodes. They cannot be compiled and executed. There is no real formatting or syntax rules. 5. APPLICATION SOFTWARE PACKAGES Application software is software that helps a user to perform a specific task on the computer. Eg: MS word, MS Excel, MS Power point. Application Software is classified into types. They are General Application Software- software is designed based on the general requirements of the users. Customized Application Software- software is designed based on the requirements of the specific group of users. It is also known as tailor-made application software. Many application software are bundled together and collectively they can be used to accomplish specific tasks is known as application packages or application suites. Eg: MS office which comprises of, Classification of Application Software Enterprise Software Enterprise infrastructure Software Educational Software Product Engineering Software Content access Software Simulation Software Information worker Software Media development Software Word processor Spread sheet package Other application software
6. INTRODUCTION TO OFFICE PACKAGES Perform routine office related tasks. Common tasks are, Preparing documents,letters,memos,invoices. Preparing worksheets,financial statements etc. Preparing company presentations and product presentations. Microsoft launched MS office suite which comprises of word processor, spreadsheet package, presentation software,database package. Other office packages are open office,google docs,lotus Smart Suite.