Class 1 ‑ | Tue 27‑Aug‑2013 |
Quick introductions. Why binary is very useful, Two simple programs: A, B. Setting up a visual studio project. | ||||
Class 2 ‑ | Thur 29‑Aug‑2013 | Running some programs, defining and calling functions. Strings, ints, and doubles; the basic rules of C++ arithmetic + - * / %. Be careful to say exactly what you want. The computer will do exactly what you say. | ||||
Class 3 ‑ | Tue 3‑Sep‑2013 | Assembly language and binary executable code,
How not to go to Mars Experiments with triangles and squares: step 1, step 2, step 3, step 4. | ||||
Class 4 ‑ | Thur 5‑Sep‑2013 | Controlling repetition in five steps:
one ,
two ,
three ,
four ,
five . Now we can do anything. | ||||
Class 5 ‑ | Tue 10‑Sep‑2013 | More practice with functions:
An even row of squares,
a spiral of squares (nicer than we saw it),
a graph of a function (improved). Kepler's discovery, and our verification of it. | ||||
Class 6 ‑ | Thur 12‑Sep‑2013 | An improved Kepler tester, with functions that produce results. Useful variations on our established ways of controlling repetition. | ||||
Class 7 ‑ | Tue 17‑Sep‑2013 | Understanding complex repetition, and working out a to-the-power-of function. Integer overflow: the table of powers that is correct at the beginning. | ||||
Class 8 ‑ | Thur 19‑Sep‑2013 | Conscious deliberate design. Think of the requirements. Plan how a program will work and how its parts will fit together. Explore the design and look for potential problems before they surprise you. A fool-proof quadratic equation solver. | ||||
Class 9 ‑ | Tue 24‑Sep‑2013 | Colour spaces, a rainbow of spikes. Writing numbers, 351 -> "three five one" study this example. Heading towards writing numbers in english, 47 -> forty seven. | ||||
Class 10 ‑ | Thur 26‑Sep‑2013 | Introducing cout and printf (you don't need to use them yet). Carefully examining the beginnings and ends of function calls. Prototypes let you put the important things first, improving the program that writes numbers in English. | ||||
Class 11 ‑ | Tue 1‑Oct‑2013 | How to make bees, and what a caprimulgus does at night. A scientific simulation: Brownian motion with the while loop. | ||||
Class 12 ‑ | Thur 3‑Oct‑2013 | Introduction to unix. passwd, logout, mkdir, cd, pico, (vi, vim, emacs worth looking at), ls, ls -l, mv, rm, CC, and various things. | ||||
Class 13 ‑ | Tue 8‑Oct‑2013 | Mure use of unix. control-C to stop a program, not to be confused with control-Z to suspend
one. ps, fg, kill. * can be very dangerous especially in conjunction with rm. Some
tricks for recovering from editing errors. A little bit more number saying. | ||||
Class 14 ‑ | Thur 10‑Oct‑2013 | Work on the proper assignment when you are in the lab!!! Some more exam preparation. Variables and loops - not to be used until after the break. Printing any possible int in proper English: remember to thing about guarantees of correctness for your functions, and how to extend those guarantees to a greater range. The interesting trivial guessing game. | ||||
Weekend pre-test review sessions in EB216: Saturday 3 - 5 pm. Sunday 11 am - 1 pm. Sunday 3 - 5 pm. | ||||||
Class 15 ‑ | Tue 15‑Oct‑2013 | Test Day. an old test, and another old test. | ||||
Break | ||||||
Class 16 ‑ | Tue 22‑Oct‑2013 | An automated guessing game where the computer plays with itself. function that quickly calculates square roots most of the time. | ||||
Class 17 ‑ | Thur 24‑Oct‑2013 | The final fool-proof square root function by "binary chop". Calculating sines by approximation, and conveniently plotting the graphs. | ||||
Class 18 ‑ | Tue 29‑Oct‑2013 | The dangers of complacency. cin and getline, a basic example. ifstream, ofstream, <<, >>, .fail(), and .close() in an example. | ||||
Class 19 ‑ | Thur 31‑Oct‑2013 | Reference parameters. A trianglular program that sorts variables into ascending order, but is quite a pain to type when there are a lot of variables. Perhaps we could consider writing a program to write the program for us... | ||||
Class 20 ‑ | Tue 5‑Nov‑2013 | Introducing arrays, update operators, and the "for" loop. Meta-programming: This program writes another program for us. | ||||
Class 21 ‑ | Thur 7‑Nov‑2013 | Objects (structs), old-fashioned C strings .c_str(), when is tomorrow? | ||||
Class 22 ‑ | Tue 12‑Nov‑2013 | A simulation of a complicated dangerous situation, featuring files, objects, and all sorts of things. | ||||
Class 23 ‑ | Thur 14‑Nov‑2013 | Emergency Guide!. Test preparation. Careful debugging. | ||||
Weekend pre-test review sessions (in lab room if possible): Saturday 3 - 5 pm. Sunday 1 - 3 pm. | ||||||
Class 24 ‑ | Tue 19‑Nov‑2013 | Some basic object examples. A bit about using debuggers and segmentation faults. The simulation actually moves. | ||||
Class 25 ‑ | Thur 21‑Nov‑2013 | Test two day. | ||||
Break | ||||||
Class 26 ‑ | Tue 3‑Dec‑2013 | Thoughts on two dimensional arrays. The final version of the simulation, showing that with a clean design, a map of the components of your program, and small well-named self-contained functions, complexity can be contained. We added a dinosaur and user interactions in just a few minutes. | ||||
Class 27 ‑ | Thur 5‑Dec‑2013 | A case study in design and development. | ||||
Class 28 ‑ | Tue 10‑Dec‑2013 | What we learned from the test, a bit more about files, arrays, and objects. | ||||
Weekend pre-exam review sessions (in lab room if possible): Saturday 14th, 3 - 5 pm. Sunday 15th, 1 - 3 pm. |
Lab 1, | Tues 3 Sept - Mon 9 Sept | |||||
(pdf) | Using visual C++ to run programs; drawing stars and stick figures. | |||||
Lab 2, | Tues 10 Sept - Mon 16 Sept | |||||
(pdf) | Divide and conquer: building big programs from little functions. | |||||
Lab 3, | Tues 17 Sept - Mon 23 Sept | |||||
(pdf) | Controlling repetition in programs. | |||||
Lab 4, | Tues 24 Sept - Mon 30 Sept | |||||
(pdf) | A video game: exploding the enemy with a cannon. | |||||
Lab 5, | Tues 1 Oct - Mon 7 Oct | |||||
(pdf) | A real-time animated clock application. | |||||
Lab 6, | Tues 8 Oct - Mon 14 Oct | |||||
(pdf) | Generating calendars and using Unix. | |||||
Lab 7, | Mon 21 Oct - Thur 24 Oct | |||||
(pdf) | A randomly generated Happy Street Scene. | |||||
Lab 8, | Mon 28 Oct - Thur 31 Oct | |||||
(pdf) | An interactive desk calculator. | |||||
Lab 9, | Mon 4 Nov - Thur 7 Nov | |||||
(pdf) | Meteorological data processing and visualisation. the data files | |||||
Lab 10, | Mon 11 Nov - Thur 14 Nov | |||||
(pdf) | Database programming under Unix. Data files: people1.txt, 2, 3, 5, 10, 20, 30, 50, 100. The special timing function. | |||||
Lab 11, | Mon 18 Nov - Thur 21 Nov | |||||
(pdf) | A robot seaching for treasure in a maze. sample maze | |||||
Lab 12, | Mon 2 Dec - Thur 5 Dec | |||||
(pdf) | An automatic robot: he turned into a video game. |