Govt. of Karnataka, Department of Technical Education
Diploma in Computer Science & Engineering
Fourth Semester
Subject: OOP with C++
Contact Hrs / week: 4 Total hrs: 64
Table of Contents
Chapter No | Topic | No. of Hrs | Marks |
Section I | |||
1 | Introduction to OOP | 02 | 06 |
2 | C++ Additional features | 06 | 15 |
3 | Classes and Objects | 10 | 26 |
Section II | |||
4 | Operator Overloading | 06 | 16 |
5 | Inheritance | 08 | 20 |
6 | Virtual functions | 06 | 16 |
Section III | |||
7 | Managing Console I/O Operations | 08 | 20 |
8 | Files | 06 | 16 |
9 | Templates | 04 | 10 |
Seminars and Guest lectures from Industry and Institute | 05 | ||
Tests | 03 | ||
Total hrs | 64 | 145 |
Detailed Contents
1 | Introduction to OOP | |
1.1 | Software evolution | |
1.2 | A look at procedure oriented programming | |
1.3 | Object oriented programming paradigm | |
1.4 | Basic concepts of OOPs | |
1.5 | Benefits of OOPs | |
1.6 | Objects oriented languages | |
1.7 | Application of OOPs | |
2 | C++ Additional Features | |
2.1 | What is C++? | |
2.2 | The i/o stream class | |
2.3 | Tokens | |
2.4 | Comments | |
2.5 | Basic data types, User defined data types, Derived data types | |
2.6 | Symbolic constants | |
2.7 | Type Compatibility | |
2.8 | Declaration of variables | |
2.9 | Dynamic initialization of variables | |
2.10 | Reference variables | |
2.11 | Operators in C++: Scope resolution operator, Member dereferencing operators, Memory management operators | |
2.12 | Manipulators (setw & endl) | |
2.13 | Type cast operator | |
2.14 | Function prototyping | |
2.15 | Call by reference | |
2.16 | Return by reference | |
2.17 | Inline functions | |
2.18 | Default arguments | |
2.16 | Function overloading | |
3 | Classes and Objects | |
3.1 | C structures revisited | |
3.2 | Specifying a class | |
3.2.1 | A simple class example | |
3.2.2 | Creating objects | |
3.2.3 | Accessing class members | |
3.3 | Defining member functions | |
3.3.1 | Outside the class definition | |
3.3.2 | Inside the class definition | |
3.4 | A C++ program with class | |
3.5 | Memory allocation for objects | |
3.6 | Static data members | |
3.7 | Static member functions | |
3.8 | Arrays within a class | |
3.9 | Arrays of objects | |
3.10 | Constructors & Destructors | |
3.10.1 | Default constructors | |
3.10.2 | Parameterized constructor | |
3.10.3 | Overloaded constructor | |
3.10.4 | Constructor with default argument | |
3.10.5 | Copy constructor | |
3.10.6 | Destructor | |
3.11 | Objects as function arguments | |
3.12 | Returning objects from functions | |
3.13 | Friend functions | |
3.14 | Friend Class (only definition) | |
4 | Operator Overloading | |
4.1 | Defining operator overloading | |
4.2 | Overloading unary operator | |
4.3 | Overloading binary operator | |
4.4 | Overloading binary operator using friends | |
4.5 | Manipulation of strings using operators | |
4.6 | Rules for overloading operator | |
4.7 | Type conversions | |
4.7.1 | Basic to class type | |
4.7.2 | Class to basic type | |
4.7.3 | One class to another class type | |
5 | Inheritance | |
5.1 | Introduction | |
5.2 | Defining Derived classes | |
5.3 | Single Inheritance | |
5.4 | Making a private member inheritable | |
5.5 | Multilevel inheritance | |
5.6 | Multiple inheritance | |
5.6.1 | Ambiguity resolution in inheritance | |
5.7 | Hierarchical inheritance | |
5.8 | Hybrid inheritance | |
5.9 | Virtual base classes | |
5.10 | Abstract classes | |
5.11 | Constructors in Derived classes | |
5.12 | Containership : nesting of classes | |
6 | Virtual Functions | |
6.1 | Pointers to objects | |
6.2 | this pointer | |
6.3 | Pointers to derived classes | |
6.4 | Virtual function | |
6.5 | Rules for virtual functions | |
6.6 | Pure virtual function | |
7 | Managing Console I/O Operations | |
7.1 | C++ streams | |
7.2 | C++ stream classes for console I/O operations | |
7.3 | Unformatted I/O operations | |
7.4 | Formatted console I/O operations | |
7.5 | Managing output with Manipulators | |
7.6 | Designing our own manipulator | |
8 | Files | |
8.1 | Classes for file stream operations | |
8.2 | Opening and closing a file | |
8.3 | Detecting end of file | |
8.4 | File modes | |
8.5 | File pointers and their manipulation | |
8.6 | Sequential I/O operations | |
8.7 | Updating a file : Random Access | |
8.8 | Error handling functions | |
8.9 | Command line arguments | |
9 | Templates | |
9.1 | Class templates | |
9.2 | Function templates | |
9.3 | Member function templates | |
9.4 | Non Type Template argument |
General Objectives:
1. Understand the concepts of OOPs, their advantages and applications
2. Comprehend the features of C++
3. Know to create classes, objects, constructors and destructors
4. Know the concepts and advantages of overloading operator and type conversions
5. Appreciate the concepts of inheritance and the various types of inheritance.
6. Understand virtual functions & their need and usage
7. Appreciate the need for manipulators and the design of the same
8. Use the various operations of files to perform file operations
9. Understand the concept of templates.
Specific Objectives:
Introduction to OOP | |
Differentiate between procedure oriented and object oriented programming | |
Learn the concepts and benefits of OOPs | |
Appraise the applications of OOPs | |
C++ Additional features | |
Learn C++ keywords, constants, variable declarations and initialization | |
Learn the use of scope resolution operator & memory management operators | |
Learn to use IO Manipulators | |
Write functions to implement call by reference and return by reference | |
Learn the concepts of function overloading | |
Classes and Objects | |
Learn to create objects and access class members | |
Learn to define member function within and outside the class definition | |
Write C++ programs using classes | |
Know about static data members and static functions | |
Know various types of constructors & use of destructor | |
Learn to use objects as function arguments and to return objects from functions | |
Learn to use arrays and strings as class members | |
Write programs to implement array of objects | |
Learn about friend functions and friend classes | |
Operator Overloading | |
Define operator overloading | |
Learn to overload unary and binary operator | |
Write programs to overload unary and binary operators | |
Write programs to overload binary operator using friend functions | |
Know the rules to be followed while overloading operators | |
Know about various type conversions | |
Inheritance | |
Know the concepts of base class, derived class and derived class constructors | |
Write programs to overload member functions | |
Analyse the concept behind Single Inheritance (public & private) | |
Differentiate between multilevel and multiple inheritance | |
Differentiate between Hierarchical inheritance & hybrid inheritance | |
Write programs to implement all the types of inheritance | |
Learn about Virtual base classes and nesting of classes | |
Write programs to implement virtual classes & nesting of classes | |
Virtual functions | |
Write programs to implement Pointers to objects | |
Know the use of this pointer | |
Write programs to implement Pointers to derived classes | |
Know the concepts of Virtual function & pure virtual function. Implement them | |
Managing Console I/O Operations | |
Understand the concepts of console I/O operations | |
Learn formatted and unformatted console I/O operations | |
Know about Manipulators and implement own manipulators | |
Files | |
Know all the Classes for file stream operations | |
Know all the operations and modes of a file | |
Write programs to implement sequential I/O operations | |
Learn to update a file in random access with error handling function. | |
Templates | |
Know about templates and their uses | |
Implement function templates, member function templates |
Text Book:
1. OBJECT ORIENTED PROGRAMMING WITH C++,
4E, E Balaguruswamy, Tata Mc Graw hill
2. OOPS with C++ By Niranjan A., Sapna Publications
References:
1. Object oriented programming in c++, By P B Kottur., Sapna Publications
2. Object oriented programming in c++, Dr.G.T. Thampi, Dr. S.s.Matha,
Dreamtech, 2009 edition,
3. Object oriented programming in c++, Rajesh K Shukla , Wiely Precise text Book.2008.
4. Object Oriented Programming in Turbo C++ , Robert Lafore.
5. Object Oriented Programming with C++ , Sourav Sahay, Oxford Higher Education
6. Analysis & Designing Of Algorithms with C/C++ -By Nandagopalan.
7. C++ Complete Reference, Herbert Schilt. TMH.
8. Programming in C++ , M T Somashekar , PHI
9.Professional C++ , Wiley India (Wrox