Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Problem Solving Techniques - Computer Fundamentals - Lecture Slides, Slides of Computer Science

These are the Lecture Slides of Computer Fundamentals which includes Access and Databases, Relational Database, Components of Database, Program for Creating, Store of Information, Relational Version, Access Environment, File Location etc. Key important points are: Problem Solving Techniques, Problem Statement, High-Level Description, Formal Description, Algorithm in Pseudo Code, Flowchart, Standard Symbols, Advantages of Using Flowcharts, Efficient Coding

Typology: Slides

2012/2013

Uploaded on 03/22/2013

dhirendra
dhirendra 🇮🇳

4.3

(78)

272 documents

1 / 23

Toggle sidebar

Related documents


Partial preview of the text

Download Problem Solving Techniques - Computer Fundamentals - Lecture Slides and more Slides Computer Science in PDF only on Docsity! Contents • Today's Topic: Problem Solving Techniques • We will learn 1. Problem Statement. 2. Algorithm  Types, Example 3. Flowchart  Symbols, Examples. Docsity.com Problem Solving Techniques Docsity.com Algorithm (Contd…): • To find largest of three numbers 1) Start 2) Read 3 numbers: num1, num2, num3 3) if num1 > num2 then go to step 5 4) if num2 > num3 then print num2 is largest else print num3 is largest goto step 6 5) if num1 > num3 then print num1 is largest else print num3 is largest 6) end. Docsity.com Algorithm (Contd…): Example: One of the simplest algorithms is to find the largest number in an (unsorted) list of numbers. High-level description: 1) Assume the first item is largest. 2) Look at each of the remaining items in the list and if it is larger than the largest item so far, make a note of it. 3) The last noted item is the largest in the list when the process is complete. Docsity.com Algorithm (Contd…): Formal description: Written in prose but much closer to the high-level language of a computer program, the following is the more formal coding of the algorithm in pseudo code (find the largest number in an (unsorted) list of numbers) Algorithm LargestNumber Input: A non-empty list of numbers L. Output: The largest number in the list L. 1) largest ← L0 for each item in the list L, do 2) if the item > largest, then 3) largest ← the item 4) return largest Docsity.com Flowchart (Contd…): A set of useful standard Flowchart symbols: • Rounded box use it to represent an event which occurs automatically. • Rectangle or box use it to represent an event which is controlled within the process. Typically this will be a step or action which is taken. • Diamond use it to represent a decision point in the process. • Circle use it to represent a point at which the flowchart connects with another process. Docsity.com ADVANTAGES OF USING FLOWCHARTS: • Communication: Flowcharts are better way of communicating the logic of a system • Effective analysis: Problem can be analyzed in more effective way. • Proper documentation: Flowcharts serve as a good program documentation • Efficient Coding: Flowcharts act as a guide or blueprint during the systems analysis and program development phase. Docsity.com ADVANTAGES OF USING FLOWCHARTS (Contd…): • Proper Debugging: Flowchart helps in debugging process. • Efficient Program Maintenance: The maintenance of operating program becomes easy with the help of flowchart. Docsity.com The flow chart of the if statement: Body of if Docsity.com The flow chart of the if...else statement: Test expression True Body of if Body of else Docsity.com The flow chart of the switch statement: switch variable equals first case constant First case body switch variable equals second case constant Second case body switch variable equals third case constant Third case body Default body ae ® Docsity.com Start Read A, B Is A > B Print A Print B End Yes No Flow Chart to find largest of two numbers: Docsity.com Flowchart to find the largest of three numbers A,B, and C: NO Docsity.com LIMITATIONS OF USING FLOWCHARTS: • Complex logic: Sometimes, the program logic is quite complicated. In that case, flowchart becomes complex and clumsy. • Alterations and Modifications: If alterations are required the flowchart may require re-drawing completely. • Reproduction: As the flowchart symbols cannot be typed, reproduction of flowchart becomes a problem. Docsity.com