CS 202 Fall 2013 > Notes for Tuesday, October 22, 2013 |
CS 202 Fall 2013
Notes for Tuesday, October 22, 2013
General Review
Summary of Topics Covered
Not listed in the order covered in class.
- Development Methodology
- Get it to compile
- Testing
- The Basics of Classes
- member function
- member variable
- public, private, protected
- object
- objects in a container
- accessor & mutator
- header/source conventions
- inline
- constructors
- default ctor
- constructing members
- destructor
- friend functions
- Allocation & Compiler-Generated Functions
- 3 kinds of allocation
- Lifetime
- Pointers
- dynamic
- non-array, array
- RAII
- Compiler-generated functions
- Law of the Big Three
- Parameter Passing
- 3 ways
- Conventions for objects, simple types
- Return values
- Scope, etc.
- Scope
- Local, member, global
- Static members
- Operator Overloading
- Function name
- Operands
- Precedence, associativity, arity
- Member vs. global
- Make non-fundamental out of fundamental
- Special cases
operator++
operator<<
,operator>>
operator=
(member, swap trick)
- Object-Oriented Programming
- Idea
- Inheritance
- Constructing & the base class
- redefining base-class members
- Access via Base::
- Polymorphism
- Virtual functions
- Using with pointers
- Using with references
- Using with
shared_ptr
,make_shared
- Class hierarchies
- Pure virtual functions & abstract classes
- Polymorphic objects in a container:
shared_ptr
,
make_shared
CS 202 Fall 2013: Notes for Tuesday, October 22, 2013 /
Updated: 22 Oct 2013 /
Glenn G. Chappell