The main objective of this course is to introduce students to the principles of Object-Oriented Programming using C++. The course will cover the following concepts:
Upon completion of this course, students will be able to:
Review of C, Basic concepts of OOP: Object, class, data abstraction, data encapsulation, inheritance, polymorphism, dynamic binding, message passing.
C++ Programming basics: Structure of C++ programs, Basic input/output statements, Tokens, expressions, and control structures, Functions in C++, Inline functions, Function overloading, Friend and virtual functions, Classes and objects: Declaring classes, defining member functions, Making an outside function inline, nesting of member functions, private member functions, arrays within a class, Memory allocation for objects, static data members, static member functions, arrays of objects, objects as function arguments, friendly functions, returning objects, constant member functions, pointers to members, local classes.
Constructors and destructors, parameterized constructors, multiple constructors in a class, constructors with default arguments, dynamic initialization of objects, copy constructor, dynamic constructors, const objects, destructors.
Operator overloading and type conversions: Defining operator overloading, overloading unary operators, overloading binary operators, overloading binary operators using friends, manipulation of strings using operators, rules for overloading operators, type conversions.
Inheritance: Defining derived classes, single inheritance, making a private member inheritable, multilevel inheritance, multiple inheritance, hierarchical inheritance, hybrid inheritance, virtual base classes, abstract classes, constructors in derived classes, member functions in derived classes.
Pointers, virtual functions, and polymorphism: Pointers, pointers to objects, this pointer, pointers to derived classes, virtual functions, pure virtual functions.
Managing console I/O operations, working with files, classes for file stream operations, opening and closing files, detecting end-of-file, file modes, file pointers and their manipulations, sequential input and output operations, updating a file: random access, error handling during file operations, command-line arguments.
Templates, Exception handling: Function templates, class templates, member function templates, overloading of template functions, exception handling mechanism, throwing mechanism, catching mechanism, re-throwing an exception, exception specifications, constructor, and destructor with exception handling.
Upon completion of this lab, students will be able to: