Chapter 2: Beginning the Problem-Solving Process

Slides:



Advertisements
Similar presentations
An Introduction to Programming with C++ Fifth Edition
Advertisements

PROBLEM SOLVING TECHNIQUES
Introduction to Flowcharting
Introduction to Flowcharting
Flow Control Analysis & Design Tool: Flowcharts
Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Published by Addison-Wesley.
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
Chapter 2- Visual Basic Schneider
Programming Tools Flowcharts Pseudocode Algorithm Chapter 2.
Defining Control Structures
Chapter 2: Input, Processing, and Output
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
Developing logic (Examples on algorithm and flowchart)
Chapter 3 Planning Your Solution
Review Algorithm Analysis Problem Solving Space Complexity
(C)opyright 2003 Scott/Jones Publishers Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Scott/Jones Publishers.
Algorithm & Flowchart.
Computer Programming 12 Lesson 2 - Organizing the Problem By Dan Lunney.
Variables, Constants, Methods, and Calculations Chapter 3 - Review.
The Software Development Cycle Defining and understanding the problem.
Planning for the Solution
Computer Programming TCP1224 Chapter 2 Beginning the Problem-Solving Process.
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
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.
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.
Programming Concepts Chapter 3.
CSCI 3133 Programming with C Instructor: Bindra Shrestha University of Houston – Clear Lake.
Chapter 1 Introduction to Structured Design. Introduction  System  A combination of people, equipment, and procedures that work together to perform.
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.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
Program Planning and Design. What is Program Planning and Design? Program planning and design is simply knowing what you want to do and how you want to.
Basic problem solving CSC 111.
(C)opyright 2000 Scott/Jones Publishers Introduction to Flowcharting.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
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.
An Introduction to Programming with C++ Sixth Edition
INVITATION TO Computer Science 1 11 Chapter 2 The Algorithmic Foundations of Computer Science.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
MIT App Inventor Lesson 3 Algorithms Variables Procedures.
An Introduction to Programming with C++ Sixth Edition Chapter 5 The Selection Structure.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
An Introduction to Programming with C++1 Beginning the Problem- Solving Process Tutorial 2.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Problem Solving Flowcharts. Flowcharts Introduction  Flowcharts allow us to create a visual representation of a solution to a problem DRAW  With flowcharts,
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
Program Design & Development EE 201 C7-1 Spring
CIS 115 AID Peer Educator/cis115aid.com FOR MORE CLASSES VISIT
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Algorithms and Flowcharts
An Introduction to Programming with C++1 More on the Selection Structure Tutorial 7.
An Introduction to Programming with C++ Sixth Edition Chapter 8 More on the Repetition Structure.
Introduction to Flowcharting
Chapter 2- Visual Basic Schneider
The Selection Structure
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.
An Introduction to Visual Basic .NET and Program Design
Chapter 2- Visual Basic Schneider
Chapter 2- Visual Basic Schneider
Flowcharts and Pseudocode
Problem Solving.
Introduction to Programming
Basic Concepts of Algorithm
Programming Logic and Design Eighth Edition
Introduction to Programming
Introduction to Flowcharts
Presentation transcript:

Chapter 2: Beginning the Problem-Solving Process Introduction to Programming with C++ Fourth Edition

Objectives Explain the problem-solving process used to create a computer program Analyze a problem Complete an IPO chart Plan an algorithm using pseudocode and flowcharts Desk-check an algorithm Introduction to Programming with C++, Fourth Edition

Problem Solving/Solving Everyday Problems Steps include: Analysis Planning Review Implementation Evaluation Modification Introduction to Programming with C++, Fourth Edition

Analysis and Planning Introduction to Programming with C++, Fourth Edition

Modified Algorithm Introduction to Programming with C++, Fourth Edition

Creating Computer Solutions to Problems Introduction to Programming with C++, Fourth Edition

Analyzing the Problem Purpose of analyzing the problem: to determine the goal to determine the items needed to achieve the goal Introduction to Programming with C++, Fourth Edition

Analyzing the Problem (continued) Introduction to Programming with C++, Fourth Edition

IPO (Input, Processing, Output) Charts Used by programmers to organize and summarize the results of a problem analysis To determine input: Search the problem specification for an answer to the following question: What information will the computer need to know to print, display, or store the output items? Introduction to Programming with C++, Fourth Edition

IPO Chart with Input and Output Introduction to Programming with C++, Fourth Edition

Determining Important Information If you are not sure if a piece of information is important, ask yourself this question: If I didn’t know this information, could I still solve the problem? When reading a problem specification, it helps to use a pencil to lightly cross out unnecessary information Introduction to Programming with C++, Fourth Edition

Problem Specification Introduction to Programming with C++, Fourth Edition

Problem Specification Lacking Information Introduction to Programming with C++, Fourth Edition

Problem Specification with Input not Stated Introduction to Programming with C++, Fourth Edition

Planning the Algorithm Processing item - an intermediate value that the algorithm uses when processing the input into the output Pseudocode - a tool programmers use to help them plan an algorithm Flowchart - uses standardized symbols to show the steps the computer needs to take to accomplish the program’s goal Introduction to Programming with C++, Fourth Edition

Completed IPO Chart Introduction to Programming with C++, Fourth Edition

IPO Chart with Flow Chart Introduction to Programming with C++, Fourth Edition

Flowchart Symbols Flowlines - used to connect symbols Start/stop symbol (oval) – indicates beginning of flowchart Process symbols (rectangles) – used to represent tasks such as calculations Input/output symbol (parallelogram) - used to represent input tasks Introduction to Programming with C++, Fourth Edition

Solving Sarah’s Problem Introduction to Programming with C++, Fourth Edition

IPO Chart for Problem Specification Introduction to Programming with C++, Fourth Edition

Hints for Planning Algorithms Introduction to Programming with C++, Fourth Edition

Desk-Checking the Algorithm Reasons for desk-checking: To verify that the program is not missing any steps To verify that the existing steps are correct and in the proper order Introduction to Programming with C++, Fourth Edition

Desk-Check Table with New Weekly Pay Introduction to Programming with C++, Fourth Edition

Results of Second Desk-Check Introduction to Programming with C++, Fourth Edition

The Gas Mileage Problem Introduction to Programming with C++, Fourth Edition

The Gas Mileage Problem (continued) Analyze the problem looking for nouns and adjectives that represent both input and output Output should answer the following question: What does the user want to see printed on paper, displayed on the screen, or stored in a file? Input should answer the following question: What information will the computer need to know to print, display, or store the output items? Introduction to Programming with C++, Fourth Edition

IPO Chart Introduction to Programming with C++, Fourth Edition

Completed Desk-Check Table Introduction to Programming with C++, Fourth Edition

Summary Explain the problem-solving process used to create a computer program Complete an IPO chart Use algorithms (pseudocode) and flowcharts Use desk-checking techniques Introduction to Programming with C++, Fourth Edition