Basics of Object Oriented Programming

858
-1

Published on

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
858
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
34
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Basics of Object Oriented Programming

  1. 1. REVISION - A N K I TA K A R I A
  2. 2. TOPICS TO COVER:- BACKGROUND. Difference between Structured & Object Oriented Programming Basic OOPs Concepts. History of JAVA. JAVA Buzzwords (FEATURES).
  3. 3. BACKGROUND Since the invention of the computer, many programming approaches have been tried. These include techniques such as:-  Structured Programming. * Modular Programming  Object Oriented Programming * Top-Down & Bottom-Up. The primary motivation in each case has been the concern to handle the increasing complexity of programs.
  4. 4. BACKGROUND (Contd..) PASCAL & C are 3rd Generation Languages which use sequential code, global data, local data & sub-programs. They follow STRUCTURED PROGRAMMING Supports Modular Programming• Follows TOP-DOWN Approach..• Failed when programs grew larger, Didnt gave bug-free programs.SO CAME Object Oriented Programming
  5. 5. Object-Oriented Programming Is an approach which attempts to eliminate some of the pitfalls of conventional methods by incorporating the best of structured programming features with several new concepts . Languages that support OOPs features include:-  Simulate, Ada, Smalltalk;  C++, Bjarne Stroustrup, 1980 AT&T Bell Labs, USA  Java, James Gosling, 1996 Sun Microsystems, USA  C#, Anders Hejlsberg, 2000 Microsoft, USA
  6. 6. Difference between STRUCTURED & OOPsSTRUCTURED OBJECT-ORIENTEDPROGRAMMING PROGRAMMINGTop-down approach is Bottom-Up approach is followed.followed.Program is divided into a Program is organized by having anumber of sub-modules or number offunctions or procedures. classes and objects.Function call is used. Message passing is used.Software reuse is not Helps in software reuse.possible.No encapsulation. Data and Data and functionalities are putfunctions are separate. together in a single entity.
  7. 7. BASIC OOPs CONCEPTS  OBJECT:- Is anything having crisply defined conceptual boundaries.  Represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-definedAn object is role in the problem domain. like a black Or box.  An "object" is anything to which a concept applies.The internal  Contains DATA and METHODS details are hidden. BANK ACCOUNT
  8. 8. BASIC OOPs CONCEPTS (Continued…….) CLASSES:- A class is the blueprint from which individual objects are created. A class defines features of objects. A feature may be DATA or OPERATION Model_Type. Manufacture_Date. Variables Functions or methods. Speed etc…. Model_Type. Change_Gear. Brake. Etc…. VEHICLE Manufacture_Date. Change_Gear. Speed etc…. Brake. Etc…. OBJECTS
  9. 9. BASIC OOPs CONCEPTS (Continued…….) Example:class Vehicle Model_Type. { Manufacture_Date. int Model_Type; Speed etc…. DATA VEHICLE int Man_Date; Change_Gear. int speed; Brake. Etc…. void change_gear(); Operations void brake(); OR functions } CREATING OBJECTS:- Vehicle alto;  Declares object Alto = new Vehicle(); -- Allocates Space. Vehicle alto = new vehicle(); - Does Both.
  10. 10. CLASS OBJECTClass is a data type Object is an instance of class.It generates objects It gives life to CLASSDoes not occupy memory It occupies memory location.locationIt cannot be manipulated It can be manipulated.because it is not available inmemory
  11. 11.  ENCAPUSLATION:- The wrapping up of data and methods into a single unit (called class) is known as ENCAPUSLATION. Encapsulation makes it possible for objects to be treated like “black boxes” ,each performing a specific task without any concern for internal implementation.. ABSTRACTION:- Abstraction is a design technique that focuses on the essential attributes and behaviour. It is a named collection of essential attributes and behaviour relevant to programming
  12. 12.  Explain basic concepts of Object Oriented Programming? Distinguish between:- ◦ Object oriented and Procedure oriented programming. ◦ Objects and Classes.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×