Bryan Burlingame 28 November 2018

Slides:



Advertisements
Similar presentations
JAVA Coursework (the same for 2A and 2B). Fundamental Information The coursework is 30 marks in your O’Level = 15% of the exam Must be word processed.
Advertisements

Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
1 Software Engineering Lecture 11 Software Testing.
Lecture Roger Sutton 21: Revision 1.
Chapter 1 Program Design
Assignment #2, 12- month Calendar CS-2301, B-Term Programming Assignment #2 12-Month Calendar CS-2301, System Programming for Non-Majors (Slides.
Investigate the degree to which programming concepts are interrelated Reshmi Ravi.
Fundamentals of Python: From First Programs Through Data Structures
Fundamentals of Python: First Programs
Simple Program Design Third Edition A Step-by-Step Approach
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Introducing Python CS 4320, SPRING Format: Field widths and Alignment The string representation of a value can be padded out to a specific width.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
ME 142 Engineering Computation I Exam 3 Review Mathematica.
Lecture 7: Menus and getting input. switch Multiple-selection Statement switch Useful when a variable or expression is tested for all the values it can.
Controlling Program Structures. Big Picture We are learning how to use structures to control the flow of our programs Last week we looked at If statements.
CMSC201 Computer Science I for Majors Lecture 05 – Comparison Operators and Boolean (Logical) Operators Prof. Katherine Gibson Prof. Jeremy.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
CIS 115 Slingshot Academy / cis115.com
Software Testing.
INTRODUCTION TO PROBLEM SOLVING
Introduction to Programming
Topic: Python’s building blocks -> Statements
Chapter 2: Input, Processing, and Output
CS 326 Programming Languages, Concepts and Implementation
CMPT 120 Topic: Functions – Part 4
Software Life Cycle Models
CIS115 Education for Service-- snaptutorial.com
CMIS 102 Competitive Success-- snaptutorial.com
PRG 410 Competitive Success-- snaptutorial.com
PRG 410 Education for Service-- snaptutorial.com
CMIS 102 Education for Service-- snaptutorial.com
PRG 410 Teaching Effectively-- snaptutorial.com
CMIS 102 Teaching Effectively-- snaptutorial.com
Bryan Burlingame 26 September 2018
Learning to Program in Python
CMSC201 Computer Science I for Majors Lecture 16 – Recursion
Learning to Program in Python
Learning to Program in Python
Bryan Burlingame 03 October 2018
Bryan Burlingame Halloween 2018
Lecture 5 Fruitful Functions
Lecture 2 Python Programming & Data Types
Bryan Burlingame 17 October 2018
Do While (condition is true) … Loop
Coding Concepts (Basics)
Introduction to Programming
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Lecture 2 Python Programming & Data Types
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Seating “chart” Front Back 4 rows 5 rows 5 rows 4 rows 2 rows 2 rows
Chapter 1 Problem Solving with C++
Bryan Burlingame 6 March 2019
Bryan Burlingame 13 March 2019
EECE.2160 ECE Application Programming
Bryan Burlingame Halloween 2018
Bryan Burlingame 17 April 2019
Chapter 2: Input, Processing, and Output
Bryan Burlingame 24 April 2019
Basic Concepts of Algorithm
Lecture 13 Teamwork Bryan Burlingame 1 May 2019.
Bryan Burlingame 5 December 2018
Introduction to Programming
Presentation transcript:

Bryan Burlingame 28 November 2018 Lecture 14 Teamwork Bryan Burlingame 28 November 2018

Announcements Lab 12 – Objects for this week This is the final lab, the final day of instruction is December 10, a Monday Final homework posted, this afternoon One more lecture, introducing the final project Final exam, groups of 2. Schedule time on the 13/14th. Problem statement assigned next week Will involve: Reading some data from some source Performing some operations on said data Writing conclusions to a file Generate visualizations to assist with understanding the data Providing a report about the effort Grading will include Correctness of the solution Quality of the code generated to solve the problem Clarity of the presented algorithm Proper partitioning of the problem into functions Logical mechanisms to store the data points (list vs dictionaries vs tuples vs objects) Quality of the lab report

Learning Objectives Present an approach to solving a reasonably challenging problem

Problem Statement Problem:¶ In a Jupyter notebook, write and document a program to compare different series representations for a multiple of Pi. Use the same format you have been using for lab reports. Inputs¶ Allow the user to input some multiple of pi in the form Api/B. A and B should be integers. Both are optional. If either is not part of the input assume it is 1. pi, pi/2, 3pi, 32pi/17 are all valid inputs. 3.2pi is not. Invalid input should be properly rejected. The user should also be allowed to enter the precision desired as an integer defining the number of decimal places they wish to be displayed. Any input which is not an integer should be properly rejected. Outputs¶ A table displaying the current term number, the current approximation for the multiple of pi for four different series approximations. The table should be attractively formatted and the approximations should each be displayed in a different column. A plot comparing the four approximations with each approximation on the y axis and the term number on the x axis.

First Step Ensure you understand the problem. What are the inputs? A string in the form of #pi/# What are the outputs? A table containing estimates of pi and a graph showing the convergence What do I not know that I need to know? Some series approximations of pi

Create a framework At a high level, think through what needs to be done and generate some code to describe this. What needs to be done?

Create a framework At a high level, think through what needs to be done and generate some code to describe this. What needs to be done? Obtain the coefficient of pi in the form #pi/# Obtain the precision Generate the four series Display a table Display a graph

Create a framework At a high level, think through what needs to be done and generate some code to describe this. What needs to be done? Obtain the coefficient of pi in the form #pi/# Obtain the precision Generate the four series Display a table Display a graph

Create a framework Note a few things: We haven’t defined these functions yet There are variables which moves the data from function to function At any point, we can print the contents of these variables to test how our algorithm is progressing

Create a framework Extend the algorithm to a complete program These are called “stub functions” All they do is implement the interfaces into each function This gives us a framework to begin filling out with clearly defined interfaces The return values should be of the proper type, but need no other meaning Functions which do something, yet return nothing should do something and return nothing

Create a framework We revise at this level until we are certain the algorithm is correct What did I miss?

Create a framework We revise at this level until we are certain the algorithm is correct What did I miss?

Create a framework By focusing on the top level algorithm and the interfaces, we temporarily eliminate the details allowing for clarity I missed that I need to include all four series in the table and the chart. Fixing that in the algorithm, breaks the interfaces This is an iterative process

Create a framework Now that we have a working program, we can move on

Details With each concept packaged in a function, we can focus on implementing and testing each function in isolation Start with generating the small algorithm in comments, then fill in each step. Again, this allows us to develop and test by parts

Details By building the program up component by component, we keep the problem space small

Details With a complete framework to work with, we can readily test each set of instructions as they are added What did I miss?

Collaboration If the team can agree on the interfaces and function names, effectively agreeing on the framework, different team members can work on different parts By injecting test values into the program flow, functions can be tested in isolation while ensuring the interfaces are preserved

Collaboration If the team can agree on the interfaces and function names, effectively agreeing on the framework, different team members can work on different parts By injecting test values into the program flow, functions can be tested in isolation while ensuring the interfaces are preserved

Collaboration One team member can clearly work on this function and ensure it is correct without impacting the work of the rest of the team.

Integration Challenges When the team pulls back together and attempts to replace the stub functions with the function implementations problems can occur Most commonly an interface was misunderstood Ex: In this interface, the coefficient is returned from the obtain_coefficient function as a list containing [A, B], what would happen if the engineer writing the series functions assumed the coefficient was a float A/B ?

Integration Challenges When the team pulls back together and attempts to replace the stub functions with the function implementations problems can occur Most commonly an interface was misunderstood Ex: In this interface, the coefficient is returned from the obtain_coefficient function as a list containing [A, B], what would happen if the engineer writing the series functions assumed the coefficient was a float A/B ? When integrating, focus on the interfaces

Resources Downey, A. (2016) Think Python, Second Edition Sebastopol, CA: O’Reilly Media (n.d.). 3.7.0 Documentation. 5. Data Structures — Python 3.7.0 documentation. Retrieved October 30, 2018, from https://docs.python.org/3/tutorial/datastructures.html