Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 100 Introduction to Computing Seminar September 21, 2015.

Similar presentations


Presentation on theme: "CS 100 Introduction to Computing Seminar September 21, 2015."— Presentation transcript:

1 CS 100 Introduction to Computing Seminar September 21, 2015

2 Let's Review the Homework

3 What Can a Computer Do? 1.A computer can receive or accept data (input) 2.A computer can store data in a memory device 3.A computer can perform arithmetic operations/instruction and data manipulation operations/instructions 4.A computer can select one of some number of alternatives based upon some decision criteria 5.A computer can repeat a group of operations/instructions 6.A computer can output information

4 What Are The Steps In Developing a Program? 1.Determine the desired output(s) 2.Determine the necessary input(s) 3.Develop an algorithm A.Select the ordered, atomic steps necessary to transform the necessary input(s) into the desired outputs B.Check the algorithm by hand for correctness 4.Use the algorithm to guide development of source-code using a programming language (we will use C) A.Test and troubleshoot every algorithmic step B.Document (comment) as source-code is being developed 5.Test and troubleshoot the entire program

5 Designing a Program Programs must be designed before they are written Program development cycle:  Design the program  Write the code  Correct syntax errors  Test the program  Correct logic errors

6 Designing a Program (cont’d.) Design is the most important part of the program development cycle Understand the task that the program is to perform  Work with customer to get a sense what the program is supposed to do  Ask questions about program details  Create one or more software requirements

7 Designing a Program (cont’d.) Determine the steps that must be taken to perform the task  Break down required task into a series of steps  Create an algorithm, listing logical steps that must be taken Algorithm: set of well-defined logical steps that must be taken to perform a task

8 Pseudocode Pseudocode: fake code  Informal language that has no syntax rule  Not meant to be compiled or executed  Used to create model program No need to worry about syntax errors, can focus on program’s design Can be translated directly into actual code in any programming language

9 Flowcharts Flowchart: diagram that graphically depicts the steps in a program  Ovals are terminal symbols  Parallelograms are input and output symbols  Rectangles are processing symbols  Symbols are connected by arrows that represent the flow of the program

10

11 Problem Solving Acording to George Polya 1.Understand the problem (and the audience) Are you building a chair? Need directions to a location? Making popcorn? Trying to solve a puzzle? 2.Devise a plan Is this similar to something else? Who is the audience for the solution? What are the required steps (need gruesome detail)?

12 Problem Solving According to George Polya 3.Carry out the plan (implement) Does it work? Is each step correct? Necessary? 4.Is the solution accurate? (Correct?) Will it always lead to a solution?

13 Let's Talk About Algorithms An algorithm is an ordered set of unambiguous, atomic, executable steps, defining a terminating process. –[1] an ordered set? –[2] unambiguous? –[3] atomic? –[4] executable steps? –[5] defining a terminating process?

14 Why Are Algorithms Important? Easier to understand what is to be accomplished Easier to find errors and fix them Algorithms are independent of H/W and S/W Algorithms guide our "program development" because they act as a detailed guide or blueprint or GPS guided roadmap http://userpages.wittenberg.edu/bshelburne/Comp150/Algorit hms.htm

15 Let's Develop Some Algorithms

16 Pseudocode Pseudocode: http://www.minich.com/education/wyo/stylesheets/pseudo code.htm http://www.wiley.com/college/busin/icmis/oakman/outline /chap05/slides/pseudo.htm http://www.unf.edu/~broggio/cop2221/2221pseu.htm http://userpages.wittenberg.edu/bshelburne/Comp150/Alg orithms.htm


Download ppt "CS 100 Introduction to Computing Seminar September 21, 2015."

Similar presentations


Ads by Google