Introductory Bits. Why computers use binary instead of decimal. Working out what six times nine is. The essential take-aways from today's class. | |||||||
The missing example. A mystery object: (one), (two). Core memory, one, two, three, four. Our slightly unusual approach. Sometimes the simplest things are the hardest to do. Libraries. For mac users: How to install VirtualBox (video instructions), (text instructions). Parallels for ARM. Visual studio. Here it is. Starting to do some programming, this is our first program. Expressions, Statements, and Declarations. Types and Operators. The essential take-aways from today's class. | |||||||
Follow the rules. No PDFs. Here are all the operators we are going to see this semester. A sample of the first test. Do things the class way for now. No variables, asssignments, loops, or couts. Our first real program - solving quadratic equations. The essential take-aways from today's class. | |||||||
The lab guys' help page for getting set up. Another function definition. Adding another function, just for a further example. The rules of C++ so far. The compilation process. Counting down, counting up, tabulating a formula. The essential take-aways from today's class. | |||||||
New lab, just define the length. Turn left draw distance etc etc etc. Today's graph plotting. The essential take-aways from today's class. | |||||||
Mention HKN, Proper scaling to finish off the graph plotting. Adding up all the values a function has over a range of x values. Finding the maximum value of a function over a range. More about recursion: at top, both, string, digits. A ridiculously long program. The essential take-aways from today's class. | |||||||
Lab 3, sin, cos, radians. The perfected number speaker. Limits: ints, 10**, 2**, doubles in four programs: tens, twos, doubles, smaller. The essential take-aways from today's class. | |||||||
n.cpp, floating format. draw square, rotate a bit, screen saver (sorry, didn't upload it). Our own sine, power, factorial, sine. The essential take-aways from today's class. | |||||||
Where does the cannonball start? How do you detect victory? Seeing how the sine function gains its accuracy. Today's clicker questions. Searching an array of animal names. The essential take-aways from today's class. | |||||||
Corrected and improved sine thing from Tuesday. Today's clicky questions. We discovered the Binary Chop Search, an extremely fast method. Complexity classes, big O, and what they mean, Linear, logarithmic, quadrating, etc. Printing numbers is also logarithmic, in most ways. The essential take-aways from today's class. | |||||||
About lab 5, and when is the test? Today's clicky questions. "in most ways"? Implement binary chop search on the animals. Integer square roots by searching an array of squares, but the array is unnecessary. The essential take-aways from today's class. | |||||||
Updated HKN tutoring times. The over-estimate was dangerous. Brownian motion. Unix. The essential take-aways from today's class. | |||||||
Unix lab starts today. The correct limits for integer square root. Introduce cout. The essential Unix commands and pico/nano editor controls. Today's clicky questions. The Newton-Raphson method: The basic version, Adding an accurate print, A better first guess, The essential take-aways from today's class. | |||||||
cout << and variables. factorial, sine, fibonnaci, multiplication table, and all sorts using variables. The essential take-aways from today's class. | |||||||
Today's clicky question. You must verify. Test review. Be prepared with questions or it won't be much help. All constants! | |||||||
First test. Do not use variables, functions and consts only. Questions as in the sample:
| |||||||
A few words about the new calculator lab. Click for attendance only. A very simple triangle, soon to be complicated into a fractal star. Introducing the official libraries <iostream>, <string>, <iomanip>, <fstream>, <cmath>. More loops with variables: Collatz (with a break statement) and binary chop square roots. We almost reformatted this familiar file. The essential take-aways from today's class. | |||||||
Continuing from last class, I want atomic number, then name, then symbol, then atomic weight, in nice columns. First by manipulating strings and numbers, and here are The ASCII codes. Second the easy way with setw. Attempting a word count on Peter Pan, too hurried, the mistake is obvious. The essential take-aways from today's class. | |||||||
The completed Peter Pan word count, ignoring punctuation and case insensitive. Today's clicky question (actually it was meant for Tuesday). You must verify. Foolish EBCDIC and new unicode. <cctype>: All of its functions, and the program that produced that table. Using structs for the elements. The essential take-aways from today's class. | |||||||
Things from the mid-term: analysing and creating recursive functions. Today's clicky question. You must verify. Only a little time left, so just improving the structure of the periodic table program. | |||||||
We got a long way with our chemistry calculator, (there are some important reminders at the top of that file). It introduced the idea of a method, which is the big thing in Object Oriented Programming. The essential take-aways from today's class. | |||||||
A bit about labs 11 and 12 with two dimensional arrays. Today's clicky question. You must verify during class. The triangular sorting thing. The essential take-aways from today's class. | |||||||
The complete chemistry calculator, parentheses and all. Teaching C++ how to use fractions, only the beginning. The essential take-aways from today's class. | |||||||
Forgot to do this: Today's clicky question. You must verify during class. What we did today: the pdf part (only q7), and the parts done on rabbit. | |||||||
Second mid-term. The topics are: Doing useful things with loops and variables, Working with files and strings, and Working with classes and objects. First sample, and second sample. | |||||||
Finishing fractions, normalisation and greatest common divisor. A little bit about mathematical things in <cmath>, link near the top of this page. Half way through the adventure of the boy and the bull. | |||||||
Finish the simulation, This is a less complicated version. updates, do, for, and switch. The complex numbers business and the strange behaviour of z = z2+c. | |||||||
Whatever needs to be said about the second test. Some Julia sets, and a map of them, the Mandelbrot set. |
Lab 1, | Mon 28 Aug, Tue 29 Aug, Wed 30 Aug, Thur 31 Aug | |||||
(pdf) | Using visual C++ to run programs; drawing stars and stick figures. | |||||
Lab 2, | Mon 11 Sept, Tue 5 Sept, Wed 6 Sept, Thur 7 Sept | |||||
(pdf) | Divide and conquer: building big programs from little functions. | |||||
Lab 3, | Mon 18 Sept, Tue 12 Sept, Wed 13 Sept, Thur 14 Sept | |||||
(pdf) | Controlling repetition in programs. Part C2 is for extra credit only. | |||||
Lab 4, | Mon 25 Sept, Tue 19 Sept, Wed 20 Sept, Thur 21 Sept | |||||
(pdf) | A video game: blowing things up with a cannon. (the useful functions whose names I couldn't remember are get_x_position() and get_y_position()) | |||||
Lab 5, | Mon 2 Oct, Tue 26 Sept, Wed 27 Sept, Thur 28 Sept | |||||
(pdf) | A real-time animated clock application. | |||||
Lab 6, | Mon 9 Oct, Tue 3 Oct, Wed 4 Oct, Thur 5 Oct | |||||
(pdf) | Generating calendars and using Unix. | |||||
Lab 7, | Mon 23 Oct, Tue 10 Oct, Wed 11 Oct, Thur 12 Oct | |||||
(pdf) | A happy street scene. | |||||
Lab 8, | Mon 30 Oct, Tue 24 Oct, Wed 18 Oct, Thur 19 Oct | |||||
(pdf) | An interactive desk calculator. | |||||
Lab 9, | Mon 6 Nov, Tue 31 Oct, Wed 25 Oct, Thur 26 Oct | |||||
(pdf) | Meteorological data processing and visualisation. the data files. | |||||
Lab 10, | Mon 13 Nov, Tue 7 Nov, Wed 1 Nov, Thur 2 Nov | |||||
(pdf) | Database programming under Unix. The special timing function. | |||||
Lab 11, | Set: Mon 27 Nov, Tue 14 Nov, Wed 8 Nov, Thur 9 Nov. | |||||
Due: Mon 4 Dec, Mon 27 Nov, Wed 15 Nov, Thur 16 Nov. | ||||||
(pdf) | A robot seaching for treasure in a maze.
sample maze;
alternate sample. | |||||
Lab 12, | Set: Mon 4 Dec, Tue 28 Nov, Wed 15 Nov, Thur 16 Nov. | |||||
Due: Mon 11 Dec, Tue 5 Dec, Wed 29 Nov, Thur 30 Nov. | ||||||
(pdf) | An automatic robot: he turned into a video game. |