Visual Basic Flowcharts October 10, 2007. Turn in your vocabulary words before you leave!

Slides:



Advertisements
Similar presentations
Working With Algorithm and Flowcharts
Advertisements

More on Algorithms and Problem Solving
PROBLEM SOLVING TECHNIQUES
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Flow Control Analysis & Design Tool: Flowcharts
UNIT 2. Introduction to Computer Programming
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
ME 142 Engineering Computation I Fundamentals of Procedural Computer Programming.
Chapter 2 - Problem Solving
Getting Ready for the NOCTI test
CS 240 Computer Programming 1
Fundamentals of Algorithms MCS - 2 Lecture # 4
Flow Chart.
Chapter 2- Visual Basic Schneider
CMT Programming Software Applications Week 3 Dr. Xiaohong Gao TP Room B107 Control Structures.
Programming Fundamentals (750113) Ch1. Problem Solving
Developing logic (Examples on algorithm and flowchart)
The Program Design Phases
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Computer Programming Basics. Computer programs are a detailed set of instructions given to the computer They tell the computer: 1. What actions you want.
Algorithm & Flowchart.
Lecture # 8 ALGORITHMS AND FLOWCHARTS. Algorithms The central concept underlying all computation is that of the algorithm ◦ An algorithm is a step-by-step.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
Computer Programming TCP1224 Chapter 2 Beginning the Problem-Solving Process.
Design the program Create a detailed description of program –Use charts or ordinary language (pseudocode) Identify algorithms needed –Algorithm: a step-by-step.
C++ If….Else Statements and Flowcharts October 10, 2007.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Structural Program Development: If, If-Else Outline.
End Show Writing a computer program involves performing the following tasks. 1. Understanding the problem 2. Developing an Algorithm for the problem 3.
Lecture 2: Logical Problems with Choices. Problem Solving Before writing a program Have a thorough understanding of the problem Carefully plan an approach.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
ALGORITHM List of instructions for carrying out some process step by step. A sequence of instructions which has a clear meaning and can performed with.
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Program Planning and Design. What is Program Planning and Design? Program planning and design is simply knowing what you want to do and how you want to.
Dale Roberts 1 Program Control - Algorithms Department of Computer and Information Science, School of Science, IUPUI CSCI N305.
Program Design BUILDING A HOUSE. Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
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.
1 Lecture 2 Control Structures: Part 1 Selection: else / if and switch.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
WHAT IS THIS? Clue…it’s a drink SIMPLE SEQUENCE CONTROL STRUCTURE Introduction A computer is an extremely powerful, fast machine. In less than a second,
FLOWCHARTING AND ALGORITHMS
Problem Solving Flowcharts. Flowcharts Introduction  Flowcharts allow us to create a visual representation of a solution to a problem DRAW  With flowcharts,
Algorithms and Flowcharts
Chapter 3 Structured Program Development in C C How to Program, 8/e, GE © 2016 Pearson Education, Ltd. All rights reserved.1.
GC101 Introduction to computers and programs
Chapter 2- Visual Basic Schneider
FLOWCHARTS.
Computer Programming Flowchart.
Understand Problem Solving Tools to Design Programming Solutions
Introduction To Flowcharting
2.0 Problem Solving PROGRAM DESIGN
Programming Fundamentals
Lecture 2: Logical Problems with Choices
Program Control using Java - Theory
(Course Introduction)
Computers & Programming Languages
Chapter 2- Visual Basic Schneider
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Introduction to Programming
Basic Concepts of Algorithm
Structural Program Development: If, If-Else
Presentation transcript:

Visual Basic Flowcharts October 10, 2007

Turn in your vocabulary words before you leave!

Algorithms: Is a finite sequence of effective statements that, when applied to the problem, will solve it! An effective statement is a clear, unambiguous instruction that can be carried out. Each algorithm you develop should have a specific beginning; at the completion of one step, have the next step uniquely determined; and have an ending that is reached in a reasonable amount of time.

Example: “Rise-and-shine algorithm” Problem: A student getting out of bed and going to school.

What is the algorithm? 1. Get out of bed. 2. Take off pajamas. 3. Take a shower. 4. Get dressed. 5. Eat breakfast. 6. Carpool to school/Take a bus.

Another one: Watching Television 1. Sit down on the sofa. 2. Pick up the remote control. 3. Point the remote control at the television. 4. Press the Power button on the remote control. 5. Wait a few seconds for the television to warm up. 6. Do you like the program? If so, go to step You do not like the program – press the Next Channel button on the remote control. 8. Got to step Put the remote control on the coffee table. 10. Relax.

Pseudocode: Step-by-step set of instructions that are very similar to computer programming instructions. Written in every day English. Helps programmers develop algorithms. User friendly. They are the steps on how to solve the problem. They can be converted in computer code.

Lets translate our Television-watching steps into pseudo-code. Begin task: Watching Television. 1. Sit down on the sofa. 2. Pick up the remote control. 3. Point the remote control at the television. 4. Press the Power button on the remote control. 5. Wait a few seconds. 6. Do you like the program? a. Yes. Go to step 9. b. No. Go to step Press the Next Channel button on the remote control. 8. Go to step Put the remote control on the coffee table. 10. Relax. End task: Watching Television.

Flowcharts! Is a graphical representation of an algorithm or of a portion of an algorithm. Are drawn using certain special-purpose symbols such as rectangles, diamonds, ovals, and small circles. These symbols are connected by arrows called flowlines. Are useful for developing and representing algorithms. Clearly show how control structures operate.

Lets look at the symbols! Rectangle Also called an Action symbol. Indicates any type of action. Examples: a calculation or an input/output operation. Action 1 Action 2 Action 3 EXAMPLEEXAMPLE

Flowline Symbol: The lines connect other symbols, and the arrowheads are mandatory only for right-to-left and bottom-to-top flow.

Oval Symbol: Represents the beginning, the end, or a point of interruption or delay in a program.

Connector Symbol: Represents any entry from, or exit to, another part of the flowchart. Also serves as an off-page connector.

Decision Symbol: Represents a decision that determines which of a number of alternative paths is to be followed.

Let’s turn our Pseudocode for watching television into a flowchart! Start 1 Sit down on Sofa 2 Pick up Remote 3 Point Remote 4 Press Power 5 Wait Y N Go to Step 9Go to step 7 Stop 7 Press next channel 8 Go to 5 9 Put remote down 10 Relax 6 Do you like the program ?

Homework: Develop a pseudocode and flowchart for the following. Pick one! Your choice. 1. On a sheet of paper, draw a square of a specific size. 2. Get a drink of water. 3. Make a phone call.