Computer Programming I Summer 2011

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

PROBLEM SOLVING TECHNIQUES
Chapter 1 - VB 2008 by Schneider1 Chapter 1 - An Introduction to Computers and Problem Solving 1.1 An Introduction to Computers 1.2 Windows, Folders, and.
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Repetition Control Structures School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 9, Friday 3/07/2003)
PSEUDOCODE & FLOW CHART
Creating Flowcharts Principles Of Engineering
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Reference :Understanding Computers
Chapter 2 - Problem Solving
Session Objectives# 24 COULD code the solution for an algorithm
Fundamentals of Algorithms MCS - 2 Lecture # 4
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
Basics of Computer Programming Web Design Section 8-1.
Chapter 2- Visual Basic Schneider
Program Design and Development
Developing logic (Examples on algorithm and flowchart)
Chapter 3 Planning Your Solution
ALGORITHMS AND FLOWCHARTS
CSC103: Introduction to Computer and Programming
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
DCT 1123 Problem Solving & Algorithms
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
Introduction to Programming Design School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 1, Friday 01/17/2003) (Continued)
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
Flowcharts.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
Programming at a high level. Developing a Computer Program Programmer  Writes program in source code (VB or other language) Compiler  Converts source.
Flowcharts and Algorithms. Review of Terms  A computer is a machine that can represent and manipulate data –Ultimately the data and the instructions.
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
Flowcharting & Algorithms. Quick. Close your Eyes and Listen You are still sitting in the classroom. However, you have been called to the counselor’s.
Flowcharting An Introduction. Definition A flowchart is a schematic representation of an algorithm or a process.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Structured Programming (4 Credits)
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Algorithms and Pseudocode
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Algorithms and Flowcharts
Learning outcomes 5 Developing Code – Using Flowcharts
Understand Problem Solving Tools to Design Programming Solutions
GC101 Introduction to computers and programs
FLOWCHARTS Part 1.
Basics of Computer Programming
Chapter 2- Visual Basic Schneider
Understand Problem Solving Tools to Design Programming Solutions
Introduction To Flowcharting
Basics of Computer Programming
Basics of Computer Programming
Basics of Computer Programming
Programming Logic n Techniques
Programming Fundamentals
Creating Flowcharts AIM:
ALGORITHMS AND FLOWCHARTS
Problem-Solving and Control Structures By Faith Brenner
ALGORITHMS AND FLOWCHARTS
Computational Thinking for KS3
Chapter 2- Visual Basic Schneider
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Problem-Solving and Control Structures By Faith Brenner
Introduction to Programming
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Programming Logic and Design Eighth Edition
Presentation transcript:

Computer Programming I Summer 2011 Objective 3.01 Apply Procedures to Develop Flowcharts and Pseudocode (3%) Computer Programming I Summer 2011

Computer Programming I Summer 2011 Objectives 3.01 and 3.02 Computer Programming I Summer 2011

Objective/Essential Standard Essential Standard 3.00Apply Programming Logic Indicator 3.01 Apply procedures to develop flow-charts and pseudocode. (3%)

Teacher Notes This PowerPoint was developed with examples from Visual Basic 2010 and C#. Any coding samples will be provided in both languages as supported. Only show the slides the correspond to the language you are teaching. While the .Net framework promotes common features among languages- not all features work in both VB and C#. Differences will be noted for teachers.

Flowcharts Flowcharts help the programmer begin to plan the programming project. They provide a visual representation of how the data should flow. They describe the inputs, processes and outputs of the program that are needed to successfully complete the project.

Flowchart Symbols There are many flowchart programs, however you can also use Microsoft Word to create a flowchart – or just a piece of paper and a pencil. To create the flowchart, there are different symbols that represent the various parts. We will only use a few of these symbols. Use lines with arrows to indicate data flow direction.

Flowchart Symbols Start should always be the first shape, with a Stop at the end of the flow chart. Start/Stop Input/Output This shape is used to show raw materials used for ‘ingredients’ and to show the finished product. Processes Start should be used to show processes/procedures, eg. ‘Bake Cake’ Decisions Start should be used to show where the flowchart can divide into two options.

Input Process A Input Process B Output Start Stop Used for Start & Stop Start Used for inputs – raw materials Examples: Cake Ingredients Plastic, metal Input Process A Used for all processes Examples: Bake cake Review music choices Build wheels Input Process B Output Used for outputs – finished product Examples: Finished cake Car door Stop

Input Process A Process B Process C Output Start Stop If Process A Used for Start & Stop Start Used for inputs – raw materials Examples: Cake Ingredients Plastic, metal Input If Process A True (yes) False (no) Used for decision making - Questions Used for all processes Examples: Bake cake Review music choices Build wheels Process A Process B Process C Used for outputs – finished product Examples: Finished cake Car door Output Stop

NO PROCESSES ALLOWED HERE!!!! Used for Start & Stop Start Used for inputs – raw materials Examples: Cake Ingredients Plastic, metal Input DOWHILE Question (T or F) False (no) Used for decision making - Questions NO PROCESSES ALLOWED HERE!!!! Exit only True (yes) Process A Process B ENDDO Used to show where loop stops – required. Stop

Using Microsoft Word to Create a Flowchart Open Microsoft Word. Under Insert choose Shapes Look down the list until you see Flowchart. Hoover your mouse over a shape, you will see a popup telling you what that shape is used for.

Using Microsoft Word to Create a Flowchart Select and draw the shapes needed for your program logic. Once you draw a shape you can right click and select Add Text to enter information into your symbol. Join your symbols using arrows indicating program data flow.

Pseudocode The text in your flowchart symbols is your pseudocode. Pseudocode is a mix of English language and code that represents what you want your program to do. It helps you determine how you want the program to work as well as what variables and methods/functions you will want to include. Developing pseudocode will help you work through your logic, reducing the number of errors and potential re-writes you will have to do.

Pseudocode Example Proceed down Main Street for two miles Turn left on Ocean Drive, Proceed on Ocean Drive for three blocks, to the fork. IF left turn at fork is blocked THEN Take a right turn at the fork onto Eagle Street… ELSE At the fork, take Swan Street to the left. Proceed two blocks. House is second on the left. (246 Swan Street.) ENDIF

Example Start Proceed down hall Proceed down hall Turn left at first intersecting hallway IF hungry THEN Turn right into the cafeteria ELSE Continue to classroom ENDIf Turn left at first intersecting hallway Hungry? Turn right into cafeteria Continue to classroom Stop

Objective 3.02 Understand Algorithms (3%) Computer Programming I Summer 2011

Objective/Essential Standard Essential Standard 3.00Apply Programming Logic Indicator 3.02 Understand Algorithms (3%)

Algorithm An algorithm is a list of steps to solve a problem. In programming, it will be a list of steps used to successfully accomplishment your programming task. Your algorithm is not only going to tell your program what to do but how to do it.

Algorithm Example – Going Home The Walk Algorithm Leave classroom Turn right out of school building Walk 1.2 miles Turn right on street Go to 4th house The Bus Algorithm Go to the bus area Get in right bus Go to house

Algorithms Both algorithms, and others that accomplish the same task (of getting you home). There are advantages and disadvantages associated with each option. You have to consider each option and its advantages/disadvantages before you choose the algorithm you want to continue developing into your program.

Conclusion This PowerPoint provided an overview of creating flowcharts. Next step is to practice with sample programs the skilled students have learned! The Unpacked Content will provide some sample programs.