ECE118 R (Programming 1) Fall 2021
Tues, Thurs 2:40 - 3:55 in MM 316

Class History

Class 1  ‑ Tue 24‑8‑2021   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.
HKN free tutoring via umiami.hkn@gmail.com: Their schedule.
Types and operations.
A sample of the first test.
Class 2  ‑ Thur 26‑8‑2021 Defining and using functions.
Solving quadratic equations: step 1, step 2, step 3.
Controlling repetition: step 1, step 2, step 3.
Class 3  ‑ Tue 31‑8‑2021 How to install VirtualBox and Visual studio; Parallels for non-intel.
Setting up a visual studio project.
Printing a table of values,
Plotting a graph,
Increasing values instead of decreasing,
What does this function do?
Class 4  ‑ Thur 2‑9‑2021 What do these functions do? one, two.
Introducing the array.
Investigating the limits of ints and doubles.
A ridiculously long program.
Starting to make it better.
Class 5  ‑ Tue 7‑9‑2021 Finishing Thursday's last program: step one, step two, step three, step four.
A program that writes a program for us.
Functions that return values (days in month).
Class 6  ‑ Thur 9‑9‑2021 Creating our own sine function,
The sum of a series, function parameters,
A shape that's almost a circle: version one, version two,
Drawing a circle sensibly.
An array of animal names,
Searching through an array.
Class 7  ‑ Tue 14‑9‑2021 The expected number of steps to search is half N with this algorithm.
The Binary (chop) Search,
It now takes only log2(N) steps to search.
Adapting the program to provide a dictionary.
A guessing game, the user has to guess a number,
Now the computer gets to play the game.
Class 8  ‑ Thur 16‑9‑2021 Preparing to search for square roots.
Making a table of squares using a file,
Searching it to find square roots,
Doing the same without an array,
Finding the square root of a double.
Printing Collatz sequences,
Graphing the lengths of Collatz sequences.
"abc" is not a string, yet.
Class 9  ‑ Tue 21‑9‑2021 Beginning with a simple encryption scheme,
Encryption and Decryption completed.
A fancy triangle turns into a star, a snowflake, then a nice fractal.
Recursion vastly simplifies the program,
It can even be done with a square, with surprising results.
The binary operations & | ^ ~ >> <<.
Class 10  ‑ Thur 23‑9‑2021 Printing a number in binary,
Skipping the leading zeros,
Introducing the while loop: Brownian motion,
Introducing the HLS colour system,
An insane screen saver,
Introducing the break statement,
Do you want to go again?,
Be careful of stray semicolons.
Class 11  ‑ Tue 28‑9‑2021 All about using unix.
The commands we looked at.
Class 12  ‑ Thur 30‑9‑2021 Review day.
Class 13  ‑ Tue 5‑10‑2021 First mid-term.
A sample test, and another sample.
Class 14  ‑ Thur 7‑10‑2021 Introducing variables, cin, and the standard #includes.
Class 15  ‑ Tue 12‑10‑2021 More with variables:
A linear search of animals,
Binary chop search again,
Introducing the for loop,
A multiplication table,
Calculating sines.
Class 16  ‑ Thur 14‑10‑2021 a short break
Class 17  ‑ Tue 19‑10‑2021 Trying to put two ints in order, it needed a reference parameter, all fixed.
Sorting three numbers,
Four, five, we see a pattern: eight numbers.
Changing it to an array,
A slightly faster method,
Timing it, and noticing that time is proportional to data size squared.
Class 18  ‑ Thur 21‑10‑2021 Converting a file to all capitals, first attempt,
second attempt, introducing <cctype>,
third attempt, got it right.
Peter Pan:
Counting all the "the"s in a file, first attempt,
second attempt, introducing a Finite State Machine.
Starting to count occurrences of all words in a file.
Class 19  ‑ Tue 26‑10‑2021 What we learned from the test.
Class 20  ‑ Thur 28‑10‑2021 Completing the Peter Pan word count.
A Chemistry data file.
Processing chemical formulae: step one, step two, step three, step four.
Class 21  ‑ Tue 2‑11‑2021 Introducing structs and objects.
And improving our chemistry calculator: five, six, seven, eight, nine.
Class 22  ‑ Thur 4‑11‑2021 Finishing the chemistry calculator, Step ten.
String operations.
When 0.1 * 10000000 may not equal 1000000.
Showing C++ how to work with fractions.
Class 23  ‑ Tue 9‑11‑2021 Test preparation day.
Class 24  ‑ Thur 11‑11‑2021 Second mid-term.
A sample, and another sample.
Class 25  ‑ Tue 16‑11‑2021 Finishing the fractions library,
Separate compilation: making and using .h and .o files.
Starting the boy and the bull simulation.
Class 26  ‑ Thur 18‑11‑2021 Completing the boy and bull simulation, and adding a fourth actor.
Teaching C++ how to use complex numbers.
Break
Class 27  ‑ Tue 30‑11‑2021 Further exploring the behaviour of complex numbers,
The Mandelbrot set,
Some Julia sets.
Class 28  ‑ Thur 2‑12‑2021 What we learned from the second test.
Class 29  ‑ Tue 7‑12‑2021 Final exam preparation


Lab Assignments

Submit assignments as a single document (word documents are preferred), including all your code and screenshots of it running, to ecegrader @ gmail.com
Lab 1,   Mon 30 Aug - Thur 2 Sep
(pdf) Using visual C++ to run programs; drawing stars and stick figures.
Lab 2, Tue 7 Sept - Mon 13 Sept
(pdf) Divide and conquer: building big programs from little functions.
Lab 3, Tues 14 Sept - Mon 20 Sept
(pdf) Controlling repetition in programs.
Part C2 is for extra credit only.
Lab 4, Tue 21 Sept - Mon 27 Sept
(pdf) A video game: Space Invaders with a cannon.
Lab 5, Tue 28 Sept - Mon 4 Oct
(pdf) A real-time animated clock application.
Lab 6, Tue 5 Oct - Mon 11 Oct
(pdf) Generating calendars and using Unix.
Lab 7, Mon 18 Oct - Thur 21 Oct
(pdf) A randomly generated Happy Street Scene.
Lab 8, Mon 15 Oct - Thur 28 Oct
(pdf) An interactive desk calculator.
Lab 9, Mon 1 Nov - thur 4 Nov
(pdf) Geographical and Meteorological data processing and visualisation. Data file: state outlines.
Hurricane tracks: 2017_hur_dat.txt, 2016, 2015, 2014, 2013, 2012, 2011, 2010,
2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000.
(All the files in one .zip file).
Lab 10, Mon 8 Nov - Thur 11 Nov
(pdf) Database programming under Unix.
The special timing function.
Lab 11, Mon 15 Nov - Thur 18 Nov
(pdf) Due dates: Mon 29 Nov to Thur 2 Dec.
A robot seaching for treasure in a maze. sample maze; alternate sample.
Lab 12, Mon 29 Nov - Thur 2 Dec
(pdf) An automatic robot: he turned into a video game.

Last Semester's Lab Assignments

These are just to give you an idea of what's coming. This semester's labs will be slightly different. Beware: you don't get any points for doing the wrong assignment.