Lets Start With C++


     
   Introduction To C++ Language

  • C++ is an extension to C Programming Language.
  • It was developed at AT & T Bell Laboratories in the early in 1970s by Bjarne Stroustrup.
  • Its name was C with Classes ,but later on in 1983 it was renamed as C++.
  • C++  is an Object Oriented Programing(OOP) Language. 
  Object Oriented Programming Language

  • Object Oriented Programming(OOP) is the term used to describe a programming approach  based on Objects and Classes.
  • An object oriented programming language generally support 5 main features 
  1. Objects 
  2. Classes 
  3. Classification
  4. Polymorphism
  5. Inheritance

  Paradigm Of Programming Language

   The term Paradigm describes a set of techniques ,methods ,theories and standards that           together representing a way of thinking for problem solving.

   Structured Programming Paradigm
    #Structured Programming basically focus on these 3 approaches

   *Logical Structure
   *Divide And Conquer Approach
   *Top Down Approach
  Advantages of Structured Programming  (C++ Programming)
  1. Complexity can be reduced using the concepts of  divide and conquer approach.
  2. Logical Structure ensure clear flow of control.
  3. Modules can be reused many times ,it saves time ,reduces complexity ,and increases reliability.
  Disadvantages of Structured Programming 
  1. Lack of encapsulation
  2. Same code repetition
  3. Lack of information hiding
  4. Not much reusability of code 
  Object Oriented Programming Paradigm
    Everything is focused on Objects.
    Program consist of two things:
  1. First, a set of objects.
  2. Second, the way they interact with each other.
     Example: C++,Smalltalk and Java
  Structured Vs Oriented System
  • Structured Programming is a subset of Object Oriented Programming.
  • In Structure Programming focus of a program is on manipulation of data but in OOP the focus of the program is on both Data and Manipulation.
  • In Structured Programming the data is in the form  of variables but in OOP the data is hidden within the Objects. 
  Concepts of Object Oriented Programming

     1.Objects

      *An Object is an instance of a Class.
      *Objects are the Real World Models.
      *They may represent a person, a place, a bank account, a table of data or any item that           the program has to handle.
      *They contain there own data and behaviour.


     In the above picture  Class is a Vehicle and its Objects are car,           bus and truck.

    2.Class

      *A Class is a collection of  objects of similar type.
      *Once a Class has been defined, we can create any number of objects belonging to that          Class.
      *Object are the variables of the type class.

    3.Abstraction
     Abstraction is a technique which allows the hiding or elimination of irrelevant  data               and focusing on essential data.

    4.Encapsulation
  • The wrapping up of data and functions into a single unit(CLASS) is known as Encapsulation
  • Encapsulation refers to how the implementation  details of particular class are hidden from all the Objects outside the class.
   5.Association
  • The Classes and hence their corresponding Objects in Object Oriented Programming (OOP) Language are in relationship with  one another.
  • Various kind of relationships are Association, Aggregation and Inheritance etc.
  • An Association is the term used to represent the relationships among various Objects of one or more Classes .
   6.Inheritance-It is a technique of organizing  information in a hierarchical form.
  • It is like a child inheriting the features of its parents .It  is an  ability to derive new classes from existing classes.
  • A Derive Class is known as Sub Class which inherits the instance variables and methods of  Super Class or Base Class and can add some new instance variables and methods.


                   7.Polymorphism
  • Poly means "many" and morphism means "forms"  that is many forms.
  • It means ability to take more then one form or actions of same property.
  • Same functions with same function names can perform different actions depending upon which object call the function.

         We will study about its types later

    Advantages of Object Oriented Programming
  1. It is more suitable for the long projects.
  2. The projects executed using OOP techniques are more reliable.
  3. Abstraction techniques are used to hide the irrelevant details.
  4. Focus is only on the relevant part of the problem and solution.
  5. OOP divides the problems into collection of Objects
  6. Object Oriented Systems are easier to upgrade and modify.
  7. Software complexity can be better managed. 







Comments

Post a Comment

C++ Character Set