OBJECT ORIENTED PROGRAMMING
Course Objective:
To familiarize students with the C++ programming language and use the language to develop pure object oriented programs.
- Introduction to Object Oriented Programming(3 hours)
- Issues with Procedure Oriented Programming
- Basic of Object Oriented Programming (OOP)
- Procedure Oriented versus Object Oriented Programming
- Concept of Object Oriented Programming
- Object
- Class
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
- Example of Some Object Oriented Languages
- Advantages and Disadvantages of OOP
- Introduction to C++(2 hours)
- The Need of C++
- Features of C++
- C++ Versus C
- History of C++
- C++ Language Constructs(6 hours)
- C++ Program Structure
- Character Set and Tokens
- Keywords
- Identifiers
- Literals
- Operators and Punctuators
- Variable Declaration and Expression
- Statements
- Data Type
- Type Conversion and Promotion Rules
- Preprocessor Directives
- Namespace
- User Defined Constant
- Input/Output Streams and Manipulators
- Dynamic Memory Allocation with new and delete
- Condition and Looping
- Functions
- Function Syntax
- Function Overloading
- Inline Functions
- Default Argument
- Pass by Reference
- Return by Reference
- Array, Pointer and String
- Structure, Union and Enumeration
- Objects and Classes(6 hours)
- C++ Classes
- Access Specifiers
- Objects and the Member Access
- Defining Member Function
- Constructor
- Default Constructor
- Parameterized Constructor
- Copy Constructor
- Destructors
- Object as Function Arguments and Return Type
- Array of Objects
- Pointer to Objects and Member Access
- Dynamic Memory Allocation for Objects and Object Array
- Pointer
- Static Data Member and Static Function
- Constant Member Functions and Constant Objects
- Friend Function and Friend Classes
- Operator Overloading(5 hours)
- Overloadable Operators
- Syntax of Operator Overloading
- Rules of Operator Overloading
- Unary Operator Overloading
- Binary Operator Overloading
- Operator Overloading with Member and Non Member Functions
- Data Conversion: Basic–User Defined and User Defined–User Defined
- Explicit Constructors
- Inheritance(5 hours)
- Base and Derived Class
- protected Access Specifier
- Derived Class Declaration
- Member Function Overriding
- Forms of Inheritance: Single, Multiple, Multilevel, Hierarchical, Hybrid, Multipath
- Multipath Inheritance and Virtual Base Class
- Constructor Invocation in Single and Multiple Inheritances
- Destructor in Single and Multiple Inheritances
- Polymorphism and Dynamic Binding(4 hours)
- Need of Virtual Function
- Pointer to Derived Class
- Definition of Virtual Functions
- Array of Pointers to Base Class
- Pure Virtual functions and Abstract Class
- Virtual Destructor
- Reinterpret_cast Operator
- Run-Time Type Information
- Dynamic_cast Operator
- Type_id Operator
- Stream Computation for Console and File Input/Output(5 hours)
- Stream Class Hierarchy for Console Input/Output
- Testing Stream Errors
- Unformatted Input/Output
- Formatted Input/Output with IOS Member functions and Flags
- Formatting with Manipulators
- Stream Operator Overloading
- File Input/output with Streams
- File Stream Class Hierarchy
- Opening and Closing files
- Read/Write from File
- File Access Pointers and their Manipulators
- Sequential and Random Access to File
- Testing Errors during File Operations
- Templates(5 hours)
- Function Template
- Overloading Function Template
- Overloading with Functions
- Overloading with other Template
- Class Template
- Function Definition of Class Template
- Non-Template Type Arguments
- Default Arguments with Class Template
- Derived Class Template
- Introduction to Standard Template Library
- Containers
- Algorithms
- Iterators
- Exception Handling(4 hours)
- Error Handling
- Exception Handling Constructs (try, catch, throw)
- Advantage over Conventional Error Handling
- Multiple Exception Handling
- Rethrowing Exception
- Catching All Exceptions
- Exception with Arguments
- Exceptions Specification for Function
- Handling Uncaught and Unexpected Exceptions
Practical:
There will be about 12 lab exercises covering the course. At the end of the course students must complete a programming project on object oriented programming with C++.
References :
- Robert Lafore, “Object Oriented Programming in C++”, 4th Edition 2002, Sams Publication
- Daya Sagar Baral and Diwakar Baral, “The Secrets of Object Oriented Programming in C++”, 1st Edition 2010, Bhundipuran Prakasan
- Harvey M. Deitel and Paul J. Deitel, “C++ How to Program”, 3rd Edition 2001, Pearson Education Inc.
- D. S. Malik, “C++ Programming”, 3rd Edition 2007, Thomson Course Technology
- Herbert Schildt, “C++: The Complete Reference”, 4th Edition 2003, Tata McGraw Hill
Evaluation Scheme:
The questions will cover all the chapters of the syllabus. The evaluation scheme will be as indicated in the table below:
Chapters |
Hours |
Marks distribution* |
1,2,4 |
11 |
20 |
3 |
6 |
10 |
5 |
5 |
10 |
6 |
5 |
10 |
8 |
5 |
10 |
7,9,10 |
13 |
20 |
Total |
45 |
80 |
*There may be minor deviation in marks distribution
|