Fall 2017 - CS 202
- Note: All examples I show in class can be found in the
/home/williams/public directory & subdirectories on bobby.
You can read them there,
but if you want to edit/compile them, you will need to copy them to your
own directory. These files may not compile/work without modification,
as I frequently show in class how some code will lead to errors.
If necessary, please make the appropriate adjustments as we did in
- 8/28/17 (MW) and 8/29/17 (TTh):
- Course introduction, syllabus review, discussion of course content, expectation, guideline review, and general advice.
- Note: TTh 5:30 PM - 6:45 PM students are welcome to attend the 4:00 PM - 5:15 PM section instead (do not change your section in MyUNLV, unless you
want to & understand the risk of not being able to swap sections successfully), although if the room
gets too full I may not allow more students in. For those that regularly attend the earlier section, please attend your normal section for the midterm & final.
- 8/30/17 (MW) and 8/31/17 (TTh):
- Compiler usage, flags, makefiles, and submitting assignments.
- Review of CS 135.
- 9/5/17 (TTh) and 9/6/17 (MW):
- Introduction to classes and objects.
- Private & public members of classes.
- Discussion of wrapper functions, getter/setter, accessor/mutator.
- const member functions.
- UML diagrams.
- Using class functions, accessing & modifying class variables.
- Discussion of scope.
- Usage of . and = with objects.
- Passing by reference & disallowing modifications.
- Implementing class functions.
- Discussion of implicit "this".
- Sample code for class implementation & object usage.
- Please read the Quick Review section at the end of all
chapters 1-9 to refresh your knowledge from CS 135.
- 9/7/17 (TTh) and 9/11/17 (MW):
- Constructors in general.
- Default constructors.
- Function overloading & multiple constructors.
- Constructors with default parameters & UML.
- Class variable initialization in C++11 and later.
- Arrays of objects & constructors.
- Brief mention about destructors.
- Abstraction & abstract data type.
- Information hiding.
- Creating object files & linking.
- Assignment 1 - Due September 20.
- 9/12/17 (TTh) and 9/13/17 (MW):
- Command-line arguments.
- Static class members.
- Please read/skim Chapter 10.
- Inheritance in general.
- Single inheritance.
- Inheriting as public vs. private.
- Overriding base class functions.
- Calling base class functions within the derived class.
- Default & alternate constructors in derived classes.
- Destructors in derived classes.
- 9/14/17 (TTh) and 9/18/17 (MW):
- Information hiding with derived classes.
- Use of preprocessor #ifndef, #define, and #endif.
- Protected members & protected inheritance.
- 9/19/17 (TTh) and 9/20/17 (MW):
- The big picture of OOP/OOD.
- Three basic principles of OOD.
- Please read/skim chapter 11.
- Pointer basics.
- Declaring pointers.
- Referencing & dereferencing operators.
- Beginnings of dynamically allocated memory.
- 9/21/17 (TTh) and 9/25/17 (MW):
- Dynamically allocating single variables and arrays.
- new and delete operators.
- Memory leaks.
- Pointers and functions.
- Dynamic arrays in detail.
- Duality of arrays and pointers.
- Double pointers and dynamic allocation of two+ dimensional arrays.
- Dangling pointers.