Pseudo Code Possibly one of the hardest skills to get to grips with in learning a programming language is developing the ability to take a problem and.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

Procedures and Functions. What are they? They are both blocks of code that can be reused to perform specific task. However there is a difference: Function-
Tutorial 8: Developing an Excel Application
Chapter 2: Modularization
Solving Problems with Repetition. Objectives At the end of this topic, students should be able to: Correctly use a while statement in a C# program Correctly.
The Little man computer
Programming in Visual Basic
Executes a statement or statements for a number of times – iteration. Syntax for(initialize; test; increment) { // statements to be executed } Initial.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Understanding the Mainline Logical Flow Through a Program (continued)
Software Development Unit 6.
Adding Automated Functionality to Office Applications.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 9 Car Payment Calculator Application Introducing the Do While...Loop and Do Until...Loop.
CC0002NI – Computer Programming Computer Programming Er. Saroj Sharan Regmi Week 7.
1 Shawlands Academy Higher Computing Software Development Unit.
1 Lab Session-III CSIT-120 Fall 2000 Revising Previous session Data input and output While loop Exercise Limits and Bounds Session III-B (starts on slide.
New ways of learning week Sign up at: Monday 25 th November Tuesday 26 th November Wednesday 27 th November Thursday.
Spreadsheets in Finance and Forecasting Presentation 8: Problem Solving.
1 Copyright (C) 2008 by Dennis A. Fairclough all rights reserved.
Visual Basic: An Object Oriented Approach 5: Structured Programming.
Chapter 5: Control Structures II (Repetition)
EGR 2261 Unit 5 Control Structures II: Repetition  Read Malik, Chapter 5.  Homework #5 and Lab #5 due next week.  Quiz next week.
Multiple Forms, Container Controls, AddHandler This presentation is based on the Forms and ContainerControls VB Projects 1.
06/10/ Working with Data. 206/10/2015 Learning Objectives Explain the circumstances when the following might be useful: Disabling buttons and.
07/10/ Strings ASCII& Processing Strings with the Functions - Locate (Instr), Mid, Length (Len), Char (ChrW) & ASCII (Asc)
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
By the end of this session you should be able to...
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Introduction to TouchDevelop
Programming Test #1 Solutions. Multiple Choice 1. B) the grammar of the coding language 2. C) String 3. A) Single 4. C) 2Burgers4Me 5. B) Design Time.
Chapter 5: Control Structures II (Repetition). Objectives In this chapter, you will: – Learn about repetition (looping) control structures – Learn how.
CS285 Visual Basic 2 Department of Computing UniS 1 Statements in Visual Basic A statement is the fundamental syntactical element of a program smallest.
Visual Basic Programming
Adding 10 items to a list… lstTest.Items.Add(1) lstTest.Items.Add(2) lstTest.Items.Add(3) lstTest.Items.Add(4) lstTest.Items.Add(5) lstTest.Items.Add(6)
Programming Logic and Design Fourth Edition, Comprehensive Chapter 8 Arrays.
1 Advanced Computer Programming Lab Calculator Project.
COIT29222 Structured Programming 1 COIT29222-Structured Programming Lecture Week 02  Reading: Textbook(4 th Ed.), Chapter 2 Textbook (6 th Ed.), Chapters.
Intermediate 2 Computing Unit 2 - Software Development.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Lesson 1. Security At the menu bar at the top you will see the word Tools. Click your mouse on Tools scroll down to Macro. Move the Mouse over and down.
Scope Lifetime Modules Procedures. Scope? Where can your variables be seen? Where used? Where abused (reseting the value)? Local and Global = Private.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
1 Evaluating the User Experience in CAA Environments: What affects User Satisfaction? Gavin Sim Janet C Read Phil Holifield.
Controlling Program Flow with Decision Structures.
HNC Flow Chart 1 IT Systems Analysis and Design SSADM – Design.
A club in Leicester holds exclusive after party sessions for members only. In order to get into one of the after parties you need to be “on the list”.
Using Workflow With Dataforms Tim Borntreger, Director of Client Services.
BO65: PROGRAMMING ITERATION 1. Starter  Write down what you think the code below outputs on screen: Dim intCounter as integer intCounter = 0 Do while.
SCORE Sequence Choices to be made Once may not be enough Reuse and recycle Evaluate and improve.
Week 1 Lecture 1 Slide 1 CP2028 Visual Basic Programming 2 “The VB Team” Copyright © University of Wolverhampton CP2028 Visual Basic Programming 2 v Week.
Solving Problems with Repetition Version 1.0. Objectives At the end of this topic, students should be able to: Correctly use a while statement in a C#
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
Fundamental Programming Fundamental Programming Data Processing and Expressions.
Macros in Excel Using VBA Time Required – 5 hours.
The Little man computer
COMPUTATIONAL CONSTRUCTS
GC211Data Structure Lecture2 Sara Alhajjam.
Computer Programming.
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
Program Design Introduction to Computer Programming By:
Coding Concepts (Basics)
Problem Solving Designing Algorithms.
Introduction to Repetition
Introduction to Repetition
Presentation transcript:

Pseudo Code Possibly one of the hardest skills to get to grips with in learning a programming language is developing the ability to take a problem and break it down into a sequence of programming commands

If the task is simple … Problem Declare a variable to store the number of students in a class Solution Dim StudentCount as Integer

If the problem is complex... Devise a program that accepts monetary values from payments. The payments represent part payment of money repaid against multiple loans. As the repayments come in, the oldest loan should be paid off first. Once the oldest loan is paid off the next oldest will be paid off, and so on until the most recent loan is paid. Any loans not paid off within an agreed time will require a reminder letter to be generated to the customer. After two reminders legal action will be taken.

Why is it more difficult to code compared to the first example? The problem is complex There is no obvious 1 to 1 relationship between the problem and the code The terminology of the problem is not always clear on the first read and will almost certainly need clarification You may not be sufficiently familiar with the programming language to know where to begin

“Find the SCORE with the problem” Sequence your tasks Choose your options Once may not be enough Recycle and reuse Evaluate and improve

Sequence your tasks We have already seen the code for adding a new swap We shall take another look at it adding a break point to see the code working

Choose your options A good example to see this at work is the login process on default.aspx

Once may not be enough Repetition or looping is an important feature of any programming language To see this working we shall look at the code for the search button on the main page The looping is in the sub procedure ListMySwaps

Recycle and reuse Splitting the code into sections called procedures makes our life a lot simpler Take a look at the sub procedure ManageInterface on the main page Try deleting the sub procedure and see what happens when you run the program Also look at the function procedure LoginValid Note the difference between a sub procedure and a function procedure!

Evaluate and improve Refine and improve means that we go through our logic over and over again until we think we have identified all of the steps. It is rare to get it right on the first attempt

Pseudo Code One big problem when learning a language is that as a novice you will not be familiar with the code to know how to perform certain tasks and what is possible. The best place to start with a coding problem is to write out the steps in your own words.

Code Templates These have been created to help you start thinking about the structure for your code 'Step 1. write a description of what the code will do. 'Step 2. list the inputs 'Step 3. list the outputs 'Step 4. declare variables for inputs run and test 'Step 5. declare variables for outputs run and test go to step 6 'Step 6. assign values to the input variables run and test go to step 7 'Step 8. processing to go here develop and refine 'Step 7. assign output(s) to destination(s) run and test go to step 8

Questions Below is a section of pseudo code for a function that will look up the name of a person making an offer on a swap. Your task is to think about the logic for this task and put the lines of code into the correct order.