Lab #6 Program Design.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

What is an Algorithm? An algorithm is a well-developed, organized approach to solving a complex problem.
PROBLEM SOLVING TECHNIQUES
Introduction to Flowcharting
Introduction to Flowcharting
Introduction to Flowcharting
Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Published by Addison-Wesley.
Using Flowcharts. Sample Flowchart (without text) 2.
Reference :Understanding Computers
ME 142 Engineering Computation I Fundamentals of Procedural Computer Programming.
Fundamentals of Algorithms MCS - 2 Lecture # 4
CS1010 Programming Methodology
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
Flowcharts So let’s say we want to express the following algorithm to print out the sum of the biggest and smallest of three numbers.
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials File Handling.
Flow Charting, Structured English and PseudoCode
Tutorial #7 Flowcharts (reprise) Program Design. Introduction We mentioned it already, that if we thing of an analyst as being analogous to an architect,
Flow Charting Damian Gordon. Introduction We mentioned it already, that if we thing of an analyst as being analogous to an architect, and a developer.
Chapter 2- Visual Basic Schneider
1 CSI 101 Elements of Computing Fall 2009 Lecture #4 Using Flowcharts Monday February 2nd, 2009.
1 Lab Session-3 CSIT221 Spring 2003 b Group Worksheet 3 Exercise (Demo Required) b No new lab demo will be assigned to allow you to focus on HW#1.
Program design example Task: Develop an algorithm expressed in pseudocode for a specified problem specified problem.
Here is a list of citations the database retrieved for us. To find out more about an article, click on the “complete reference” link.
Developing logic (Examples on algorithm and flowchart)
Finite probability space set  (sample space) function P:  R + (probability distribution)  P(x) = 1 x 
Chapter 3 Planning Your Solution
Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1.
(C)opyright 2003 Scott/Jones Publishers Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Scott/Jones Publishers.
Algorithm & Flowchart.
1 Project 5: Median. 2 The median of a collection of numbers is the member for which there are an equal number less than or equal and greater than or.
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
Selection: IF Statement Damian Gordon. adsdfsdsdsfsdfs dsdlkmfsdfmsdl kfsdmkfsldfmsk dddfsdsdfsd.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
Flowcharts! January 13, 2005 These are today’s notes! Do you think we will get more snow?
End Show Writing a computer program involves performing the following tasks. 1. Understanding the problem 2. Developing an Algorithm for the problem 3.
Introduction to Computers (L02) * Hardware * Software * Programming Languages * Three Phase of Program Development * Development and Design Steps * Algorithms.
The DSpace Course Module – Item submission workflows.
May 2, 2013 An introduction to DSpace. Module 9 – Item submission workflows By the end of this module, you will … Understand the purpose of workflows.
Practice and Evaluation. Practice Develop a java class called: SumCalculator.java which computes a sum of all integer from 1 to 100 and displays the result.
PSEUDOCODE C Programming Technique – Firdaus-Harun.com.
Programming at a high level. Developing a Computer Program Programmer  Writes program in source code (VB or other language) Compiler  Converts source.
ITI 1120 Lab #5 Contributors: S. Boyd, R. Plesa, A. Felty, D. Inkpen, A. Williams, D. Amyot.
(C)opyright 2000 Scott/Jones Publishers Introduction to Flowcharting.
Use Flowchart modeling to design and create an interactive quiz to be run on Powerpoint. Start Question Click to start the quiz Correct Incorrect, try.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Structured Programming (4 Credits)
Programming Fundamentals I Java Programming Spring 2009 Instructor: Xuan Tung Hoang TA: Tran Minh Trung Lab 03.
Problem, Problem Solving, Algorithm & Flow Charts –Part 1 Presented By Manesh T Course:101 CS 101CS Manesh T1.
1 Introduction to Flowcharting Computer Science Principles ASFA.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Learning Objective To be able to… Understand flow chart symbols Complete and correct flow chart algorithms Create a program based on a flow chart.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
MyCLSS v.2 Critical Issues and Amend Checklist. Critical Issue After receiving final returns, SGB staff will perform a review according to a list of critical.
ALGORITHMS AND FLOWCHARTS
Problem , Problem Solving, Algorithm & Flow Charts –Part 1
Computer Programming Flowchart.
Introduction To Flowcharting
Introduction to Flowcharting
PROBLEM SOLVING CSC 111.
Structured Program Design
MSIS 655 Advanced Business Applications Programming
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
Introduction to Programming
Developing a Program.
Introduction to Flowcharting
Presentation transcript:

Lab #6 Program Design

Lab #6 You are presented with six exercises where you have to fill-in-the-blanks. For each exercise you are presented with a flowchart with some blank boxes, and on the following page a number of potential answers are provided, including the correct answers. In the Word document you have all your labs and tutorials in: PROGRAM-DESIGN-PORTFOLIO.DOC (or .DOCX) add in the screengrabs from this. Now e-mail your document to Damian.Gordon@dit.ie with a subject heading of PROGRAM DESIGN LAB #6 and in the message of your e-mail please let me know your full name, your student number, the name of your programme, the programme code, the name of the module, the year you are in (first year), and your assignment. PLEASE NOTE: If you do not have the correct subject heading on your e-mail, or the correct filename, your submission WILL be rejected.

Symbols Decision Terminal Input/Output Operation Connector Module Process Module

Exercise #1 We want to create a flowchart that prints out double the number of the inputted value. On the next slide is a flowchart with some blacked out boxes. On the following slide is a number of potential boxes you could use to correctly implement the algorithm. Copy and paste the boxes into the flowchart.

START END

Copy and paste them into the previous slide. Pick the appropriate three of the following boxes that describe the algorithm as described. Copy and paste them into the previous slide. Read in A B = A*2 Print A Read in B B = A / 2 Print B Read in C B = A + 2 Print C

Exercise #2 We want to create a flowchart that reads in a number, and checks if it is odd or even. On the next slide is a flowchart with some blacked out boxes. On the following slide is a number of potential boxes you could use to correctly implement the algorithm. Copy and paste the boxes into the flowchart.

START END No Read in A Yes

Does A/2 give a remainder? Pick the appropriate three of the following boxes that describe the algorithm as described. Copy and paste them into the previous slide. Is A > B? Read B Print “It’s Even” Does A/2 give a remainder? Print “It’s Odd” Print A /2 Is A = = B? Read C Print “I dunno”

Exercise #3 We want to create a flowchart that prints out the biggest of three inputted numbers. On the next slide is a flowchart with some blacked out boxes. On the following slide is a number of potential boxes you could use to correctly implement the algorithm. Copy and paste the boxes into the flowchart.

START END A>B? No Read in A, B and C Yes

Copy and paste them into the previous slide. Pick the appropriate three of the following boxes that describe the algorithm as described. Copy and paste them into the previous slide. B<C? B>C? Print A A<C? A>C? Print B A<B? A>B? Print C

Exercise #4 We want to create a flowchart that prints out the word “Honour” is the number input is 70, if the number is less than 40 print out the word “Fail”, otherwise print out the word “Pass”. On the next slide is a flowchart with some blacked out boxes. On the following slide is a number of potential boxes you could use to correctly implement the algorithm. Copy and paste the boxes into the flowchart.

START END No Read in A Yes

Copy and paste them into the previous slide. Pick the appropriate three of the following boxes that describe the algorithm as described. Copy and paste them into the previous slide. A < 70? A > 70? Print “Honour” A < 40? A > 40? Print “Fail” A > Pass? A > Honour? Print “Pass”

Exercise #5 We want to create a flowchart that prints out the average value of five numbers input in. On the next slide is a flowchart with some blacked out boxes. On the following slide is a number of potential boxes you could use to correctly implement the algorithm. Copy and paste the boxes into the flowchart.

START END No A = 1 Yes Total = 0 A = A + 1

Copy and paste them into the previous slide. Pick the appropriate three of the following boxes that describe the algorithm as described. Copy and paste them into the previous slide. Is A==6? Is A==5? Is A==0? Print Total Print Total / 5 Print Total++ Total = X Total = Total Total = Total + X Read in A Read in Total Read in X

Exercise #6 We want to create a flowchart that allows a user to input a number and the program checks if that number is an element in an array, if it is we print “Found”, if not we print “Not Found”. On the next slide is a flowchart with some blacked out boxes. On the following slide is a number of potential boxes you could use to correctly implement the algorithm. Copy and paste the boxes into the flowchart.

START END No Read in A Yes

Copy and paste them into the previous slide. Pick the appropriate three of the following boxes that describe the algorithm as described. Copy and paste them into the previous slide. Current = First Item Current = Next Item Current = Last Item Current == A? Current == Middle? Current == EndofList? Print “Maybe Found” Print “Not Found” Print “Found”