SlideShare une entreprise Scribd logo
1  sur  26
INTRODUCTIONWITH THE RAPIDLY CHANGING THE WORLD AN
THE HIGHLY COMPETITIVE AND VERSATILE NATURE
OF INDUSTRY , THE OPERATIONS ARE BECOMING
MORE AND MORE COMPLEX. IN VIEW OF THE
INCREASING COMPLEXITY OF SOFTWARE SYSTEM ,
THE SOFTWARE INDUSTRY AND SOFTWARE ENGINEER
CONTINOUSLY LOOK FOR THE NEW APPROACHES TO
SOFTWARE DESIGN AND DEVELOPMENT. THE INCREASESD
COMPLEXIITY HAD BECOMETHE CHIEF PROBLEM WITH
COMPUTER PROGRAMS IN TRADITIONAL LANGUAGES.
EVOLUTION OF SOFTWAREA PROGRAM SERVES THE PURPOSE OF COMMANDING THE COMPUTER. THE EFFICIENCY AND USEFULNESS
OF A PROGRAM DEPENDS NOT ONLY ON PROPER ISE COMMAND BUT PROGRAMMING LANGUAGES ALSO.
LOW LEVEL LANGUAGES
These are machine oriented and require
extensive knowledge of computer circuitry.
Machine language, in which instructions are
written in binary code, is the only language
the computer can execute directly. Assembly
language, in which instructions are written
using symbolic names for machine
operations and operands, makes
programming less tedious than machine
language using assembler software (e.g
READ, ADD, STORE, etc)
HIGH LEVEL LANGUAGE
The programs written in HLLS are
converted into machine language using
compiler or interpreter as a computer can
work with machine language only.
A PROGRAM LANGUAGE SHOULD:
(I) It should provide a vehicle for the
programmer to specify actions to be
executed and
(II) It should provide a set of concepts for
the programmer to use when thinking
about what can be done.
Agenda
Introduction
•History
•OOP
•Objects
•Classes
OOP Basic concepts
•Encapsulation
•Inheritance
•Abstraction
•Polymorphism
Programming Languages
•Programming languages allow programmers to develop
software.
•The three major families of languages are:
•Machine languages
•Assembly languages
•High-Level languages
6
Machine Languages
• Comprised of 1s and 0s
• The “native” language of a computer
• Difficult to program – one misplaced 1 or 0 will cause the
program to fail.
• Example of code:
1110100010101 111010101110
10111010110100 10100011110111
7
Assembly Languages
• Assembly languages are comprised of a set of
elemental commands which are tied to a specific
processor.
• Assembly language code needs to be translated to
machine language before the computer processes
it.
• Example:
ADD 1001010, 1011010
8
Procedural Languages
• Early high-level languages are typically called procedural
languages.
• Procedural languages are characterized by sequential
sets of linear commands. The focus of such languages is
on structure.
• Examples include C, COBOL, Fortran, LISP, Perl, HTML,
VBScript
9
PROGRAMMING PARADIGMS
PARADIGMS
Paradigms means organizing
principle of a program.
It is an approach to programming.
MODULE
A module is an identifiable piece of
code within a program, with a sets of
inputs an outputs.
It has a sole purpose, and processes
its inputs in a way dictated by its goal
and provide some output.
10
Object-Oriented Languages
• The focus of OOP languages is not on structure,
but on modeling data.
• Programmers code using “ blueprints ” of data
models called classes.
• Examples of OOP languages include C++, Visual
Basic.NET and Java.
11
Early programming languages
Classic C
Simula
Pascal
Algol68
BCPL
Fortran
Lisp
COBOL
Algol60
PL1
1950s 1960s 1970s
Red==major commercial use
Blue==will produce important “offspring”
12
Modern programming languages
Object Pascal
C++
Java95
C#Ada98
C++98
Java04
C++0x
PythonLisp
Smalltalk
Fortran77
Ada
Eiffel
Simula67
COBOL89
PHP
C89
Pascal
PERL
Visual Basic
COBOL04 Javascript
13
OOP• OOP is mainly a program design philosophy.
• OOP uses a different set of programming languages than old procedural programming languages (C,
Pascal, etc.).
• Everything in OOP is grouped as self sustainable "objects". Hence, you gain re-usability by means of
four main object-oriented programming concepts. In OOP programmers define not only the data type of
a data structure, but also the types of operations/methods (functions) that can be applied to the data
structure.
• In this way, the data structure becomes an object that includes both data and functions (methods) in
one unit. In addition, programmers can create relationships between one object and another.
• For example, objects can inherit characteristics from other objects.
14
Object
- usually a person, place or thing (a noun)
Method
- an action performed by an object (a verb)
Property or attribute
- Characteristics of certain object.
Class
- a category of similar objects (such as automobiles), does not hold any
values of the object’s attributes/properties
OOP Basic Terminology
15
Classes and Objects
• A class is a prototype, idea, and blueprint for
creating objects.
• An object is an instance of a class.
• For example, in Java we define classes,
which in turn are used to create objects
• A class has a constructor for creating objects
• Class is composed of three things: its
name, attributes/properties, and methods.
16
Classes and Objects
“X” CAR
PROPERTY
Plate no: AD47483
Color: Blue
Manufacturer: Mercedes
Model: CLK
Gear type: Automatic
METHOD
Moves forward
Moves backward
Moves right
Moves left
Stops
17
CLASS OBJECT
Class is a data type Object is an instance of Class.
It generates OBJECTS It gives life to CLASS
Does not occupy memory location It occupies memory location.
It cannot be manipulated because it is not
available in memory (except static class)
It can be manipulated.
Technical contrast between Objects & Classes
Object is a class in “runtime”
18
BASIC CONCEPTS OF OOP
The object oriented programming has been developed with a view to
overcome the drawbacks of conventional programming approach. The oop
approach is based on certain concepts that help it attain its goal of
overcoming the drawbacks of shortcomings of conventional programming
approaches.
The different types of oops concepts are :-
1) Data Abstraction
2) Encapsulation
3) Inheritance
4) polymorphism
19
DATA ABSTRACTION
• Abstraction is a design principle.
• Is the process of removing characteristics from something in order to reduce it to a set of essential characteristics.
• Through the process of abstraction, a programmer hides all but the relevant data about a class in order to reduce
complexity and increase reusability.
• Abstraction is a basic representation of a concept. Abstraction allows programmers to represent complex real world
in the simplest manner.
• It is a process of identifying the relevant qualities and behaviors an object should possess, in other word represent
the necessary features without representing the back ground details
• You should always use abstraction to ease reusability, and understanding for the design and enable extension.
• When we design the abstract classes, we define the framework for later extensions.
• An abstract class, which declared with the “abstract” keyword, cannot be instantiated.
• It can only be used as a super-class for other classes that extend the abstract class. Abstract class is a design
concept and implementation gets completed when it is being realized by a subclass.
20
Encapsulation
• Is the inclusion of property & method within a class/object in which
it needs to function properly.
• Also, enables reusability of an instant of an already implemented
class within a new class while hiding & protecting the method
and properties from the client classes.
• The class is kind of a container or capsule or a cell, which encapsulate
the set of methods, attributes and properties to provide its indented
functionalities to other classes.
• In that sense, encapsulation also allows a class to change its internal implementation without hurting the overall
functioning of the system.
• That idea of encapsulation is to hide how a class does its operations while allowing requesting its operations.
21
Inheritance
• Inheritance—a way of organizing classes
• Term comes from inheritance of traits like eye color, hair color, and so on.
• Classes with properties in common can be grouped so that their common
properties are only defined once in parent class.
• Superclass – inherit its attributes & methods to the subclass(es).
• Subclass – can inherit all its superclass attributes & methods besides having
• its own unique attributes & methods.
•Inheritance allows child classes to inherit the characteristics of existing parent class
•Attributes (fields and properties)
•Operations (methods)
•Child class can extend the parent class
•Add new fields and methods
•Redefine methods (modify existing behavior)
•A class can implement an interface by providing implementation for all its methods
Expresses commonality among classes/objects
Allows code reusability
Highlights relationships
Helps in code organization
22
TYPES OF INHERITANCE
• Single Inheritance
One class inherits from
another.
• Multiple Inheritance
One class inherits from two or more other classes.
Account
- balance
- name
- number
+ withdraw()
+ createStatement()
Savings
FlyingThing Animal
HorseWolfBirdHelicopterAirplane
23
• Encapsulation, Inheritance, and Abstraction concepts are very related to Polymorphism.
• Polymorphisms is a generic term that means 'many shapes'. More precisely Polymorphisms means the ability to
request that the same methods be performed by a wide range of different types of things.
• In OOP, polymorphisms is a technical issue and principle.
• It is achieved by using many different techniques named method overloading, operator overloading, and method
overriding.
• An object has “multiple identities”, based on its class inheritance tree
• It can be used in different ways
• It is the ability to look at a class in its parent image.
• Lets see the robot example throughout the following few slides
Polymorphism
24
ADVANTAGES AND DISADVANTAGES OF OOP
ADVANTAGES
• Code reuse & recycling.
• Improved software-development
productivity.
• Improved software maintainability.
• Faster development.
• Lower cost of development.
• Higher-quality software.
• Encapsulation.
DISADVANTAGES
• Steep learning curve.
• Could lead to larger program sizes.
• Could produce slower programs.
• The oop programs, design is stricky.
• Also one needs to do proper planning and
proper design for OOP programming.
• The relations among classes become
artificial at times.
25
OOP Suitability
Object oriented programming is good in
complex projects or modular type of systems. It
allows simultaneous system development teams and
also could aid in agile system development
environments like extreme Programming.
26
THANKING
YOU
-Shivam Kakkar
-Avneesh Yadav

Contenu connexe

Tendances

1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
Jay Patel
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
farhan amjad
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented Programming
Abhilash Nair
 

Tendances (20)

Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Oop Presentation
Oop PresentationOop Presentation
Oop Presentation
 
OOP in Java
OOP in JavaOOP in Java
OOP in Java
 
General OOP Concepts
General OOP ConceptsGeneral OOP Concepts
General OOP Concepts
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
 
General oops concepts
General oops conceptsGeneral oops concepts
General oops concepts
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Object Oriented Programming in Java _lecture 1
Object Oriented Programming in Java _lecture 1Object Oriented Programming in Java _lecture 1
Object Oriented Programming in Java _lecture 1
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft Developer
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
 
Presentation c
Presentation cPresentation c
Presentation c
 
Oops
OopsOops
Oops
 
Oop basic overview
Oop basic overviewOop basic overview
Oop basic overview
 
OOPS Characteristics
OOPS CharacteristicsOOPS Characteristics
OOPS Characteristics
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented Programming
 
1 Intro Object Oriented Programming
1  Intro Object Oriented Programming1  Intro Object Oriented Programming
1 Intro Object Oriented Programming
 

Similaire à General oop concept

Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
Abzetdin Adamov
 

Similaire à General oop concept (20)

Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigms
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
 
Oop(object oriented programming)
Oop(object oriented programming)Oop(object oriented programming)
Oop(object oriented programming)
 
Oops
OopsOops
Oops
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John Mulhall
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
 
ITFT - Oops
ITFT - OopsITFT - Oops
ITFT - Oops
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
Oodb
OodbOodb
Oodb
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
The Big Picture
The Big PictureThe Big Picture
The Big Picture
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Basic concepts of oops
Basic concepts of oopsBasic concepts of oops
Basic concepts of oops
 

Dernier

Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
AlMamun560346
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Lokesh Kothari
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
RizalinePalanog2
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
gindu3009
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
Lokesh Kothari
 

Dernier (20)

Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
 

General oop concept

  • 1.
  • 2. INTRODUCTIONWITH THE RAPIDLY CHANGING THE WORLD AN THE HIGHLY COMPETITIVE AND VERSATILE NATURE OF INDUSTRY , THE OPERATIONS ARE BECOMING MORE AND MORE COMPLEX. IN VIEW OF THE INCREASING COMPLEXITY OF SOFTWARE SYSTEM , THE SOFTWARE INDUSTRY AND SOFTWARE ENGINEER CONTINOUSLY LOOK FOR THE NEW APPROACHES TO SOFTWARE DESIGN AND DEVELOPMENT. THE INCREASESD COMPLEXIITY HAD BECOMETHE CHIEF PROBLEM WITH COMPUTER PROGRAMS IN TRADITIONAL LANGUAGES.
  • 3. EVOLUTION OF SOFTWAREA PROGRAM SERVES THE PURPOSE OF COMMANDING THE COMPUTER. THE EFFICIENCY AND USEFULNESS OF A PROGRAM DEPENDS NOT ONLY ON PROPER ISE COMMAND BUT PROGRAMMING LANGUAGES ALSO. LOW LEVEL LANGUAGES These are machine oriented and require extensive knowledge of computer circuitry. Machine language, in which instructions are written in binary code, is the only language the computer can execute directly. Assembly language, in which instructions are written using symbolic names for machine operations and operands, makes programming less tedious than machine language using assembler software (e.g READ, ADD, STORE, etc) HIGH LEVEL LANGUAGE The programs written in HLLS are converted into machine language using compiler or interpreter as a computer can work with machine language only. A PROGRAM LANGUAGE SHOULD: (I) It should provide a vehicle for the programmer to specify actions to be executed and (II) It should provide a set of concepts for the programmer to use when thinking about what can be done.
  • 5. Programming Languages •Programming languages allow programmers to develop software. •The three major families of languages are: •Machine languages •Assembly languages •High-Level languages
  • 6. 6 Machine Languages • Comprised of 1s and 0s • The “native” language of a computer • Difficult to program – one misplaced 1 or 0 will cause the program to fail. • Example of code: 1110100010101 111010101110 10111010110100 10100011110111
  • 7. 7 Assembly Languages • Assembly languages are comprised of a set of elemental commands which are tied to a specific processor. • Assembly language code needs to be translated to machine language before the computer processes it. • Example: ADD 1001010, 1011010
  • 8. 8 Procedural Languages • Early high-level languages are typically called procedural languages. • Procedural languages are characterized by sequential sets of linear commands. The focus of such languages is on structure. • Examples include C, COBOL, Fortran, LISP, Perl, HTML, VBScript
  • 9. 9 PROGRAMMING PARADIGMS PARADIGMS Paradigms means organizing principle of a program. It is an approach to programming. MODULE A module is an identifiable piece of code within a program, with a sets of inputs an outputs. It has a sole purpose, and processes its inputs in a way dictated by its goal and provide some output.
  • 10. 10 Object-Oriented Languages • The focus of OOP languages is not on structure, but on modeling data. • Programmers code using “ blueprints ” of data models called classes. • Examples of OOP languages include C++, Visual Basic.NET and Java.
  • 11. 11 Early programming languages Classic C Simula Pascal Algol68 BCPL Fortran Lisp COBOL Algol60 PL1 1950s 1960s 1970s Red==major commercial use Blue==will produce important “offspring”
  • 12. 12 Modern programming languages Object Pascal C++ Java95 C#Ada98 C++98 Java04 C++0x PythonLisp Smalltalk Fortran77 Ada Eiffel Simula67 COBOL89 PHP C89 Pascal PERL Visual Basic COBOL04 Javascript
  • 13. 13 OOP• OOP is mainly a program design philosophy. • OOP uses a different set of programming languages than old procedural programming languages (C, Pascal, etc.). • Everything in OOP is grouped as self sustainable "objects". Hence, you gain re-usability by means of four main object-oriented programming concepts. In OOP programmers define not only the data type of a data structure, but also the types of operations/methods (functions) that can be applied to the data structure. • In this way, the data structure becomes an object that includes both data and functions (methods) in one unit. In addition, programmers can create relationships between one object and another. • For example, objects can inherit characteristics from other objects.
  • 14. 14 Object - usually a person, place or thing (a noun) Method - an action performed by an object (a verb) Property or attribute - Characteristics of certain object. Class - a category of similar objects (such as automobiles), does not hold any values of the object’s attributes/properties OOP Basic Terminology
  • 15. 15 Classes and Objects • A class is a prototype, idea, and blueprint for creating objects. • An object is an instance of a class. • For example, in Java we define classes, which in turn are used to create objects • A class has a constructor for creating objects • Class is composed of three things: its name, attributes/properties, and methods.
  • 16. 16 Classes and Objects “X” CAR PROPERTY Plate no: AD47483 Color: Blue Manufacturer: Mercedes Model: CLK Gear type: Automatic METHOD Moves forward Moves backward Moves right Moves left Stops
  • 17. 17 CLASS OBJECT Class is a data type Object is an instance of Class. It generates OBJECTS It gives life to CLASS Does not occupy memory location It occupies memory location. It cannot be manipulated because it is not available in memory (except static class) It can be manipulated. Technical contrast between Objects & Classes Object is a class in “runtime”
  • 18. 18 BASIC CONCEPTS OF OOP The object oriented programming has been developed with a view to overcome the drawbacks of conventional programming approach. The oop approach is based on certain concepts that help it attain its goal of overcoming the drawbacks of shortcomings of conventional programming approaches. The different types of oops concepts are :- 1) Data Abstraction 2) Encapsulation 3) Inheritance 4) polymorphism
  • 19. 19 DATA ABSTRACTION • Abstraction is a design principle. • Is the process of removing characteristics from something in order to reduce it to a set of essential characteristics. • Through the process of abstraction, a programmer hides all but the relevant data about a class in order to reduce complexity and increase reusability. • Abstraction is a basic representation of a concept. Abstraction allows programmers to represent complex real world in the simplest manner. • It is a process of identifying the relevant qualities and behaviors an object should possess, in other word represent the necessary features without representing the back ground details • You should always use abstraction to ease reusability, and understanding for the design and enable extension. • When we design the abstract classes, we define the framework for later extensions. • An abstract class, which declared with the “abstract” keyword, cannot be instantiated. • It can only be used as a super-class for other classes that extend the abstract class. Abstract class is a design concept and implementation gets completed when it is being realized by a subclass.
  • 20. 20 Encapsulation • Is the inclusion of property & method within a class/object in which it needs to function properly. • Also, enables reusability of an instant of an already implemented class within a new class while hiding & protecting the method and properties from the client classes. • The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attributes and properties to provide its indented functionalities to other classes. • In that sense, encapsulation also allows a class to change its internal implementation without hurting the overall functioning of the system. • That idea of encapsulation is to hide how a class does its operations while allowing requesting its operations.
  • 21. 21 Inheritance • Inheritance—a way of organizing classes • Term comes from inheritance of traits like eye color, hair color, and so on. • Classes with properties in common can be grouped so that their common properties are only defined once in parent class. • Superclass – inherit its attributes & methods to the subclass(es). • Subclass – can inherit all its superclass attributes & methods besides having • its own unique attributes & methods. •Inheritance allows child classes to inherit the characteristics of existing parent class •Attributes (fields and properties) •Operations (methods) •Child class can extend the parent class •Add new fields and methods •Redefine methods (modify existing behavior) •A class can implement an interface by providing implementation for all its methods Expresses commonality among classes/objects Allows code reusability Highlights relationships Helps in code organization
  • 22. 22 TYPES OF INHERITANCE • Single Inheritance One class inherits from another. • Multiple Inheritance One class inherits from two or more other classes. Account - balance - name - number + withdraw() + createStatement() Savings FlyingThing Animal HorseWolfBirdHelicopterAirplane
  • 23. 23 • Encapsulation, Inheritance, and Abstraction concepts are very related to Polymorphism. • Polymorphisms is a generic term that means 'many shapes'. More precisely Polymorphisms means the ability to request that the same methods be performed by a wide range of different types of things. • In OOP, polymorphisms is a technical issue and principle. • It is achieved by using many different techniques named method overloading, operator overloading, and method overriding. • An object has “multiple identities”, based on its class inheritance tree • It can be used in different ways • It is the ability to look at a class in its parent image. • Lets see the robot example throughout the following few slides Polymorphism
  • 24. 24 ADVANTAGES AND DISADVANTAGES OF OOP ADVANTAGES • Code reuse & recycling. • Improved software-development productivity. • Improved software maintainability. • Faster development. • Lower cost of development. • Higher-quality software. • Encapsulation. DISADVANTAGES • Steep learning curve. • Could lead to larger program sizes. • Could produce slower programs. • The oop programs, design is stricky. • Also one needs to do proper planning and proper design for OOP programming. • The relations among classes become artificial at times.
  • 25. 25 OOP Suitability Object oriented programming is good in complex projects or modular type of systems. It allows simultaneous system development teams and also could aid in agile system development environments like extreme Programming.

Notes de l'éditeur

  1. Uses assembler
  2. Together with Ole-Johan Dahl he developed SIMULA I (1961–1965) and SIMULA-67 - the first object-oriented programming languages, introducing the concepts upon which all later object-oriented programming languages are built: objects, classes, inheritance, virtual quantities and multi-threaded (quasi-parallel) program execution.
  3. Together with Ole-Johan Dahl he developed SIMULA I (1961–1965) and SIMULA-67 - the first object-oriented programming languages, introducing the concepts upon which all later object-oriented programming languages are built: objects, classes, inheritance, virtual quantities and multi-threaded (quasi-parallel) program execution.
  4. Which we will later discuss
  5. Object is a class in the runtime
  6. In programming languages, an abstract type is a type in a nominative type system which cannot be instantiated directly. Abstract types are also known as existential types.[1] An abstract type may provide no implementation, or an incomplete implementation. Often, abstract types will have one or more implementations provided separately, for example, in the form of concrete subclasses which can be instantiated. It may include abstract methods or abstract properties that are shared by its subtypes. Abstract types are useful in that they can be used to define and enforce a protocol; a set of operations which all objects that implement the protocol must support. Useful in big software projects with several programmers, as the programming leader can set and define some set of protocols for others to start working with.