Object Oriented Programming - I

Features Includes:

  • 79 - 3D/2D Animation
  • 472 Pages of Content
  • 60 Lecture Hours
  • 6 Solved Problems
  • 36 Quiz
  • Suitable for All Technical University Syllabus

Course Description

An Object contains both the data and the function, which operates on the data. For example - Car, marker, pen, table, car, etc. Inheritance is an OOPS concept in which one object acquires the properties and behaviors of the parent object.

OBJECTIVES:

  • The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function.
  • A constructor is a special function that gets called automatically when the object of a class is created.
  • This allows us to create a function template whose functionality can be adapted to more than one type or class without repeating the entire code for each type.
  • Inheritance is a mechanism in which one class acquires the property of another class.
  • The I/O streams have a number of functions for performing unformatted I/O.
UNIT I - OBJECT ORIENTED PROGRAMMING

Why Object - Why C++ - A Review of structures - Object oriented programming - Limitations of POP - Appreciate the evolution of OOPs - Features of Object Oriented Languages - Applications of OOPS - History of C++ - Difference between Procedure Oriented Programming (POP) and Object Oriented Programming (OOP). Introduction to OOPs - Principle of object oriental languages - Properties of OOPs – Objects – Class – Inheritance – Abstraction - Data encapsulation – Polymorphism – Method - Message passing - Dynamic binding. Native Types and Statements - Comment statements in C - Comments in C++ - Keywords - Important keywords of C++ other than C. Token – Identifiers – Literals – Punctuators - Operators/expressions. Expressions - Introduction to Expressions - Primary expression - Postfix expression - Expressions with unary operators - Expressions with binary operator - Expressions with conditional operator - Constant expressions - Expression with explicit type conversion - Expression with pointer to member operators. Decision Makings - Decision Making – introduction - The if Statements - The if-else Statements - Nested if - else Statements - The if-else ladder Statements. Control statement - The while loop structure – introduction - The do-while loop structure - The for loop structure - Nested for loop structure - The switch multiple-selection structure - The break and continue statement. Functions - Introduction - Pre defined function - User defined functions - Function defining - Function declaration - Function call – Parameters. Pointers – Pointers - Creating pointers to variables - Creating pointers to an array - Creating pointers to functions - Creating pointers to an objects - Pointers to objects - Program to illustrate pointers to objects - Program to illustrate array of pointers to objects - Formatted console I/O operations - Benefits of this pointer - Example program of this pointer. Implementing ADTs in the base language - Describing objects using ADTs - Built-in ADTs - User-defined ADTs - C++ support for ADTs.

UNIT II - CLASS AND OBJECT

Introduction – Introduction - Class and object. Class definition - Class definition - Class specification - Creation of objects. Access specifiers - Access specifiers. Creating an objects - Creating an objects. Pointers and objects - Pointers and objects. Constant objects - Constant objects - Objects as arguments. Arrays as objects - Arrays within a class - Arrays as objects. Nested classes - Nested classes.

UNIT III - CONSTRUCTORS AND DESTRUCTORS

Introduction-Constructors - Class constructors – Constructors. Types of constructors - Types of constructors. Copy constructors - Copy constructors. Overloaded constructors - Overloaded constructors. Dynamic constructors - Dynamic constructors. Explicit constructors - Explicit constructors. Destructor – Destructor. Introduction-Polymorphism – Polymorphism. What are virtual function – Introduction - What are virtual function?. Need for virtual function - Need for virtual function. Virtual function - Properties of virtual function - Declaration of virtual function - Example program of virtual function. Binding - Early binding or static binding - Late binding or dynamic binding - Pure virtual function. Rules for virtual class - Rules for virtual class. Constructor and destructor in derived class - Constructor in Derived Class - Constructor Rules for Derived Class - Constructor and destructor in derived class - Implicit derived class object to base class object conversion - Composition vs inheritance.

UNIT IV - FUNCTION OVERLOADING

Function Overloading - Function Overloading. Member functions - Function and data members - Class definition - Default arguments - Making an outside function inline - Nesting of member functions - Returning values from member function - Pointers to members. Friend function - Friend function - Inline functions – Advantages. Dynamic memory allocation - Static memory allocation - Dynamic memory allocation - new operator - Delete operator - Program to illustrate deleting of objects using delete operators. Static Class Members - Introduction to Static class member - Static Data Member - Static Member Function. Iterators and containers – Introduction - Components of STL – Containers – Algorithms – Iterators - Application of Container Class. Proxy classes - Proxy classes. Operator overloading and function overloading - Introduction to operator overloading - Program to return objects from function - Process and rules of operator overloading - Overloading unary operator - Overloading binary operator - Overloading binary operator using friend function - Overloading assignment operator - Manipulating strings using operators - Program on relational operator overloading - Function overloading. Type Conversions - Introduction to Type Conversions - Basic Type to Basic Type - Basic Type to Class Type - Class Type to Basic Type - One Class to Another Class Type.