Final Project Due Dec 10
Cumulative review and exam prep.
Homework: Finish your final project!
What is a switch statement and how do you use one?
What is the difference between an interpreted and a compiled program?
Where should we go from here?
(final exam review pt. 1)
Homework: Finish your final project!
Bring your final project code to lab!
Homework: Finish your final project!
no slides
What is NULL?
Why should you initialize pointers to NULL (or 0)?
What is meant by "dynamic memory allocation?"
How do you tell the computer to allocate memory for you? (new)
How do you tell the computer to release allocated memory? (destroy)
How can you allocate memory for an array of objects?
Homework: Read section 9.4 and complete assignment AllocatedTriangles.
When you assign a value to a variable, where does it go?
What is a variable reference? (&)
What is a pointer? How do you declare one?
What does it mean to dereference a pointer? (*)
How does const (used in two ways) affect how you can manipulate pointers?
What do arrays have to do with pointers?
What is special about incrementing array pointers?
Homework: Read pages 397 - 408.
no slides
Classes and operator overloading review
Friend functions review
Friend functions and operator overloading review
Homework: No new homework; complete assignments TrianglePrep, TimeByInterface, SearchStratagems AND FINAL PROJECT DOC.
no slides
Homework: complete assignments TrianglePrep and TimeByInterface.
friend Functions(exam review)
What is a friend function and how do you use one?
Homework: complete assignment SearchStrategems (due Nov 24)
What is operator overloading and why is it convenient?
How do you overload operators?
Homework: read 10.1 & 10.2, complete assignment SolidOperator
no slides
Homework: Prepare for midterm exam II.
no slides
What are getters and setters?
What canonical pattern do typical getters and setters follow?
Homework: Complete assignment RandomHikerSearch
code: solid-class.cpp, CubeClass.h, CubeClass.cpp
What is an object? How do we program with real-world objects?
What are some general properties of objects?
How do you use the dot operator?
What is a class? (How do you tell a computer what your real-world object is like?)
What do keywords private and public do?
How do I define a class? How do I implement member functions?
What is a constructor? How do I declare one? How do I use one?
Homework: Read 8.1, 8.2, 8.4, 8.7 and complete assignment SolidBeginningsClass
function overloading notes, threshold-data.cpp, input-validation.cpp
What is function overloading and how do you do it?
Homework: Choose your final project partner, complete assignments ThresholdDataFunction (our version) and OverloadedInputValidation (official version).
yay for you
Homework: Choose your final project partner.
rand()omness, LostHikerWhat is special about computers and randomness?
What is a random seed value and why might you always need one?
How do you use rand() and srand() properly?
LostHiker algorithm review, implementation.
Homework: Read 5.5, review slides and complete assignment LostHiker.
How do you declare a function that doesn't return anything?
How do you declare a function that doesn't require any input?
How should you declare const parameters?
What are static const global variables and how do you declare them?
How are array arguments passed?
How do you declare a formal parameter that is an array? (1d, 2d)
What is the Bubble Sort algorithm?
Homework: Review slides and complete assignment BubbleSort.
no slides
Functions review
How do you use a header (.h) and implementation (.cpp) file to define your functions?
What is scope?
What is pass-by-value? What is pass-by-reference?
Homework: Read 5.2 - 5.3 and complete assignment ReferenceSolidMetrics
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?
What is a header file?
Homework: Read 5.2 - 5.3 and complete assignment SolidBeginningsFunction
no slides
How do I ace the midterm?
Homework: study for midterm exam 1.
strings, LetterFrequency, PowerPlantDailyAverageWhat is the difference between a class and an object?
How does a string object behave (what functions does a string object provide)?
Homework: read chapter 6.9 and complete assignments LetterFrequency and PowerPlantDailyAverage.
Array review
What is a two-dimensional array?
What are some ways to envision the structure of a 2D array?
How do you access and assign values in a 2D array?
How do you typically loop over a 2D array?
Homework: read chapter 7.1 and complete assignment PowerPlantAverage.
no slides
What data structure can you use to hold multiple values of a particular type?
What is an array?
How do you declare and initialize an array?
How can you assign a value to one position in an array?
Why does array size matter?
How can you create a loop to access/manipulate all values in an array?
Homework: read chapter 6.1 and complete assignment ThresholdData.
no slides
How can you get a whole line of text using getline()?
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 line of input from cin?
Homework: Complete assignments SutureRejects and CodeAdvice.
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: Complete assignment ShiftCipher.
no slides
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: Complete assignment IntegerChars.
Homework: Complete assignment LoopRunTimes and TimberRegrowthYears.
while loops)How do you use a for loop?
How can you escape a loop?
while loops)How do you use a while loop?
What is an infinite loop?
What is the difference between while and do while?
In general, when should you use a while loop rather than a for loop?
Homework: Read 3.4. Complete assignment FiveModSum.
if, else if, InputValidation, PaperScissorsRockHow do you use an if statement? (review)
Homework: Complete assignments InputValidation and PaperScissorsRock.
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: Read 3.3 (skip 'conditional operator' and switch). Complete assignment AsciiExplorations.
Who is George Boole?
What is pseudocode?
What do the weird flowchart symbols mean?
What is a boolean expression?
What are the boolean operators and how do they work?
Homework: Read 3.1, 3.2. Complete assignment BooleanExpressions.
What do we mean by procedural?
What happens when you have operations with different variable types? (p50 - 51 "mixed operation")
What is casting? (p51)
Homework: Complete assignments TKtoTF and AminoAcidWeight.
Comments, case sensitivity, variable names, types, variable declaration syntax, constants, operators, increment/decrement, cmath library, functions (in brief).
Simple text formatting with cout (see pages 58 - 62).
Homework: Finish reading chapter 2.1 - 2.4, 2.7. Complete assignment SectorArea.
slides and supplement
Who is Alan Turing? What is a Universal Machine?
What are some "cool" things programs can do?
C++ program structure, preprocessing directives, main(), code blocks, variables, types, I/O, CIN, COUT.
Homework: Read chapter 2.1 - 2.4, 2.7. Complete assignment NewtonToPounds.
Who is Bjarne Stroustrup?
Set up your development environment
Compile and run a program
Understand what we just did
Homework: Finish chapter 1 (skip 1.4). Complete assignment SolidBeginnings.
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. Read and understand the syllabus.
Justin Hall's breakdown video.
A description of Live Coding at Shunt Lounge 1 Oct 2009
Highly recommended viewing (not just about Archaeopteryx).
If Giles postmodern programmer-bum story is too much for you, here's a more pragmatic essay.