Your SlideShare is downloading. ×
Object Oriented Language
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Object Oriented Language


Published on

Published in: Education, Technology

  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • Transcript

    • 1. Object Oriented Language -A Small discussion
    • 2. 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
    • 3. 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
    • 4. C++……….
      • Simple program in C++…..
      • #include<iostream.h>
      • Int main()
      • {
      • cout<<“hello world ;
      • }
      • Bjarne Stroustrup, creator of C++
    • 5. 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.
    • 6.
      • Transcript show: 'Hello, world!'.
    • 7. 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.
    • 8.
      • // public class HelloWorld {
      • public static
      • void main(String[] args) { System.out.println(&quot;Hello, world!&quot;);
      • }
      • }
    • 9. 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.
    • 10. The Organization of Data 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 of OOP
      • 1) Objects
      • 2) Classes
      • 3) Data abstraction & Encapsulation
      • 4) Inheritance
      • 5) Polymorphism
      • 6) Dynamic binding
      • 7) Message passing
    • 13. 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.
    • 14. Object
    • 15. 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.
    • 16. 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.
    • 17. Types of inheritance
      • Single inheritance
      • Multiple inheritance
      • Multilevel inheritance
    • 18.
      • 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();
      • };
    • 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
      • The binding of data and function together into a single entity is called encapsulation.
    • 21. 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
    • 22. Polymorphism (contd.)
      • Function overloading 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 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;
      • }
    • 25. Thank You