Object Oriented Language -A Small discussion
OO Language An object-oriented programming language  is one that allows or encourages, to some degree, object-oriented programming techniques such as encapsulation, inheritance, modularity, and polymorphism. Simula(1967) C++,Smalltalk, Java
C++……… C++ was developed completely in the year 1998. C++ is an object oriented version of C C++ uses compile-time binding, which means that the programmer must specify the specific class of an object, or at the very least, the most general class that an object can belong to
C++………. Simple program in C++….. #include<iostream.h> Int main() { cout<<“hello world\n; } Bjarne Stroustrup, creator of C++
Small talk Development started in 1969 and publicly available in 1980 Designed by Alan Kay, Dan Ingalls, Adele Goldberg Small talk 71,72,76,80 Literals, assignments, messages, expressions, code blocks are some terms in small talk.
Transcript show: 'Hello, world!'.
Java Java is the latest, flashiest object-oriented language Java is a curious mixture of C++ and Smalltalk Java development tools are being rapidly deployed, and are available from such major software companies as IBM, Microsoft, and Symantec.  
// HelloWorld.java public class HelloWorld {  public static void main(String[] args) {  System.out.println(&quot;Hello, world!&quot;); } }
Object Oriented Programming Paradigm Data as a critical element in the program.  Data is not allowed to flow freely around  system. Ties data more closely to the function that operate on it. Protect data from accidental modification by outside functions.  The group of data and the functions together termed as objects.
The Organization of Data and Functions in OOPs
Features of OOPs  Emphasis is on data rather than procedure. Programs are divided into what are known as objects. Functions that operate on the data of an object are tied together in the data structure. Data is hidden and cannot be accessed by external functions. Objects may communicate with each other through functions. New data and functions can be easily added wherever necessary.
Basic Concepts of OOP  1) Objects 2) Classes 3) Data abstraction & Encapsulation 4) Inheritance 5) Polymorphism 6) Dynamic binding 7) Message passing
Objects Objects are the basic run-time entities in an object-oriented system. An object is a kind of a self-sufficient “subprogram ” with a specific functional area.  They may represent a person, a place, a bank account, a table of data or any  item that the program has to handle.
Object
Classes  The entire set of data and code of an object can be made a user-defined data type with the help of a class. Objects are actually variable of the type class. Once a class has been defined, it can be used to create any number of objects belonging to that class. Thus a class is collection of objects of similar type. Classes are user defined data types and behaves like the built in type of a programming language. A class is a way to bind the data and its associated functions together.
Inheritance Inheritance is the process by which object of one class acquire the properties of objects of another class. The concept of inheritance provides the idea of reusability.  A new class can be derived from the existing one. Then new class will have combined features of both the classes. For example an object of the class of car can acquire the properties of the class vehicle.
Types of inheritance Single inheritance Multiple inheritance Multilevel inheritance
General form class class_name { private:  variable declaration function declaration protected:  variable declaration function declaration public:  variable declaration function declaration }; example class student { private: int roll no,marks,total; protected: void compute(); void display(); public: student(); void execute(); };
Data abstraction  Abstraction refers to the act of representing essential features without including the background details  or  explanations. Instruments allowing only selected access of components to objects and to members of other classes is called as data abstraction.
Encapsulation  The binding of data and function together into a single entity is called encapsulation.
Polymorphism Polymorphism is the ability to take more than one form. With polymorphism an operation may show different behavior in different instances. The behavior depends upon the type of data used in the operation.  Eg: Operation of addition for two numbers, will generate a sum. If the operands are strings, then the operation would produce a third string by concatenation. The process of making an operator to show different behavior in different instance is called as operator overloading. OOPL support operator overloading
Polymorphism (contd.) Function overloading means using a single function name to perform different types of tasks.
Structure Of C++ The general form of C++ program is:
// program to add two numbers using class #include<iostream.h> #include<conio.h> class add { private: int a,b; public: int sum; void getdata() { a=5; b=10; sum=a+b; } }; void main() { add s; s.getdata(); cout<<s.sum; }
Thank You

Object Oriented Language

  • 1.
    Object Oriented Language-A Small discussion
  • 2.
    OO Language Anobject-oriented programming language is one that allows or encourages, to some degree, object-oriented programming techniques such as encapsulation, inheritance, modularity, and polymorphism. Simula(1967) C++,Smalltalk, Java
  • 3.
    C++……… C++ wasdeveloped completely in the year 1998. C++ is an object oriented version of C C++ uses compile-time binding, which means that the programmer must specify the specific class of an object, or at the very least, the most general class that an object can belong to
  • 4.
    C++………. Simple programin C++….. #include<iostream.h> Int main() { cout<<“hello world\n; } Bjarne Stroustrup, creator of C++
  • 5.
    Small talk Developmentstarted in 1969 and publicly available in 1980 Designed by Alan Kay, Dan Ingalls, Adele Goldberg Small talk 71,72,76,80 Literals, assignments, messages, expressions, code blocks are some terms in small talk.
  • 6.
  • 7.
    Java Java isthe latest, flashiest object-oriented language Java is a curious mixture of C++ and Smalltalk Java development tools are being rapidly deployed, and are available from such major software companies as IBM, Microsoft, and Symantec.  
  • 8.
    // HelloWorld.java publicclass HelloWorld { public static void main(String[] args) { System.out.println(&quot;Hello, world!&quot;); } }
  • 9.
    Object Oriented ProgrammingParadigm Data as a critical element in the program. Data is not allowed to flow freely around system. Ties data more closely to the function that operate on it. Protect data from accidental modification by outside functions. The group of data and the functions together termed as objects.
  • 10.
    The Organization ofData and Functions in OOPs
  • 11.
    Features of OOPs Emphasis is on data rather than procedure. Programs are divided into what are known as objects. Functions that operate on the data of an object are tied together in the data structure. Data is hidden and cannot be accessed by external functions. Objects may communicate with each other through functions. New data and functions can be easily added wherever necessary.
  • 12.
    Basic Concepts ofOOP 1) Objects 2) Classes 3) Data abstraction & Encapsulation 4) Inheritance 5) Polymorphism 6) Dynamic binding 7) Message passing
  • 13.
    Objects Objects arethe basic run-time entities in an object-oriented system. An object is a kind of a self-sufficient “subprogram ” with a specific functional area. They may represent a person, a place, a bank account, a table of data or any item that the program has to handle.
  • 14.
  • 15.
    Classes Theentire set of data and code of an object can be made a user-defined data type with the help of a class. Objects are actually variable of the type class. Once a class has been defined, it can be used to create any number of objects belonging to that class. Thus a class is collection of objects of similar type. Classes are user defined data types and behaves like the built in type of a programming language. A class is a way to bind the data and its associated functions together.
  • 16.
    Inheritance Inheritance isthe process by which object of one class acquire the properties of objects of another class. The concept of inheritance provides the idea of reusability. A new class can be derived from the existing one. Then new class will have combined features of both the classes. For example an object of the class of car can acquire the properties of the class vehicle.
  • 17.
    Types of inheritanceSingle inheritance Multiple inheritance Multilevel inheritance
  • 18.
    General form classclass_name { private: variable declaration function declaration protected: variable declaration function declaration public: variable declaration function declaration }; example class student { private: int roll no,marks,total; protected: void compute(); void display(); public: student(); void execute(); };
  • 19.
    Data abstraction Abstraction refers to the act of representing essential features without including the background details or explanations. Instruments allowing only selected access of components to objects and to members of other classes is called as data abstraction.
  • 20.
    Encapsulation Thebinding of data and function together into a single entity is called encapsulation.
  • 21.
    Polymorphism Polymorphism isthe ability to take more than one form. With polymorphism an operation may show different behavior in different instances. The behavior depends upon the type of data used in the operation. Eg: Operation of addition for two numbers, will generate a sum. If the operands are strings, then the operation would produce a third string by concatenation. The process of making an operator to show different behavior in different instance is called as operator overloading. OOPL support operator overloading
  • 22.
    Polymorphism (contd.) Functionoverloading means using a single function name to perform different types of tasks.
  • 23.
    Structure Of C++The general form of C++ program is:
  • 24.
    // program toadd two numbers using class #include<iostream.h> #include<conio.h> class add { private: int a,b; public: int sum; void getdata() { a=5; b=10; sum=a+b; } }; void main() { add s; s.getdata(); cout<<s.sum; }
  • 25.