Lesson 3 McManus COP1006 1.  You have to tell them ◦ what to do ◦ what to use ◦ in what order to do itand ◦ what to do if your user does not do what.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Chapter 3: Modularization
Chapter 2: Modularization
Programs/Algorithms.  Computer Architecture  What is a computer program?  Flow chart  Data states  Data  Variables  History – Why VB?  Procedural.
Programming Logic and Design Fourth Edition, Introductory
8 Algorithms Foundations of Computer Science ã Cengage Learning.
Chapter 2- Visual Basic Schneider
COSC 120 Computer Programming
Chapter 2: Input, Processing, and Output
Modules, Hierarchy Charts, and Documentation
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 3 Planning Your Solution
Programming Logic and Design Fourth Edition, Introductory
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Computer Programming 12 Lesson 2 - Organizing the Problem By Dan Lunney.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
Simple Program Design Third Edition A Step-by-Step Approach
Planning for the Solution
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Programming Concepts Chapter 3.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
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.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.
Visual Basic Programming
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
The Software Development Process
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
ICS124 Session 8 Structured Programming 1. By the end of this section the student will be able to:  List the steps of a model Systems Development Life.
Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Software Quality Assurance and Testing Fazal Rehman Shamil.
The Hashemite University Computer Engineering Department
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.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
MIT App Inventor Lesson 3 Algorithms Variables Procedures.
Chapter 2: Input, Processing, and Output Starting Out with Programming Logic & Design by Tony Gaddis (with instructor modifications) 1-1.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
An Introduction to Programming with C++ Sixth Edition Chapter 5 The Selection Structure.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 1: Introduction to Computers and Programming
INTRODUCTION TO PROBLEM SOLVING
Chapter 2: Input, Processing, and Output
Chapter 2- Visual Basic Schneider
The Selection Structure
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
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.
Computer Programming.
Chapter 2- Visual Basic Schneider
Chapter 1 Introduction(1.1)
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Chapter 2: Input, Processing, and Output
Basic Concepts of Algorithm
Programming Logic and Design Eighth Edition
Presentation transcript:

Lesson 3 McManus COP1006 1

 You have to tell them ◦ what to do ◦ what to use ◦ in what order to do itand ◦ what to do if your user does not do what you want them to do! McManusCOP10062

 Don’t reinvent the wheel!  Use solutions that have been ◦ already proven successful ◦ been created just to be reused McManusCOP10063

 Speed  Readability  Understandability  Maintainability  Reusability McManusCOP10064 We take these into consideration every time we create a program.

 Files ◦ Program – set of instructions ◦ Data – raw pieces of facts McManusCOP10065 database records Data (fields) files

McManusCOP10066

 Memory location  Used to store data during transfer between internal memory and the external storage (hard drive or floppy)  Speeds up transfer of information ◦ Input & output processes McManusCOP10067

 Semantics ◦ The concept or idea of the item ◦ Ex. The numeral three is an idea that humans have established representing the concept of three items  Syntax ◦ The physical/visible representation of the idea ◦ Ex. “three” “3” McManusCOP10068

 Tools ◦ Problem Analysis Chart (PAC) ◦ Structure/Interactivity Charts ◦ Input Processing Output (IPO) Chart ◦ Flowcharts ◦ Hierarchy Charts  But…first we have to understand the Software Life Cycle McManusCOP10069

McManusCOP Problem Definition Software & Architectural Design System Requirements Detailed Design Specifications Design Validation Coding* Testing/ Acceptance Operations/ Maintenance Indicates = reiterative steps after testing and verification of each phase *Implementation The Waterfall Model

 Understand the Problem  Analyze the Requirements of the Problem  Figure out what will be the outcome Very often we’re not given the inputs to a problem, only the desired output. McManusCOP100611

Given DataRequired Results Hours PayRate Gross Pay Processing RequiredSolution Alternatives GrossPay = Hours * PayRate Define the Hours Worked and Pay Rate as constants Define the Hours Worked and Pay Rate as variables Defined the Hours Worked and Pay Rate as input values McManusCOP100612

McManusCOP Calculate Gross Pay Obtain Input Values Calculate Gross Pay Print Pay Check PR HRS PR HRS GP

InputProcessingOutput Hours Worked Pay Rate 1. Enter Hours Worked 2. Enter Pay Rate 3. Calculate Pay 4. Print Pay Gross Pay (the pay check) McManusCOP100614

 Originally used to describe the entire program.  Now, used to define ◦ selection (decision) and ◦ repetition (looping) structures McManusCOP100615

 Flowlines ◦ used when direction is in doubt  Start/(End/Stop/Exit)  Processing  I(input)/O(output)  Decision McManusCOP Begin End Calculate Gross Pay Print Pay Check More Employees?

McManusCOP Snooze or Off? Alarm goes off! Sleep or Get up? Zzzzz! Snooze Sleep Get Dressed... Snooze = 9? < 9 Ignore Alarm, Forget Boss, Forget Instructor – Probably creating a problem?

 Everything is included, but written in English rather than any one language’s syntax  Useful for debugging  Ex. McManusCOP Obtain PayRate Obtain HoursWorked GrossPay equals PayRate Multiplied by HoursWorked Print GrossPay

 Internal  External  Written in different language styles McManusCOP100619

 Used to explain what is being done (and why) within the program  Most often takes the form of comments within the program ◦ Written in Language that Programmer, not user, will understand McManusCOP ' Insert a new node in the binary search tree. ' If the root node is null, create the root node here. ' Otherwise, call the insert procedure of class TreeNo

 Manuals or Help menus to assist the user ◦ Includes  User Manuals  System Manuals  User must be able to understand… McManusCOP Make text bold 1.Select the text you want to change. 2.Click Bold on the Formatting Toolbar.

 Walkthroughs ◦ Walking through the process to verify that the solution  is solving the right problem and  works correctly ◦ You can use any of the charts or Pseudocode for this step  Helps find bugs McManusCOP100622

 After determining that the solution is correct  Select the appropriate language  Code the program McManusCOP100623

 Test the coded solution  Best done by someone other than the programmer McManusCOP100624

 found in large-scale software projects are specification and design faults.  Where do most of these faults originate? ◦ Not fully understanding the problem and ◦ then creating a specification based on an erroneous problem definition.  Industry’s high priority ◦ involves the development and use of techniques that will help find faults during the earliest phases. McManusCOP100625

 Nowhere! It is not the purpose to place blame when a fault is found… Only to fix the fault! McManusCOP100626

 new problems arise, such as: ◦ different styles of writing code, ◦ interface difficulties, ◦ different declared types (integer vs real) ◦ different understandings of the problem caused by communication problems, and ◦ even something as simple as the order in which variables are listed within a procedure’s call statement. McManusCOP100627

McManusCOP Next?