Learning Intention I will learn about evaluating a program.

Slides:



Advertisements
Similar presentations
Computing Science Software Design and Development SOFTWARE DESIGN AND DEVELOPMENT USING PYTHON.
Advertisements

P5, M1, D1.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 03.
CH07: Writing the Programs Does not teach you how to program, but point out some software engineering practices that you should should keep in mind as.
1 Shawlands Academy Higher Computing Software Development Unit.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
BTEC Unit 06 – Lesson 08 Principals of Software Design Mr C Johnston ICT Teacher
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
The Software Development Process
Documentation and Style. Documentation and Comments  Programs should be self-documenting.  Use meaningful variable names.  Use indentation and white.
Intermediate 2 Computing Unit 2 - Software Development.
The Hashemite University Computer Engineering Department
31/01/ Selection If selection construct.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
C OMPUTER P ROGRAMMING 1 Input and Variables. I/O S TATEMENTS : I NPUT & V ARIABLES Input is the term used to describe the transfer of information from.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Software Design and Development Development Methodoligies Computing Science.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. 4 Simple Flow of Control.
Unit 2 Technology Systems
Component 1.6.
IE 8580 Module 4: DIY Monte Carlo Simulation
Outline lecture Revise arrays Entering into an array
COMPUTATIONAL CONSTRUCTS
Data Types Variables are used in programs to store items of data e.g a name, a high score, an exam mark. The data stored in a variable is entered from.
Lecture 1 Introduction Richard Gesick.
Key Ideas from day 1 slides
Visual Basic 6 (VB6) Data Types, And Operators
GC211Data Structure Lecture2 Sara Alhajjam.
ALGORITHMS AND FLOWCHARTS
Worked Examples - Incremental Software Development Worked Example
Programming the Web using XHTML and JavaScript
Learning Intention I will learn about the iterative software development process with a focus on the Design stage.
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Starter Question In your jotter write the pseudocode to take in two numbers, add them together then display the answer. Declare variables RECEIVE firstNumber.
Algorithm and Ambiguity
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 2 Applications and Data.
Chapter 10 Programming Fundamentals with JavaScript
PROGRAMMING METHODOLOGY
Algorithms & Pseudocode
CISC101 Reminders Quiz 1 grading underway Assn 1 due Today, 9pm.
Chapter 4 Loops While loop The for loop do… while break and continue
If selection construct
The while Looping Structure
Program Documentation
If selection construct
Introduction to Problem Solving and Control Statements
Chapter 6: Repetition Statements
Nested Loops & The Step Parameter
Program Design Language (PDL)
Learning Intention I will learn about programming using selection (making choices) with one condition.
Software Development Process
No Yes START Do you live in Scotland? Take umbrella See last Flowchart
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
CMPE212 – Reminders The other four assignments are now posted.
A Level Computer Science Exam Technique
CISC101 Reminders All assignments are now posted.
Class 4: Repetition Pretest Posttest Counting Flowchart these!
Tonga Institute of Higher Education IT 141: Information Systems
Learning Intention I will learn how to use an array to store data in a program.
To understand what arrays are and how to use them
Tonga Institute of Higher Education IT 141: Information Systems
Developing a Program.
Learning Intention I will learn about selection with multiple conditions.
Learning Intention I will learn about the different types of programming errors.
Perl Programming Dr Claire Lambert
Creating Maintainable code
Learning Intention I will learn about the standard algorithm for input validation.
The while Looping Structure
The IF Revisited A few more things Copyright © Curt Hill.
Creating readable code
Presentation transcript:

Learning Intention I will learn about evaluating a program.

Analysis Design Implementation Testing Documentation Evaluation

Program Evaluation There are four areas to consider when evaluating a program: Fitness for purpose Efficient use of coding constructs Robustness Readability

Fitness for Purpose Software that is fit for purpose - has passed it’s testing (so it’s correct) - meets all the requirements (does what it was supposed to do)

Efficiency A program can be written in many different ways and do what it is expected to do Software that is efficient uses the most efficient programming constructs to solve a problem

How could this be made more efficient? DECLARE total INITIALLY 0 RECEIVE number FROM KEYBOARD SET total TO total + number SEND total TO DISPLAY

Using repetition (loops) can greatly reduce code DECLARE total INITIALLY 0 FOR index FROM 1 TO 4 DO RECEIVE number FROM KEYBOARD SET total TO total + number END FOR SEND total TO DISPLAY Using repetition (loops) can greatly reduce code

How could this be made more efficient? DECLARE total INITIALLY 0 RECEIVE number1 FROM KEYBOARD RECEIVE number2 FROM KEYBOARD RECEIVE number3 FROM KEYBOARD RECEIVE number4 FROM KEYBOARD RECEIVE number5 FROM KEYBOARD SET total TO number1 + number2 + number3 + number4 + number5 SEND total TO DISPLAY

Using arrays can greatly reduce code DECLARE number AS REAL INITIALLY [] FOR counter FROM 1 TO 4 DO RECEIVE number(counter) FROM KEYBOARD SET total TO total + number(counter) END FOR SEND total TO DISPLAY Using arrays can greatly reduce code

How could this be made more efficient? IF mark < 50 THEN SET grade TO D END IF IF mark >= 50 AND mark <= 59 THEN SET grade TO C IF mark >= 60 AND mark <= 69 THEN SET grade TO B IF mark >= 70 THEN SET grade TO A Always does all 4 comparisons

Does 1, 2 or 3 comparisons depending on the value of mark IF mark < 50 THEN SET grade TO D ELSE IF mark >= 50 AND mark <= 59 THEN SET grade TO C ELSE IF mark >= 60 AND mark <= 69 THEN SET grade TO B ELSE SET grade TO A END IF Does 1, 2 or 3 comparisons depending on the value of mark

Using IF .. ELSE IF … ELSE is more efficient than IF … END IF, IF … END IF

Robustness A program is robust if it does not crash, even when it is given invalid input. A robust program will not have any execution errors. A robust program should reject invalid data.

Readability Readability means how easy your code is for another programmer to read.

Readability – White Space Using white space means the code is spaced out to make it easier to read.

White space

Readability - Indentation Indentation is moving code right a few spaces from the start of the line. (VB does this for you automatically). Using indentation makes it easier to see the code inside different constructs.

Readability - Indentation

Readability – Meaningful Identifiers Using meaningful identifiers means using names for objects (TextBoxes, ListBoxes, Buttons etc) and variables which help to describe the information they hold.

Readability - Meaningful Identifiers

Readability - Meaningful Identifiers

Readability – Internal Commentary Internal commentary is comments you add to your program to help explain what the program is doing. e.g. - why use the variable types you did - why that kind of loop - what the IF statement is trying to decide - etc.

Readability – Internal Commentary

Complete the Program Evaluation questions. In your jotter Complete the Program Evaluation questions.

I can evaluate a program in terms of: Success Criteria I can evaluate a program in terms of: Efficiency Readability Robustness Fitness for purpose