Introduction – “Writing A Program”

Slides:



Advertisements
Similar presentations
Chapter 2 - Problem Solving
Advertisements

Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
Academic Advisor: Prof. Ronen Brafman Team Members: Ran Isenberg Mirit Markovich Noa Aharon Alon Furman.
PRE-PROGRAMMING PHASE
The Fundamentals: Algorithms, the Integers & Matrices.
Writing a Program Chapter 1. Introduction We all “start” by learning how to code in some programming language. –With a small, hypothetical, and fairly.
PYTHON PROGRAMMING Week 10 – Wednesday. TERMS – CHAPTER 1 Write down definitions for these terms:  Computation  Computability  Computing  Artificial.
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
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.
Introduction to Computers (L02) * Hardware * Software * Programming Languages * Three Phase of Program Development * Development and Design Steps * Algorithms.
Algorithms and Algorithm Analysis The “fun” stuff.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 1 Monday 29 Sept 2014 EGR 115 Introduction to Computing for Engineers.
Introduction to Testing CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
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,
Flowcharts C++ Lab. Algorithm An informal definition of an algorithm is: a step-by-step method for solving a problem or doing a task. Input data A step-by-step.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
 Problem Analysis  Coding  Debugging  Testing.
1 Week 1 Introduction, Writing a Program, Building a System Software Engineering Spring Term 2016 Marymount University School of Business Administration.
1 Week 1 Introduction, Writing a Program, Building a System Software Engineering Fall Term 2015 Marymount University School of Business Administration.
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
Dept of Computer Science University of Maryland College Park
The Need for Algorithms
Why Metrics in Software Testing?
ICS 3UI - Introduction to Computer Science
ALGORITHMS AND FLOWCHARTS
EGR 115 Introduction to Computing for Engineers
Non-Preemptive Scheduling
Module 2: Conditionals and Logical Equivalences
Chapter 2: Input, Processing, and Output
School of Business Administration Writing a Program, Building a System
Lecture 2 Introduction to Programming
Introduction To Flowcharting
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Some Simple Definitions for Testing
Introduction to Flowcharting
Algorithm and Ambiguity
Recognizer for a Language
Understand the Programming Process
Print slides for students reference
Unit# 9: Computer Program Development
Introduction to Problem Solving
Introduction to Software Testing
Component-Level Design
Chapter 2- Visual Basic Schneider
Coding Concepts (Basics)
CS 1120: Computer Science II Software Life Cycle
Understand the Programming Process
Algorithm and Ambiguity
Data and Flowcharts Session
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Verification, Validation, and Acceptance Testing
Data and Flowcharts Session
Flowcharts and Pseudo Code
MECH 3550 : Simulation & Visualization
Data and Flowcharts Session
Developing a Program.
CS 1120: Computer Science II Software Life Cycle
Chapter 2: Input, Processing, and Output
System analysis and design
Introduction to Flowcharting
Software Development Chapter 1.
Good programming practices
CHAPTER 6 Testing and Debugging.
Chapter 1: Creating a Program.
Presentation transcript:

Introduction – “Writing A Program” We all “start” by learning how to code in some programming language. With a small, hypothetical, and fairly well defined problem Usually the code is within one module We then learn that the program usually does not work on the first try, second try ------ may be even 5th or 6th try! We learn about “testing” the program We learn about re-reading and re-thinking the (problem) requirements more carefully --- then find that we may not have all the answers We learn about tracing and “debugging” the program Then ---- somehow magically ---- we decide that it’s “good enough !” Perhaps Not In This Order

A “simple” Set of Steps 1) Understand the problem – requirements Functionalities Non-functionalities: performance, security, modifiability, marketability, etc. 2) Perform Some Design --- based on requirements Organizing the functionalities in some sequence; possibly using some diagrams Focus on input/output ( data, formats, organization) Think about some constraints (non-functionalities) such as speed, UI looks, programming language, dependencies, etc. any specific algorithm and improvements on sequence of functionalities.

A “simple” Set of Steps (cont.) 3) Code/Implement – Turning the design into actual code Depending on how much design is completed, one may either directly engage in conversion to code or do some more designing. A) Converting input/output to specific UI Interface or I/O Format B) Sequencing the processing in the desired order C) Ensuring and converting the processing “algorithm” correctly to the target language construct.

A “simple” Set of Steps (cont.) 4) Validate/Test the program – check the program results (via output) with some predetermined set of inputs. The pre-determined inputs are “test cases” and requires some thinking. If the results do not match what is expected then: “Debug” Fix Retest ---- revalidate Stop when all test cases produce the expected results.

What Really Happens ? Problem Definition/ Understanding Solution Design Solution Implementation/ coding Solution Testing “Imagined” – Ideal Situation “Actual” - Happening Solution Implementation/ Coding Problem Definition/ Understanding Solution Design Solution Testing

Code is Done! What Else Matters? How Long (elapsed time) did it take to complete the work? How much effort (total person hours) is expended to do the work? Does the solution match the problem? How “good” is the work – (code, design, documentation, etc.)?

Consider A Simple Problem Write a “program” in your favorite language that will accept numerical numbers as inputs, compute the average, and output the answer. Answer these questions in class: How long (in hours) would it take you to implement this solution? How much overall effort (in person-hours) will this take? Will your solution match the problem? How good will your solution be?

Class Answers How long (in hours) would it take you to implement this solution? Class Answer: 10 min. (Greg); 15 min (Frankie); 1 hr. (Mark); 3 hrs (Josh) How much overall effort (in person-hours) will this take? Class Answer: 10 person min. ; 15 person min. ; 1 person hour; 3 person-hrs Will your solution match the problem? Class Answer: YES! How “good” will your solution be? Class Answer: Awesome! Let’s see how your “real” individual data come out in your Assignment 1