CMSC 202 Computer Science II, Spring 2016, Section 01
Lecture 16: Inheritance
Tue 03/29, 2016
[Up]
[Previous Lecture]
[Next Lecture]
Assigned Reading:
Slides As Shown:
Topics Covered:
- Continued coverage on inheritance.
Programs shown:
- Color cube class:
ColorCube.h,
ColorCube.cpp,
-
Simple use of ColorCube, showing order of construction, destruction,
and use of base class methods.
cctest.cpp,
cctest.txt.
-
Passing a derived object to a function with base class reference parameters.
cctest2.cpp,
cctest2.txt.
-
Passing a derived object to a function with base class value parameters.
cctest3.cpp,
cctest3.txt.
-
Same as cctest3.cpp, but bar3() is compiled separately.
ccsep4.cpp,
cctest4.cpp,
cctest4.txt.
-
Checking out how assignment works, or doesn't.
cctest5.cpp,
cctest5.txt.
-
Checking out pointers and dereferencing.
cctest6.cpp,
cctest6.txt.
-
C++ lets you do BAAAAD things with arrays of objects.
cctest7.cpp,
cctest7.txt.
-
Checking out function overloading and inheritance.
cctest8.cpp,
cctest8.txt.
[UMBC] |
[CSEE] |
[CMSC202] |
[CMSC202-06]
Last Modified:
22 Jul 2024 11:29:14 EDT