EEN118 P (Programming 1) Spring 2013
Tues, Thurs at 11:00 am in MPC-101

Class History

Class 1  Tue 15‑1‑2013   Quick introductions, etc., the parts of a computer, one of the reasons computers work in binary, two baby C++ programs: A and B, setting up a visual studio project.
Class 2  Thur 17‑1‑2013   Visual studio: what a project really is, and what is happening when you use it.
C++ is not the only programming language, but we have good reasons for choosing it, assembly language and binary executable code, bad old fortran, why you have to type C++ programs so very carefully exactly right.
The types int, string, double, and void, and the basic aritmetical operators.
Class 3  Tue 22‑1‑2013   Some practice with programming and good design: lots of triangles and squares.
Class 4  Thur 24‑1‑2013   Some of the rules of C++.
Kepler's discovery, and a program to check it, the final correct version.
Bart's punishment, is this an improvement?, at least this is cleverer.
Class 5  Tue 29‑1‑2013   Our new friend, the "if". Fixing Bart's punishment, Helping Kepler to handle Saturn.
Controlling repetition counters, converters, and tabulators; A useful graph plotter.
Class 6  Thur 31‑1‑2013   Clarifying the important notion of the scope of a declaration.
The evolution of a quite sophisticated graph plotter: one, two, three, four, five.
Class 7  Tue 5‑2‑2013   Following complex patterns of repetition: one, two, three, extra one for practice.
Overflow with powers of 2 and 10.
Class 8  Thur 7‑2‑2013   An error proof quadratic equation solver.
Printing cheques safely: the beginning.
Class 9  Tue 12‑2‑2013   Inductive reasoning to ensure programs are correct. Functions that call themselves, where it obviously isn't a just jump right back to the beginning: being able to say all numbers in words, in seven simple steps - one, two, three, four, five, six, seven.
Starting to think about stars.
Class 10  Thur 14‑2‑2013   Fractal Stars and other shapes, An irregular quadrilateral, making the computer draw it, The discovery of Broccoli.
How to make bees, Brownian Motion with the while loop.
Class 11  Tue 19‑2‑2013   what a caprimulgus does at night.
one hour tree experiments.
an old test, and another old test.
How to score zero on an assignment.
Rabbit unix accounts,
Basic unix commands.
Class 12  Thur 21‑2‑2013   More Unix.
From a dull guessing game, we evolve a square-root finder in three steps: first, second, third.
Academic alerts due
Class 13  Tue 26‑2‑2013   More unix commands.
And some practice: Fibonacci numbers slow and fast. Prime numbers.
Class 14  Thur 28‑2‑2013   Test day.
Class 15  Tue 5‑3‑2013   Software Engineering - Continuous refinement, starting from an obvious statement and gradually expanding the level of detail until the result is a C++ program with a clear record of how it was designed and how to discover errors.
Assignments, update operators, loops within loops, and "for" loops.
Variables and loops used correctly: part one, part two.
Class 16  Thur 7‑3‑2013   Using the standard C++ libraries: A surprise 5 in the fibonacci sequence.
Reference parameters, putting numbers in order.
Spring Break
Class 17  Tue 19‑3‑2013   Brief test review.
A partial program written by a program: step 1 (not quite right), step 2.
An ofstream to create a text file.
Class 18  Thur 21‑3‑2013   A complete program written by a program: step 3, step 4.
ofstreams and ifstreams, the right time to check .fail(), remember to .close().
Class 19  Tue 26‑3‑2013   The dangers of over-confidence.
Making it create a .cpp file: fstreams must be reference parameters.
If I ask it to sort 30 things, it uses {, |, }, ~ as variable names.
Maybe the variables should be a1, a2, a3, etc. Then I can have as many as I want.
That looks a lot like using an array. Using an array would be better!
Looking at the output from that, we see that it can easily be modified into a nice simple flexible sorting program.
Class 20  Thur 28‑3‑2013   Algorithm speed for sorting: analysis, experimentation, and extrapolation.
We see that the number of operations performed by our sorting program, and therefore the time it takes is O(N2), and what that means.
Class 21  Tue 2‑4‑2013   Simulations: the boy and the bull.
The program works, but it is a big ugly lump. We need to work out a way to simplify and structure it.
Class 22  Thur 4‑4‑2013   Introducing objects, they really tidied up the boy and the bull. So much so that it only took 30 seconds to simulate a dinosaur.
Class 23  Tue 9‑4‑2013   Developing a program with arrays, structs, and files: a molecular weight calculator. (its data file).
Class 24  Thur 11‑4‑2013   Comparing strings with arrays of char. Two dimensional arrays.
Doing our own input processing to continue with the atomic calculator.
More practice with making a program debug itself.
Review With the lab guys, Saturday at 3 pm or Sunday at 4 pm.
Class 25  Tue 16‑4‑2013   Test Day.
Class 26  Thur 18‑4‑2013   Objects Everywhere. Solving a complex problem with a simple robust program.
A good solid molecular weight calculator.
Class 27  Tue 23‑4‑2013   A good modular design makes programs more easily adaptable.
Complex number calculations.
Class 28  Thur 25‑4‑2013   Gaston Julia, Complex numbers in C++, The expolring program.
The final Mandelbrot set plotter.


Lab Assignments

                    Lab Setup Guide
Library downloads and documentation
    
Lab 1 21-24 Jan (pdf) Using visual C++ to run programs; drawing stars and stick figures.
Lab 2 28-31 Jan (pdf) Divide and conquer: building big programs from little functions.
Lab 3 4-7 Feb (pdf) Controlling repetition in programs.
Lab 4 11-14 Feb (pdf) A video game: exploding the enemy with a cannon (assistance with the drawing).
Lab 5 18-21 Feb (pdf) A real-time animated clock application.
Lab 6 25-28 Feb (pdf) Generating calendars and using Unix.
Lab 7 4-7 Mar (pdf) A randomly generated Happy Street Scene.
Lab 8 18-21 Mar (pdf) An interactive desk calculator.
Lab 9 25-28 Mar (pdf) Meteorological data processing and visualisation. the data files
Lab 10 1-4 Apr (pdf) Interactive map of the United States. Data files: state outlines, capitals.
Lab 11 8-11 Apr (pdf) Database programming under Unix.
Data files: database1.txt, 2, 35, 10, 20, 30, 50, 100.
The special timing function.
Lab 12 15-18 Apr (pdf) A robot seaching for treasure in a maze. sample maze
Lab 13 22-25 Apr (pdf) An automatic robot: he turned into a video game.