| Class 1 ‑
|
| Tue 23‑8‑2022 |
| Quick introductions, syllabus, policies, what the class is all about.
Why computers use binary instead of decimal.
Working out what six times nine is.
Sometimes the simplest things are the hardest to do.
Types and operations.
A sample of the first test.
|
|
| Class 2 ‑
|
| Thur 25‑8‑2022 |
| How to install VirtualBox (video instructions), (text instructions) for intel-inside macs; parallels for new ARM macs.
And here's Visual studio.
Setting up a visual studio project.
Defining and using functions
Solving quadratics, getting both solutions,
introducing the "if": What if there are no solutions?
|
|
| Class 3 ‑
|
| Tue 30‑8‑2022 |
| The lab guys' help page for getting set up.
Interactive input to a program, and a function that produces a result.
The scheme for repeating something 100 times.
Adapting it to produce a table of useful values.
And plotting a graph has become very easy.
Plotting the graph the "right" way round.
Displaying the useful table in the right (ascending) order.
Working out what this mystery function does, the little sand-boxes.
|
|
| Class 4 ‑
|
| Thur 1‑9‑2022 |
| Remind me to start zoom!
What do these functions do?
one,
two.
Introducing the array.
A ridiculously long program for us to improve.
first step,
second step.
|
|
| Class 5 ‑
|
| Tue 6‑9‑2022 |
| Updated instructions, including for Parallels.
Completing our number-saying function,
Exploring the limits of ints with ten-to-the-power-ofs,
The same but with two-to-the-power-ofs,
Exploring the limits of doubles,
More with functions that return values: days in a month.
|
|
| Class 6 ‑
|
| Thur 8‑9‑2022 |
| Drawing a polygon and getting it right this time.,
Introducing the helper functions to make things easier on our users,
A bunch of squares in a circle,
Dawing a circle the sensible way,
Making it even better,
A sine function of our own,
Starting to search an array of animal names.
|
|
| Class 7 ‑
|
| Tue 13‑9‑2022 |
| Searching the array of animals to see where a given word appears,
Easily speeding up the search a bit,
Finding the size of the array when there is no sentinel value,
The binary chop search,
The new search is "logarithmic", the old one was "linear": what that means.
|
|
| Class 8 ‑
|
| Thur 15‑9‑2022 |
| Guessing game: the computer thinks of a number and the human tries to guess it,
Now the human thinks of a number and the computer has to guess it,
Preparing to calculate some square roots,
Finding the integer square root of a number by binary chop search,
Eliminating the array,
Trying to adapt it to work for doubles.
|
|
| Class 9 ‑
|
| Tue 20‑9‑2022 |
| Successfully finding the square root of a double,
Printing the Collatz sequence,
Graphing the lengths of collatz sequences,
Trying to encrypt something (it doesn't work yet).
|
|
| Class 10 ‑
|
| Thur 22‑9‑2022 |
|
Completing our basic encryption program,
Making it decrypt as well, with a very small modification,
Drawing a very fancy triangle, it turns into a snowflake,
Going all the way with recursion,
Making the program work out the total perimeter of the shape,
Doing it with a square instead,
The basics of the binary system.
|
|
| Class 11 ‑
|
| Tue 27‑9‑2022 |
| On-line by zoom only due to the weather.
More about binary numbers, and the "bitwise" C++ operators,
Today's notes.
|
|
| Class 12 ‑
|
| Thur 29‑9‑2022 |
| Completing the print-in-binary program,
Making it skip leading zeros,
Printing in octal - too complicated,
Counting the number of 1's in a binary number.
Brownian motion - it crashed because it ran out of memory,
Introducing the while loop and fixing the problem.
|
|
| Class 13 ‑
|
| Tue 4‑10‑2022 |
| Starting with Unix: Today's partial notes.
Another slightly better use of a while loop.
|
|
| Class 14 ‑
|
| Thur 6‑10‑2022 |
| Preparing for the test.
|
|
| Class 15 ‑
|
| Tue 11‑10‑2022 |
| First mid-term exam. Remember: no loops or variables.
A sample test, and another sample.
|
|
| Class 16 ‑
|
| Tue 18‑10‑2022 |
| A very simple screen saver,
Variables and related things.
Lots of examples using variables and loops.
|
|
| Class 17 ‑
|
| Thur 20‑10‑2022 |
| What we learned from the test.
|
|
| Class 18 ‑
|
| Tue 25‑10‑2022 |
| The fibonnaci sequence again,
The Collatz sequence again,
An improvement on that,
The multiplication table again,
An improvement on that,
Introducing the ifstream, being able to read from disc files.
|
|
| Class 19 ‑
|
| Thur 27‑10‑2022 |
| Reading a file with an ifstream,
Reversing the words in a file with a variable array,
A normal linear search with a while loop,
Binary chop search with a while loop,
Introducing the update operators and the for loop.
|
|
| Class 20 ‑
|
| Tue 1‑11‑2022 |
| A word about this week's lab.
More practice with the new stuff:
factorial again,
the multiplication table again,
and a better way of doing that,
finding the smallest number in an array,
A data file for us to reformat, and the program that does it,
Files: how many times does "the" appear in the text of Peter Pan?
Beginning a complete word count for Peter Pan.
|
|
| Class 21 ‑
|
| Thur 3‑11‑2022 |
| Completing the word count.
Trying to put two ints in order,
Introducing the reference parameter to make it work,
three numbers,
four numbers,
five numbers: a clear pattern is emerging,
Preparing to sort an array.
|
|
| Class 22 ‑
|
| Tue 8‑11‑2022 |
| Completing the sort of the array,
Improving the word count by sorting the results,
Introducing objects, often called structs instead,
Improving the word count program by using objects,
A familiar data file for us to work on,
Starting to process the table of elements.
|
|
| Class 23 ‑
|
| Thur 10‑11‑2022 |
| Today's class will be in our normal classroom as usual, NOT by zoom after all.
Continuing with the table of elements study, making it able to search the table,
Another struct, to let us process a whole formula correctly,
Calculating the whole molecular weight,
Dealing with numbers in a formula.
|
|
| Class 24 ‑
|
| Tue 15‑11‑2022 |
| Preparing for the second test.
Here are the three sample questions that we looked at:
one,
two,
three, and
the extra little bit at the end.
|
|
| Class 25 ‑
|
| Thur 17‑11‑2022 |
| Second mid-term. Topics: Arrays, Files, and Structs.
First sample, and a second sample.
|
|
| Class 26 ‑
|
| Tue 22‑11‑2022 |
| Special reading assignment:
Read about the history of programming languages
here.
It is not a long article. Make sure you look up any terms that you do not fully understand.
There will be a quiz.
|
|
| Class 27 ‑
|
| Tue 29‑11‑2022 |
| What we learned from the second test.
Don't write all the way up to the corner.
And finishing off the little fractions example.
|
|
| Class 28 ‑
|
| Thur 1‑12‑2022 |
| A computer-based physical simulation: The Boy and the Bull.
|
|
| Class 29 ‑
|
| Tue 6‑12‑2022 |
| Latest possible dates.
(Proper indentation, sensible names, function with clear objectives, etc)
Any questions towards the final exam.
|
|
| *
|
| Wed 14‑12‑2022 |
| Latest possible date for anything to be submitted.
|
|
| Lab 1,
| Mon 29 Aug - Thur 8 Sep (Extended time)
|
|
|
| (pdf)
|
| Using visual C++ to run programs; drawing stars and stick figures.
|
|
| Lab 2,
| Mon 12 Sept - Thur 15 Sept
|
|
|
| (pdf)
|
| Divide and conquer: building big programs from little functions.
|
|
| Lab 3,
| Mon 19 Sept - Thur 22 Sept
|
|
|
| (pdf)
|
| Controlling repetition in programs.
Part C2 is for extra credit only.
|
|
| Lab 4,
| Mon 26 Sept - Thur 29 Sept
|
|
|
| (pdf)
|
| A video game: Space Invaders with a cannon.
(drawing the cannon properly is optional, you can just use a rectangle instead).
|
|
| Lab 5,
| Mon 3 Oct - Thur 6 Oct
|
|
|
| (pdf)
|
| A real-time animated clock application.
|
|
| Break
| Mon 10 Oct - Wed 12 Oct
|
|
|
|
|
| No formal labs this week, but the lab guys will be there to help if needed.
|
|
| Lab 6,
| Mon 17 Oct - Thur 20 Oct
|
|
|
| (pdf)
|
| Generating calendars and using Unix.
|
|
| Lab 7,
| We are skipping Lab 7 this semester and going straight to Lab 8.
|
|
| Lab 8,
| Mon 24 Oct - Thur 27 Oct
|
|
|
| (pdf)
|
| An interactive desk calculator.
|
|
| Lab 9,
| Mon 31 Oct - Thur 3 Nov
|
|
|
| (pdf)
|
| Meteorological data processing and visualisation. the data files
|
|
| Lab 10,
| Mon 7 Nov - Thur 10 Nov
|
|
|
| (pdf)
|
| Database programming under Unix.
(You do not need to use "structs" as step 1 says, you may use seven separate arrays instead).
The special timing function.
|
|
| Lab 11,
| Mon 14 Nov - Thur 17 Nov
|
|
|
| (pdf)
|
| Due dates: Mon 28 Nov to Thur 1 Dec.
A robot seaching for treasure in a maze.
sample maze;
alternate sample.
|
|
| Lab 12,
| Mon 28 Nov - Thur 1 Dec.
|
|
|
| (pdf)
|
| An automatic robot: he turned into a video game.
|
|
| Wed 14 Dec.
|
|
|
|
|
| Latest possible date for submtting anything.
|
|