C511 Notes and Homework Problems

Solution to Final

Syllabus

HTML version

Homework Assignments

Homework Number 1 - Streams in C++
Homework Number 2 - Elementary Java
Homework Number 3 - Doctors/Patients
Homework Number 4 - Streams in Java
Homework Number 5 - Streams in Scheme
Homework Number 6 - Call/cc
Format for Homework Number 6.

Solutions to the Homework

A Solution To Homework Number 1
A Solution To Homework Number 3
A Solution To Homework Number 5, Question 2
A Solution To Homework Number 5, Question 2

Homework Hints

Homework Number 1 hints
Partial Solution to the Doctor's/Patient's Problem in "C++"
Update to Partial Solution to the Doctor's/Patient's Problem in "C++"
Results of Running a Solution to the Doctor's/Patient's Problem in "C++"

Reasonable Solution to Online Exam

Multi-Way Streams and Merge

Scheme References

Introduction
Scheme language specification
FAQ, part 1
Quick Reference
Schools Using Scheme

Scheme Examples

Lambda
OOPS
Streams
Y Combinator
Call with Current Continuation
Backtracking Solution to N-Queens Problem.
Quick Sort (pivot is the first element)
Merge Sort
Solution to Doctors/Patients
Stream Lecture Notes
Objects Lecture Notes

Java Examples

Simple Hello World (no Frame)
Hello World in a Button in a Frame
Hello World better positioned in a Button in a Frame
TextField and Button - click to add numbers to the string
Simple pocket calculator
------Applet source code-----Try the applet

      ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++

Make circles and change colors to red green or blue
Make circles, change colors, and move them
Same as above but improved and with Double Buffering
------Applet source code-----Try the applet
Add nodes to a red/black tree - animation example
------Try the applet
HTTP Web Server - example of "Stream" connection on net
Keep track of Bowlers' scores - file manipulation example

      ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++

Interface Example - Find
Multiple Inheritance Using Interfaces
Multiple Inheritance Using Interfaces
Visibility

      ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++

Simple Thread Test
Producer/Consumer Example

      ++  ++  ++  ++  ++  ++  ++  ++  ++  ++  ++

Radix sort using circular queue
QuickSort
Hamming's problem extended
Redundancy check in a network (test for cycles in a graph)
Binary trees, heaps, and heapsort
MergeSort using linked lists
Red/Black Trees Demonstration

C and C++ Examples

Insurance Company Payroll
Radix Sort using circular queue
Breadth-first solution to Hamming's problem
Generate-and-Test solution to Hamming's problem
Redundancy check in a network (test for cycles in a graph)
Binary Tree and HeapSort
A linked list implementation of MergeSort
Multiple Inheritance
Man Page Description of setjmp/longjmp with examples
Multiple Inheritance
Multiple Inheritance
Multiple Inheritance
Craziness in C++ - Garbage Collection

Previous Exams

Midterm questions from 1994.

Questions and Answers

Answers to Student Questions.