What have we learned this semester?
Homework: Prepare for the final exam and complete the final project.
What is a pointer?
How do you interpret hexadecimal numbers?
What do the & and * operators mean?
What do the & and * do?
Homework: Read and execute the pointers sample code, continue the final project.
no slides
Homework: Continue the final project.
What are "events" and "interrupts?"
What are "event handlers?"
How do you capture mouse and keyboard events with OpenFrameworks?
How do you add new files to a Visual Studio project?
What is the stack?
What happens to the stack when a function is called?
What is a stack frame?
What is the heap?
Homework: Choose your final project partner and email your instructor.
no slides
Homework: Choose your final project partner and email your instructor.
no slides
Homework: No new homework.
What is a "callee" or "calling object?"
What is method chaining? How do you use it?
What is a "helper method" or "helper function?" What are they for? Why do they tend to be private?
What is Brownian Motion aka Random ("Drunkard's") Walk?
Homework: Complete assignment 30_randomWalk.
How might you model a Troll battle?
What does it mean to "pass by value?"
How are arrays passed to functions?
What is pass-by-reference?
How do you pass objects to functions by reference?
How can you use external files to contain your function definitions?
Homework: Complete assignment 29_trollBattle.
How do you declare private data members and functions?
What are accessor methods?
What is the common pattern/convention to follow when implementing accessors?
How do you declare class constants?
Homework: Complete assignment 27_betterBox.
What is a class?
How can we use "classes" to define new "things" to the machine?
How do you define a class?
What are member variables? How do you create and define member variables?
What is a constructor?
How do you define and implement a constructor?
Homework: Complete assignment 26_boxTest.
string ObjectsWhat is an object?
What do we mean when we say "an object encapsulates properties and behavior?"
Who "invented" the first object-oriented program?
How do you "talk to" or "send messages" to objects?
What are some common contexts for the "dot operator?"
Homework: Complete assignment 23_stringTest.
What are multi-dimensional arrays?
How do you declare and use two-dimensional arrays?
What are some helpful visual metaphors when thinking about 2D arrays?
What are some common patterns and use cases for 2D arrays?
Homework: Complete assignment 21_dataMatrix.
How are variables stored in memory?
How are arrays stored in memory?
What are some benefits and drawbacks to arrays?
What do we mean when we say arrays provide access in "constant time?"
What is so special about searching and sorting?
Homework: Complete assignment 20_colorSquares.
no slides
How do you use arrays in C++?
Why are for loops a natural complement to arrays?
Homework: Finish reading Etter 6.1.
Exam recap.
What is a data structure?
What is an array?
How do you use arrays in C++?
Why are for loops a natural complement to arrays?
Homework: Read Etter 6.1 and complete 19_meetArray.
no slides
How do we ace the midterm exam?
Study for exam I.
no slides
What are some factors that determine an algorithm's "quality?"
What do we mean by "computational complexity?"
What is "Big O" notation?
Study for exam I.
no slides
No new homework!
no slides
How are local variables in one scope separate from variables in other function scopes?
What is recursion?
Homework: Complete assignment 18_factorial.
Functions review (parameters v arguments)
What is scope? How does it work?
Homework: Complete assignment 17_robotArmy and read Etter page 204.
no slides.
How can you create reusable functions that encapsulate common tasks?
Homework: Complete assignment 16_datingDiary.
How do you declare a function prototype above main and definition below?
What is the difference between parameters and arguments?
What does it mean to "pass by value?"
What is scope? How does it work?
Homework: Complete assignment 15_robot and review Etter 5.1, 5.2 and 5.3 to page 198.
What is a function, in general?
What is a function in C++?
What are the parts of a function?
What is a user-defined function? What is a library function?
What is a formal parameter? What is an argument?
How do you declare, implement and use a function in your program?
Homework: Read Etter 5.1, 5.2 and 5.3 to page 198. Complete assignment 14_volumeFunction.
no slides.
What unwanted behavior happens when you try to open both an ifstream and an ofstream on a file simultaneously?
How can you capture more than one piece of input from an input stream?
Homework: Complete assignment 13_simpleStats.
What is the general boilerplate code for basic file I/O?
How can you tell your program to create a file?
How do datatypes affect the behavior of reading input streams?
Homework: Read Etter pages 144 - 145, 4.5 and complete assignment 12_shiftCipher.
How do you tell your program to open and close a file?
How can you get your program to work with the contents of a file?
Which C++ library do you need to work with filestreams?
Homework: Read Etter 4.2 and complete assignment 11_dataAverage.
Homework: Complete assignment numberGuessing and read Etter 3.5.
for loops) and Intro to Pseudo-RandomnessHow do you use a for loop?
How can you escape from a loop?
What are some common for loop patterns?
In general, when should you use a while loop rather than a for loop?
How might you convert a while loop to a for loop, and why would you do this?
How do you use rand() to generate a pseudo-random number?
What do we mean by pseudo-random?
Homework: Complete assignment 09_bottles.
while loops)How do you use a while loop?
What is an infinite loop?
In general, when should you use a while loop rather than a for loop?
What is the difference between while and do while?
What do break and continue do?
What are some common loop patterns?
Homework: Read Etter 3.4. Complete assignment 08_bottles.
if, else if, else)no slides
How might you use selection statements and your knowledge of character codes to create a simple game?
Homework: Complete 07_rockPaperScissors.
if, else if, else)How can you teach a computer to make decisions?
What are "selection statements"?
How do you use an if statement?
How are ints and bools related?
How do cin and cout treat bool values?
What are ASCII numeric codes for characters?
Homework: Reading chapter 3.3 and complete 05_asciiExploration.
How can I use screen specs, flowcharts, and pseudocode to guide my construction of a program?
What do the weird flowchart symbols mean?
Who was George Boole?
What is Boolean logic?
What are the Boolean operators and how do they work?
How do you declare boolean expressions?
Remember: expressions get evaluated and yield a value
Homework: Reading chapter 3.1 & 3.2 and complete 05_booleanExpressions.
no slides
What is linear interpolation, how is it useful in an engineering context?
How do you implement a linear interpolation expression in C++?
Homework: Finish reading chapter 2 and complete 04_linearInterpolation.
Who is Alan Turing? What is a "Universal Machine?"
How do you declare variables?
What are some rules (both style and syntax) about variable names?
What are the primitive datatypes?
What do we mean, in general, when we talk about "classes" of things?
What does the % operator mean?
Why is C++ called C++ and how does the increment operator work?
Homework: Continue reading chapter 2 and complete 03_aircraft.
What happens when you "compile and run" a program?
What are object files?
What is the general structure of a C++ program?
How do you describe facts about the world that do change to the machine?
What do cout and cin do?
Homework: Begin reading chapter 2 and complete 02_sphereVolume.
Review: how do you describe facts about the world, that don't change, to the machine?
What does const indicate?
How should you set up your development environment?
How do you compile and run a program in Visual Studio?
Homework: Continue reading chapter 1 (skip 1.4) and complete 01_helloWorld.
Introductions
What's a modern computer system? What is hardware? Software?
What do we mean by abstraction?
What is a computer program?
Who is Ada Lovelace?
Why are computer languages so weird?
Why program?
Administrivia.
Homework: Read chapter 1 (skip 1.4). Enroll in blackboard course. Enroll in Piazza. Read and understand the syllabus.
Highly recommended viewing (not just about Archaeopteryx).
If Giles postmodern programmer-bum story is too much for you, here's a more pragmatic essay.
Justin Hall's breakdown video.
A description of Live Coding at Shunt Lounge 1 Oct 2009
< > ! * ' ' #
^ " ` $ $ -
! * = @ $ _
% * < > ~ # 4
& [ ] . . /
| { , , SYSTEM HALTED
Waka waka bang splat tick tick hash,
Caret quote back-tick dollar dollar dash,
Bang splat equal at dollar under-score,
Percent splat waka waka tilde number four,
Ampersand bracket bracket dot dot slash,
Pipe curly-brace, comma comma CRASH.
Fred Bremmer and Steve Kroese, 1990 Infocus