Syllabus
Prerequisite
CENG 114 Computer Programming
Lecturer and Lab Assistant
Prof. Dr. Ahmet COSAR, cosar@cankaya.edu.tr, L-201
Kaan ÇaÄŸhan ÖZAYDIN, caghan@cankaya.edu.tr, L-205
Textbook
-
D.S. Malik, C++ Programming: From Problem Analysis to Program Design, 5th Edition, Cengage Course Technology, 2011, 978-0-538-79808-2
-
Tony Gaddis, Starting Out with C++: Early Objects, Addison Wesley, 2005, 0-321-38348-6
Grading
Midterm: 30% Final: 35%
Homework: 15% Lab: 20%
Participation
-
Participation is mandatory for lab lectures and in class lectures.
Submission
-
Login webonline and enroll CENG 241 course.
-
Use e-mail for communication, submit HWs and Assignments to WEBONLINE (Moodle)
Topics
Week 1) First meeting, course description, rules
Week 2) C Review: Pointers and STRUCTs
-
Pointers in general, memory organization
-
Indirection (*) and address-of (&) operators
-
Pointers in struct, pointers to struct
-
Pointers of pointers, advanced usage
Week 3) Review: Arrays
-
Static vs. Dynamic Arrays (1D, 2D and more)
-
Creating & destroying arrays
-
Array of pointers, Pointers of arrays
Week 4) Introduction to C++
-
Review: C strings (strcpy, strcat, strlen, strcmp and variations)
-
C++ string class (=, +, c_str, substr)
-
Basic IO, iostream, cout, cin. Overloading operator<< and operator>>
Week 5) Classes and Objects
-
Composition: Class vs. struct
-
Primitive types vs. Objects
-
Functions vs. Methods
-
Data fields, constructor & destructor, overloading constructors
Week 6) Classes and Objects (cont.)
-
Instantiating objects: creating on stack / heap, new, delete, new [ ], delete [ ] commands
-
STATIC keyword
-
Pointers and objects
-
Referencing (.) vs. Dereferencing (->) operators, .*, ->*
Week 7) Classes and Objects (cont.)
-
Class notations, header files.
-
Cloning classes: assigning objects, shallow copy, deep copy, copy constructor
Week 8) Inheritance
-
Subclasses in general
-
Defining and creating subclasses, construction and destruction chain
-
Construct base class by non-default constructor
-
Overriding, overloading vs. overriding
Week 9) Inheritance (cont.)
-
Encapsulation, Visibility modifiers: public, private, protected.
-
Abstraction, get and set methods
-
Inheritance examples
Week 10) Polymorphism
-
Polymorphism in general
-
Benefits, software design
-
Class hierarchy, conversion from sub-to-base and base-to-sub classes.
Week 11) Advanced C++
-
Namespaces, using namespace
-
Template functions and classes
-
Operator overloading
Week 12) Vectors
-
Arrays vs vectors
-
size, [ ], at, front, back
-
push_back, pop_back, insert, erase, clear
Week 13) Review and examples
Week 14) Review and examples