Output “Funds not available”

Slides:



Advertisements
Similar presentations
Chapter 4: Requirements Engineering
Advertisements

Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
SWE 214 (071) Use Case Diagrams Slide 1 Use Case Diagrams Examples.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
S.M.A.T.E. Serving Money Around The Earth The Revolutionary ATM Irvin Shen, Juan Favela, Sam Ammons, and Christopher Leonardi.
Computer Science 1620 Programming & Problem Solving.
Dynamic Black-Box Testing Part 2
Merijn Benjamin Christina
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
SFWR ENG 3KO4 Software Development Fall 2009 Instructor: Dr. Kamran Sartipi Software Requirement Specification (SRS) for the Automated Banking Machine.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
1 Boolean Expressions to Make Comparisons Boolean expression –Represents only one of two states –Expression evaluates to either true or false Expressions.
30/10/ Iteration Loops Do While (condition is true) … Loop.
Flowcharts and Algorithms. Review of Terms  A computer is a machine that can represent and manipulate data –Ultimately the data and the instructions.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
The Hashemite University Computer Engineering Department
An Object-Oriented Approach to Programming Logic and Design Chapter 5 Making Decisions.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
 Problem Analysis  Coding  Debugging  Testing.
Programming revision Revision tip: Focus on the things you find difficult first.
AS Level Computing 8 CHAPTER: Fundamentals of structured programming The basics of good programming Algorithms System Flow Charts Symbol Conventions Steps.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. 4 Simple Flow of Control.
DEVRY CIS 170 C I L AB 2 OF 7 D ECISIONS Check this A+ tutorial guideline at decisions For.
Chapter One Problem Solving
Component 1.6.
ALGORITHMS AND FLOWCHARTS
Understand Problem Solving Tools to Design Programming Solutions
Lesson Objectives Aims To be able to write an algorithm in Pseudo Code
Using Use Case Diagrams
A451 Theory – 7 Programming 7A, B - Algorithms.
Paul Ammann & Jeff Offutt
2016 Resource - FG Trustee Voids
Storyboarding and Game Design SBG, MBG620 Full Sail University
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Exercices & Corrections Week 3
Algorithms and Flowcharts
Chapter 5: Control Structure
Teaching design techniques to design efficient solutions to problems
Lecture 4 - Loops UniMAP EKT120 Sem 1 08/09.
Lecture 2 Introduction to Programming
Introduction To Flowcharting
REPETITION STATEMENTS
Unit 2.3 Robust Programs Lesson 2 - Testing Programs
Programming Fundamentals
Lecture 07 More Repetition Richard Gesick.
Selection By Ramin && Taimoor
Loop Control Structure.
Program Design Introduction to Computer Programming By:
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Paul Ammann & Jeff Offutt
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Do While (condition is true) … Loop
Coding Concepts (Basics)
If selection construct
Chapter 5: Control Structure
Using Use Case Diagrams
Chapter 3: Selection Structures: Making Decisions
Boolean Expressions to Make Comparisons
Flowcharts and Pseudo Code
ICT Gaming Lesson 2.
Chapter 3: Selection Structures: Making Decisions
Developing a Program.
Basic Concepts of Algorithm
UMBC CMSC 104 – Section 01, Fall 2016
Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator
Module 4 Loops and Repetition 9/19/2019 CSE 1321 Module 4.
Presentation transcript:

Output “Funds not available” Thinking Logically Identify the points in a solution where a decision has to be taken Identify the points in this program where a decision has to be taken. Give an example of code (language of your choice) that would implement this Flow Diagram. While Pin= False: Pin = input(“Please enter Pin”) Check Pin Pin = False Else: amount = input(“Enter amount:”) Pin = True …… etc Is PIN correct Input Card Start Stop Input PIN Enter amount Check PIN Check funds available Are funds available? Activate speaker Output cash Print receipt Update balance NO YES Output confirmation Output “Funds not available” YES

Thinking Logically Identify the points in a solution where a decision has to be taken In a unit 2 exam, you will need to be able to identify the points in a pseudocoded problem where a decision has to be taken. Throughout the course you have been programming to prepare for this. In this activity you need to choose at least 3 programs you have written. Using the table on the following slide identify the various points in your solutions where your program had to make a decision. Make sure to choose a variety of different programs

Decision points in solution Thinking Logically Identify the points in a solution where a decision has to be taken Title of program What does it do? Decision points in solution National_lottery_sim Program which simulates the national lottery draw by producing 6 random numbers when ENTER is pressed DECISION POINT 1: Has ENTER been pressed DECISION POINT 2: Has the random generated number already been picked DECISION POINT 3: Have 6 unique numbers been drawn Card Machine Balance Program that checks a balance in a account and allows a customer to withdraw money from that amount Decision 1: Is amount smaller than 250? Greatest Number Program that allows two numbers to be picked and displays the larger one Decision 1: Is number 1 greater than number 2? Water Temperature Allows a temperature to be entered and shows whether the water is boiling, frozen or normal Decision 1 : Is the temperature less than zero? Decision 2: Is the temperature more than a hundred?

Output “Funds not available” Thinking Logically Determine the logical conditions that affect the outcome of a decision Determine the various logical conditions that affect the outcome of the decision points in this program. Is PIN correct Input Card Start Stop Input PIN Enter amount Check PIN Check funds available Are funds available? Activate speaker Output cash Print receipt Update balance NO YES Output confirmation Output “Funds not available”

Thinking Logically Determine the logical conditions that affect the outcome of a decision In a unit 2 exam, you will need to be able to determine the various logical conditions that affect the outcome of a decision based on pseudocoded examples. Throughout the course you have been programming to prepare for this. In this activity you need to choose at least 3 programs you have written. Using the table on the following slide identify the various logical conditions that affect the outcome of decisions in your program. Make sure to choose a variety of different programs

Thinking Logically Determine the logical conditions that affect the outcome of a decision Title of program What does it do? Logical conditions National_lottery_sim Program which simulates the national lottery draw by producing 6 random numbers when ENTER is pressed IF (ENTER has been pressed) THEN… IF (New_num_generated == Any previous selected numbers) THEN… REPEAT UNTIL (Total_unique_num_generated = 6)…

Output “Funds not available” Thinking Logically Determine how decisions affect flow through a program Explain how the decisions being made in this program would affect the flow through the program. If the Pin is incorrect multiple times then the program will take longer to finish, and will keep going in circles until the Pin is correct. If the amount is also wrong it will do the same thing, display an error and circle back around so that it can be entered again. The program would only be most efficient in time-wise if both the Pin and the Amount were valid. Is PIN correct Input Card Start Stop Input PIN Enter amount Check PIN Check funds available Are funds available? Activate speaker Output cash Print receipt Update balance NO YES Output confirmation Output “Funds not available”

Thinking Logically Exam style question Procedure take from stack(old,item) If pointer = minimum Then Stack_empty = True Else pointer = pointer – 1 stack[pointer] = old,item Endif End Procedure Maximum ‘If pointer = maximum Then’ checks if the pointer is full or not.