Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.

Slides:



Advertisements
Similar presentations
Credit hours: 4 Contact hours: 50 (30 Theory, 20 Lab) Prerequisite: TB143 Introduction to Personal Computers.
Advertisements

1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Flow Control Analysis & Design Tool: Flowcharts
19-1 Programming… The Pencil and Paper Computer The Pencil & Paper Instruction Set: (table on p148) The Operand specifies a memory location.
Software Development Method. Assignments Due – Homework 0, Warmup Reading – Chapter 2 –
This set of slides is provided by the author of the textbook1 Introductory Topics l Computer Programming l Programming Life-Cycle Phases l Creating an.
Functions. A set of statements (lines of code) that can be run repeatedly Goals: Learning Python by Lutz and Ascher –Code reuse –Procedural decomposition.
Java Intro. Strings “This is a string.” –Enclosed in double quotes “This is “ + “another “ + “string” –+ concatenates strings “This is “ “ string”
Functions. A set of statements (lines of code) that can be run repeatedly Goals: Learning Python by Lutz and Ascher –Code reuse –Procedural decomposition.
Algorithm Design CS105. Problem Solving Algorithm: set of unambiguous instructions to solve a problem – Breaking down a problem into a set of sub- problems.
Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.
A High-Level Model For Software Development
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
JavaScript with Input & Output Step 1: Use tags JavaScript Template.
BBS Yapısal Programlama (Structured Programming)1 From problem to program In “real world”… Problem in Natural language Top Down Design in pseudo-code.
Software Engineering 1 (Chap. 1) Object-Centered Design.
The fourth programming assignment J.-F. Pâris Fall 2014.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
Planning for the Solution
Looping While-continue.
Introduction to Algorithm Design and Documentation CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Chapter 2: Beginning the Problem-Solving Process
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
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.
Lesson 3 McManus COP  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.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
More Algorithm Design CSIS 1595: Fundamentals of Programming and Problem Solving 1.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
System Analysis (Part 3) System Control and Review System Maintenance.
Flowcharts.
COMP 171: Data Types John Barr. Review - What is Computer Science? Problem Solving  Recognizing Patterns  If you can find a pattern in the way you solve.
B065: PROGRAMMING Sub Procedures I. Starter  Identify the separate tasks to be performed in the programming task below (break it down into numbered sections).
Software Development Method Reference : Problem Solving & Program Design in C ; Jeri R.Hanly, Elliot B.Koffman.
Basic problem solving CSC 111.
CS 100 Introduction to Computing Seminar
Advanced Work with Embedded and Summative Assessment Dr. Steve Broskoske Misericordia University EDU 533 Computer-based Education.
UFCEKS-20-2Multimedia Authoring Times Table Quiz.
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
CS2006- Data Structures I Chapter 5 Linked Lists III.
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
1 Original Source : and Problem and Problem Solving.ppt.
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,
Algorithms and Pseudocode
MIT App Inventor Lesson 3 Algorithms Variables Procedures.
C++ for Engineers and Scientists, Second Edition 1 Problem Solution and Software Development Software development procedure: method for solving problems.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Lecture 5: Layers of Control. Nested while Loops Problem Multiplying two numbers and outputting the result only if they are both less than 5. (i.e. Start.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
For Friday Read No quiz Program 6 due. Program 6 Any questions?
Creating Java Applications (Software Development Life Cycle) 1. specify the problem requirements - clarify 2. analyze the problem - Input? Processes? Output.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
An Introduction to Programming with C++1 Beginning the Problem- Solving Process Tutorial 2.
Algorithms and Flowcharts
Lecture2.
Example Programs.
CC213 Programming Applications
PROBLEM SOLVING CSC 111.
Basic Lessons 5 & 6 Mr. Kalmes.
Basic Concepts of Algorithm
Hint idea 2 Split into shorter tasks like this.
Presentation transcript:

Algorithms

Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement the algorithm 5.Test and verify the completed program 6.Maintain and update the program

Software Development Method 1.Specify the problem requirements In this class, often done for you 2.Analyze the problem Your job – what are the inputs and outputs 3.Design the algorithm to solve the problem Your job – write it down and turn it in! 4.Implement the algorithm Your job 5.Test and verify the completed program Your job – this is the most time consuming part Go back to step 4 if your program fails the tests 6.Maintain and update the program Always assume you will reuse your code at some point

Algorithms Step-by-step procedure for solving a problem Be as specific as possible – include all steps Example – doing your laundry

Calculate Tax on an Item Problem Analysis Algorithm design Implementation Testing Maintenance

#A program to calculate tax and total cost for an item. #determine rate of taxation #ask user for the cost of the item #calculate the tax #calculate total cost #display the results

#Name: Sami Rollins #A program to calculate tax and total cost for an item. #determine rate of taxation TAX_RATE =.0825 #ask user for the cost of the item cost = input("Enter item cost: ") #calculate the tax tax = cost*TAX_RATE #calculate total cost total = cost+tax #display the results print "Cost: ", cost print "Tax : ", tax print "Total: ", total

#Name: Sami Rollins #A program to calculate tax and total cost for an item. Indicates what the program does Comments –# to the end of the line Heading

#determine rate of taxation TAX_RATE =.0825 Sets the value of the variable TAX_RATE to be.0825 Variables

#ask user for the cost of the item cost = input("Enter item cost: ") Prompt the user for the cost of the item and store the response in the variable cost Input

#calculate the tax tax = cost*TAX_RATE Multiply the cost times the tax rate and store the result in the variable tax Calculation

#calculate total cost total = cost+tax Add the cost and the tax and store the result in the variable total Calculation

#display the results print "Cost: ", cost print "Tax : ", tax print "Total: ", total Display the results for the user Output