MIS 226 - Programming II - Spring 2017

Department of Mathematics and Information Technology

Mercyhurst University

Handouts and Presentations


Syllabus Slides - In-class slide presentation from the first day of class

Python Reference - A guide to the basics of programming in Python

Algorithm Pseudocode Example/Slides - Examples of algorithm pseudocode for a simple programming project and an explanation of the scores.

Exam 1 Review - Exam 1 will be based on the material from Chapters 1, 2, 3, and 4 from the textbook.  This list of topics is not exhaustive - there may be some topics covered on the exam that are not listed here.  The exam will be held in class on Wednesday, March 1st.

Exam 2 Review - Exam 2 will be based on the material from Chapters 4, 5, and 6 from the textbook.  This list of topics is not exhaustive - there may be some topics covered on the exam that are not listed here.  The exam will be held in class on Wednesday, April 19th.

Final Exam Review - The Final Exam will be cumulative and based on the material from the entire course. The material will cover Chapters 1, 2, 3, 4, 5, 6, 7, and 14. This list of topics is not exhaustive - there may be some topics covered on the exam that are not listed here.  The topics covered since the second in-class exam will be focused on more in the Final Exam.  The exam will be held

1:00pm - 3:00pm on Friday, May 12th


Example Classes
Rectangle.py - A simple class to model a rectangle object.

RectangleList.py - An example illustrating how to use classes in a list.

savingsAccount.py - A class to model a bank savings account.

Chapter 2 - Data Abstraction
dieADT.txt - ADT for a die object.

dieADT_Implementation.py - Implementation of the die ADT object.

AddressBook.txt - Design a class (or classes) to solve this problem.

fraction.py - This class implements a fraction ADT.  Here, addition is implemented as a class method instead of using operator overloading.

Rational.py - This class implements a fraction ADT.  Here, addition is implemented using operator overloading.

Chapter 1 - Abstraction and Analysis
rectangle.py - An example of using docstrings.

sequentialSearch.py - Tests the runtime of the sequential search algorithm.

binarySearch.py - Tests the runtime of the binary search algorithm.

bigOExamples.pdf - Examples of big-O algorithm analysis.

Basic Data Structures/Chapter 4
unorderedListADT.txt - ADT for an unordered list object.

ListNode.py - Implementation of a node for a linked list.

LList.py - Implementation of a linked list.

dictionaryADT.txt - ADT for a Python dictionary data structure.

Chapter 3 - Container Classes
YahtzeeDice.py - Implementation of a list of (sortable) dice.

Chapter 5 - Stacks and Queues
Stack ADT - ADT for a stack data structure.

Stack.py - Implementation of a stack ADT.

stringReverse.py - Use a stack to reverse a string.

parensBalanceSimple.py - Use a stack to decide if parentheses are balanced.

parensBalance.py - Use a stack to decide if delimiters are balanced.

Queue ADT - ADT for a queue data structure.

Queue.py - Implementation of a queue ADT.

hotPotato.py - Use a queue to simulate the game hot pototo.

palindrome.py - Use a stack and queue to check if a word/phrase is a palindrome.

Data Structures - Which data structure is the best to use in these situations?

Chapter 6 - Recursion
IntegerFactorial.py - Compute n! using a loop and using recursion.

sumList.py - Compute the sum of numbers in a list using a loop and using recursion.

StringReversal.py - Use recursion to reverse a string.

numChoices.py - Use recursion to compute the number of possible combinations.

fibonacci.py - Compute the nth Fibonacci number using a loop and using recursion.

fastFib.py - Compute the nth Fibonacci number using recursion and memoization.

mergesort.py - Sort a list of numbers using recursion.

recursiveBinarySearch.py - Recursive version of the binary search algorithm.

Chapter 7 - Trees
Trees.pdf - Slides for the beginning of Chapter 7.

TreeNode.py - Implements a node for a tree structure.

BST.py - Implements a binary search tree.

BST_Example.py - An example program for searching a BST.

expressionTree.py - Use a binary tree to evaluate a mathematical expression.

HuffmanTree.py - Use a binary tree for data compression.

Chapter 14 - Graphs
Graph ADT - ADT for a graph data structure.

Vertex.py - Implements a vertex for a graph.

Graph.py - Implements the Graph ADT.

graphExample.py - An example program for using a Graph.

Vertex.py - Implements a vertex for the unweighted shortest path problem.

UnweightedShortestPath.py - Implements the unweighted shortest path problem algorithm.

PriorityQueueExample.py - Example using a priority queue.

WeightedShortestPath.py - Implements the weighted shortest path problem algorithm.