112 1st Midterm Review topics
Topic areas:
Assignments
Labs
Lecture (Chapters 1, 3, 4, appendix A)
Exam topics:
Assignments
chart (too simple to ask much)
calendar (questions about classes, member functions, function calls)
telephone bill (there will be questions about linked lists)
Labs
intro to unix, not room for questions
intro to g++, not much room
introduction to make, some room
preventing multiple includes, incremental programming, bash
practicing pointers (lots of room for questions)
Important C++ topics
short
circuit evaluation of expressions
pass
by reference
type
conversions
Asserts
what is an assert
why use them
how do they work
C++ classes
private
& public components
constructors
destructors
Object-oriented programming
hide
information details
encapsulation
class
vs object
Memory
pointer:
a variable that holds an address in memory, has a type associated
with it
new/delete:
allocate and free memory
reference
variables as parameters: pass by reference vs. pass by value
*
operator: declare a pointer, dereference a pointer variable
&
operator: declare a reference variable, get the address of a
variable
Linked Lists (lots of points on the exam are for linked lists)
Basic idea
use
dynamic memory (new/delete) to create memory
link
pieces of the data together
Must be able to write code that manipulates a linked list
insert at the
beginning
insert at the end
insert so list is sorted
delete (beginning,
specified element, end)
be careful of special cases:
empty list
element at the
beginning
element at the end
failure (e.g. can't find the element to remove)
head pointer
head AND tail pointers
Must be able to write code that you have not see in class
Resources