Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Development Expansion of topics page 28 in Zelle

Similar presentations


Presentation on theme: "Software Development Expansion of topics page 28 in Zelle"— Presentation transcript:

1 Software Development Expansion of topics page 28 in Zelle
Rick Mercer

2 Outline Goals Understand an example of software development
Understand the characteristics of a good algorithm Understand how algorithmic patterns can help design programs Show how a program or a lab is completed from start to finish

3 Software Development Software development includes
Analysis: Understand the problem Design: Organize the solution Implementation: Get the solution running Test/Debug: See if program works. If not, debug

4 Analysis Synonyms for analysis Activities inquiry, examination, study
Read and understand the problem statement Figure out what has to done Describe inputs and outputs and their relationships

5 Program Specification like our projects will be
It is final exam time and our section leaders (SLs) are very busy. All grades for ISTA 130 are on paper and the SLs must calculate all grades by hand. They would like a program that allows them to enter the grades and compute the course grade based on these assessments and weights 16% Labs and Assignments 34% Programming Projects 14% Quizzes 18% Midterm 18% Final Exam

6 Sample Dialog Your dialog should look exactly (or very, very close) to this: >>> This program computes a course grade for ISTA 130 Enter the five assessments when prompted. Labs and Assignments: 90 Programming Projects: 90 Quizzes: 90 Midterm: 90 Final exam: 90 Course grade: 90.0

7 Name input and output Use meaningful identifiers to represent what the program expects as input assignments projects quizzes midterm final Get a name for the thing to be output grade Relationships? Need values for the input to compute the output

8 Design Synonyms of design: model, think, plan, devise, pattern, propose, outline We'll use these design tools: algorithms algorithmic patterns

9 Algorithms An algorithm is a set of activities that solves a problem
An algorithm must: list activities that must be performed list the activities in the proper order

10 Algorithm to Bake a Cake
A recipe (a.k.a. an algorithm) Preheat Oven Grease Pan Mix ingredients Place ingredients into pan place pan in oven remove pan after 35 minutes Switch some activities around ... what happens if …

11 Algorithmic Patterns Pattern: Anything shaped or designed to serve as a model or guide in making something else. Algorithmic Pattern: Serves as a guide to help develop programs It represents a common type of action that occurs over and over again in programs A solution that can be used different contexts The Input/Process/Output (IPO) Pattern can be used. This IPO pattern will be used in our first project

12 IPO Algorithmic Pattern
Pattern: Input/Process/Output (IPO) Problem: The program requires input data to generate the desired information Outline: 1. obtain input data from user 2. process input data 3. output the results

13 Patterns ala Alexander
"Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice." From A Pattern Language, Christopher Alexander, Oxford University Press, 1977

14 Example of Algorithm Design
The design deliverable will be an algorithm The IPO patterns provides a guide to design a more specific algorithm IPO Model IPO applied to Chapter 1 Case Study I)nput Get the items that count for the grade P)rocess Compute the course grade O)utput Display the course grade

15 Refining Activities in algorithms
We often need to refine one or more activities (algorithm steps). For example, Compute the course grade might now be refined with the mathematical addition + and multiplication * symbols We'll wait to do this in Python

16 Implementation Synonyms for Implementation
accomplishment, making good, execution Activities during implementation Translate algorithm into a programming language we're using Python Let Python interpret the code so it can instruct the computer what to do Python knows your CPU better than you Verify program does what it should: TEST! Debug : 1)Find, 2)Locate, and 3)Fix errors

17 Example Translations Some pseudocode algorithm step translated into the Java programming language Display the courseGrade (in our algorithm) print("Course grade:", courseGrade); Get the items (just get the midterm here) #Tell user what you want, then "read" it in midterm = eval(input("Midterm: ")) Code Demo: Implement the Python Program

18 Some test cases already computed separately
All inputs equal should be what? ___90.0_____ First 3 equal, tests differ but match should be? ___86.4 ___ First three equal, and tests differ should be? ___84.6___ First three different, tests match should be? ___83.0___ Differ in ascending order, descending order, mixed, Even more test would be good, like a few random test cases ...


Download ppt "Software Development Expansion of topics page 28 in Zelle"

Similar presentations


Ads by Google