SlideShare a Scribd company logo
1 of 24
BlueJ
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING
OOP offers a new & powerful way to cope
with this complexity. Its goal is:
• Clearer program
• More reliable program
• More easily maintained program
Evolution of Software
A program serves the purpose of commanding the computer.The
efficiency and usefulness of a program not only on proper use of
commands but also on the programming language. It is written in the
two major types of programming languages:
• Low Level Language
• High Level Language
Low Level Languages
These are machine oriented and require extensive knowledge of
computer circuitry i.e. machine language and assembly language.
In machine language, instructions are written in binary numbers (0 and
1).
In assembly language, instructions are written in symbolic names like
STORE, ADD, READ etc.
Programming Language Generations
• First Generation Programming Language (1GL)
• Second Generation Programming Language (2GL)
• Third Generation Programming Language (3GL)
• Fourth Generation Programming Language (4GL)
• Fifth Generation Programming Language (5GL)
1GL
A first generation programming language is a machine-level
programming language. It consists of 1’s and 0’s. Originally, no
translator software such as compiler or interpreter was used to compile
or assemble the first-generation language.
2GL
A second generation programming language is a term usually used to
refer to some form of assembly language. Unlike 1GL, it can actually be
read and written fairly easily by a human as it uses mnemonics to
specify instructions.
3GL
A third generation programming language is designed to be easier for a
human to understand, using general words of English such as: while, if,
goto etc.
Examples: ALGOL, COBOL, C/C++ etc.
4GL
A fourth generation language is designed to be closer to natural
language than a 3GL language.That is programmers have just to
specifyWHAT is required rather than HOW it is to be done, which is
done in case of 3GLs. Languages for accessing databases (such as SQL)
are often described as 4GL languages.
5GL
Fifth generation languages are used mainly inArtificial Intelligence
research.
Prolog, OPS5, and Mercury are the best known fifth-generation
languages.
Programming Paradigms
By paradigm one means a way of thinking or doing things.
In other words, Paradigm means organizing principle of a program. It is
an approach to programming.
Following approach of programming are as available:
1. Procedural Programming or Modular Programming
2. Structural Programming or Object Oriented Programming
3. Block Programming or Digital Programming
1. Procedural or Modular Programming
A program in a procedural language is a list of instructions where each
statement tells the computer to do something. The focus is on the
processing i.e. the algorithm needed to perform the desired
computation.
A module is an identifiable piece of code within a program, with a set of
inputs and outputs. It has a sole purpose, and processes its inputs in a
way dictated by its goal and provides some outputs.
Limitations of Procedural Programming
Approach
• Emphasis on algorithm (or procedure) rather than data. Data takes
the back seat with this programming paradigm.
• Change in a datatype being processed needs to be propagated to all
the functions that use the same datatype.This is a frustrating and
time-consuming process.
• The procedural programming (modular programming) paradigm does
not model realWorld very well.
The Object Oriented Programming
The object-oriented approach views a problem in terms of objects
involved rather than procedure for doing it.
Object is an identifiable entity with some characteristics and behaviour.
A class is a template / blueprint representing a group of objects that
share common properties and relationships.
Basic Concept of OOP
1. Data Abstraction (Data Hiding)
2. Encapsulation
3. Inheritance
4. Polymorphism
Data Abstraction
Abstraction or Data Abstraction refers to the act of representing
essential features without including the background details or
explanations.
Data Hiding is a related concept. When abstraction exposes the
necessary or required details, it hides the rest of the details, which is
data hiding. For example, in a Switchboard, only switches and a board
is exposed; other details like circuitry and wiring etc. are hidden.
Encapsulation
• Encapsulation is the way of combining both data and the functions
that operate on that data under a single unit (called member
functions or methods).
• The wrapping up of data and operations/functions (that operate on
the data) into a single unit (called class) is known as Encapsulation.
Inheritance
Understanding inheritance is critical to understanding the whole point
behind object oriented programming. For instance, we are humans.We
inherit from the class ‘Humans’ certain properties, such as ability to
speak, breath, eat, drink etc. But these properties are not unique to
humans.
The class ‘Human’ inherits these properties from the class ‘Mammal’
which again inherits some of its properties from another class ‘Animal’.
The capability to pass down properties is a powerful one. It allows us to
describe things in an economical way.
Inheritance
Inheritance
Base Class & Subclass:
A base class is a super class from which another class inherits
properties. Inheriting Class is called subclass (derived class).
Polymorphism
Polymorphism is the ability for a message or data to be processed in
more than one form.
Advantages of OOP
•Re-use of code.
•Ease of comprehension.
•Ease of fabrication & maintenance.
•Easy redesign and extension.
Disadvantages of OOP
• With OOP, classes tend be overly generalised
• The relations among classes become artificial at times.
• The OOP programs design is tricky.
• Also one needs to do proper planning and proper design for OOP
programming.
• To program with OOP, programmer need proper skills such as design
skills, programming skills, thinking in terms of objects etc.
Bluej

More Related Content

What's hot

Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingGwyneth Calica
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languagesRohit Shrivastava
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmbusyking03
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Krishna Sai
 
Operating system
Operating systemOperating system
Operating systemasmakh89
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNoel Malle
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languagesNaqashAhmad14
 
Introduction to Computer Science
Introduction to Computer ScienceIntroduction to Computer Science
Introduction to Computer ScienceKalpit Jain
 
History of Programming Language
History of Programming LanguageHistory of Programming Language
History of Programming Languagetahria123
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNSU-Biliran Campus
 
Programming language
Programming languageProgramming language
Programming languageShuja Qais
 
Evolution of operating system
Evolution of operating systemEvolution of operating system
Evolution of operating systemArshad khan
 
Presentation on generation of languages
Presentation on generation of languagesPresentation on generation of languages
Presentation on generation of languagesRicha Pant
 

What's hot (20)

System programming
System programmingSystem programming
System programming
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Basic of compiler
Basic of compiler Basic of compiler
Basic of compiler
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-
 
Operating system
Operating systemOperating system
Operating system
 
generation of programming language
generation of programming languagegeneration of programming language
generation of programming language
 
Basic of Computer Introduction - World of Computers
Basic of Computer Introduction - World of Computers Basic of Computer Introduction - World of Computers
Basic of Computer Introduction - World of Computers
 
computer languages
computer languagescomputer languages
computer languages
 
Presentation on Programming Languages.
Presentation on Programming Languages.Presentation on Programming Languages.
Presentation on Programming Languages.
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
introduction to programming languages
introduction to programming languagesintroduction to programming languages
introduction to programming languages
 
Graphical programming
Graphical programmingGraphical programming
Graphical programming
 
Introduction to Computer Science
Introduction to Computer ScienceIntroduction to Computer Science
Introduction to Computer Science
 
History of Programming Language
History of Programming LanguageHistory of Programming Language
History of Programming Language
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Programming language
Programming languageProgramming language
Programming language
 
Evolution of operating system
Evolution of operating systemEvolution of operating system
Evolution of operating system
 
Presentation on generation of languages
Presentation on generation of languagesPresentation on generation of languages
Presentation on generation of languages
 

Similar to Bluej

PCCF UNIT 2.pptx
PCCF UNIT 2.pptxPCCF UNIT 2.pptx
PCCF UNIT 2.pptxDivyaKS12
 
PCCF-UNIT 2-1 new.docx
PCCF-UNIT 2-1 new.docxPCCF-UNIT 2-1 new.docx
PCCF-UNIT 2-1 new.docxprakashvs7
 
Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - IntroductionMadishetty Prathibha
 
Basic OOPS concept for Core JAVA
Basic OOPS concept for Core JAVABasic OOPS concept for Core JAVA
Basic OOPS concept for Core JAVAAnkita Totala
 
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxvishnupriyapm4
 
La 5 Programming1
La 5   Programming1La 5   Programming1
La 5 Programming1Cma Mohd
 
Third and fourth generation programming language
Third and fourth generation programming languageThird and fourth generation programming language
Third and fourth generation programming languageomeed
 
SD & D Types of programming language
SD & D Types of programming languageSD & D Types of programming language
SD & D Types of programming languageForrester High School
 
Basic Programming Concept
Basic Programming ConceptBasic Programming Concept
Basic Programming ConceptCma Mohd
 
Ppt about programming in methodology
Ppt about programming in methodology Ppt about programming in methodology
Ppt about programming in methodology Vaishnavirakshe2
 
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...ijpla
 

Similar to Bluej (20)

PCCF UNIT 2.pptx
PCCF UNIT 2.pptxPCCF UNIT 2.pptx
PCCF UNIT 2.pptx
 
PCCF-UNIT 2-1 new.docx
PCCF-UNIT 2-1 new.docxPCCF-UNIT 2-1 new.docx
PCCF-UNIT 2-1 new.docx
 
Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
 
object oriented programming(oops)
object oriented programming(oops)object oriented programming(oops)
object oriented programming(oops)
 
Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Oop basic overview
Oop basic overviewOop basic overview
Oop basic overview
 
Basic OOPS concept for Core JAVA
Basic OOPS concept for Core JAVABasic OOPS concept for Core JAVA
Basic OOPS concept for Core JAVA
 
PCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptxPCCF UNIT 2 CLASS.pptx
PCCF UNIT 2 CLASS.pptx
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
La 5 Programming1
La 5   Programming1La 5   Programming1
La 5 Programming1
 
Third and fourth generation programming language
Third and fourth generation programming languageThird and fourth generation programming language
Third and fourth generation programming language
 
SD & D Types of programming language
SD & D Types of programming languageSD & D Types of programming language
SD & D Types of programming language
 
Basic Programming Concept
Basic Programming ConceptBasic Programming Concept
Basic Programming Concept
 
Ppt about programming in methodology
Ppt about programming in methodology Ppt about programming in methodology
Ppt about programming in methodology
 
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
INTERPRETER AND APPLIED DEVELOPMENT ENVIRONMENT FOR LEARNING CONCEPTS OF OBJE...
 

More from Saurabh Bhartiya

More from Saurabh Bhartiya (9)

Mq 4 sensor
Mq 4 sensorMq 4 sensor
Mq 4 sensor
 
Dc motor & wheel with l298 n motor driver
Dc motor & wheel with l298 n motor driverDc motor & wheel with l298 n motor driver
Dc motor & wheel with l298 n motor driver
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 
4 wheel base
4 wheel base4 wheel base
4 wheel base
 
3 wheel base
3 wheel base3 wheel base
3 wheel base
 
Introduction to design thinking
Introduction to design thinkingIntroduction to design thinking
Introduction to design thinking
 
BlueJ Two
BlueJ TwoBlueJ Two
BlueJ Two
 
Annual report updated into 82
Annual report updated into 82Annual report updated into 82
Annual report updated into 82
 
Curriculam Vitae
Curriculam VitaeCurriculam Vitae
Curriculam Vitae
 

Recently uploaded

FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use CasesTechSoup
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxCeline George
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 

Recently uploaded (20)

FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 

Bluej

  • 1. BlueJ INTRODUCTION TO OBJECT ORIENTED PROGRAMMING
  • 2. OOP offers a new & powerful way to cope with this complexity. Its goal is: • Clearer program • More reliable program • More easily maintained program
  • 3. Evolution of Software A program serves the purpose of commanding the computer.The efficiency and usefulness of a program not only on proper use of commands but also on the programming language. It is written in the two major types of programming languages: • Low Level Language • High Level Language
  • 4. Low Level Languages These are machine oriented and require extensive knowledge of computer circuitry i.e. machine language and assembly language. In machine language, instructions are written in binary numbers (0 and 1). In assembly language, instructions are written in symbolic names like STORE, ADD, READ etc.
  • 5. Programming Language Generations • First Generation Programming Language (1GL) • Second Generation Programming Language (2GL) • Third Generation Programming Language (3GL) • Fourth Generation Programming Language (4GL) • Fifth Generation Programming Language (5GL)
  • 6. 1GL A first generation programming language is a machine-level programming language. It consists of 1’s and 0’s. Originally, no translator software such as compiler or interpreter was used to compile or assemble the first-generation language.
  • 7. 2GL A second generation programming language is a term usually used to refer to some form of assembly language. Unlike 1GL, it can actually be read and written fairly easily by a human as it uses mnemonics to specify instructions.
  • 8. 3GL A third generation programming language is designed to be easier for a human to understand, using general words of English such as: while, if, goto etc. Examples: ALGOL, COBOL, C/C++ etc.
  • 9. 4GL A fourth generation language is designed to be closer to natural language than a 3GL language.That is programmers have just to specifyWHAT is required rather than HOW it is to be done, which is done in case of 3GLs. Languages for accessing databases (such as SQL) are often described as 4GL languages.
  • 10. 5GL Fifth generation languages are used mainly inArtificial Intelligence research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.
  • 11. Programming Paradigms By paradigm one means a way of thinking or doing things. In other words, Paradigm means organizing principle of a program. It is an approach to programming. Following approach of programming are as available: 1. Procedural Programming or Modular Programming 2. Structural Programming or Object Oriented Programming 3. Block Programming or Digital Programming
  • 12. 1. Procedural or Modular Programming A program in a procedural language is a list of instructions where each statement tells the computer to do something. The focus is on the processing i.e. the algorithm needed to perform the desired computation. A module is an identifiable piece of code within a program, with a set of inputs and outputs. It has a sole purpose, and processes its inputs in a way dictated by its goal and provides some outputs.
  • 13. Limitations of Procedural Programming Approach • Emphasis on algorithm (or procedure) rather than data. Data takes the back seat with this programming paradigm. • Change in a datatype being processed needs to be propagated to all the functions that use the same datatype.This is a frustrating and time-consuming process. • The procedural programming (modular programming) paradigm does not model realWorld very well.
  • 14. The Object Oriented Programming The object-oriented approach views a problem in terms of objects involved rather than procedure for doing it. Object is an identifiable entity with some characteristics and behaviour. A class is a template / blueprint representing a group of objects that share common properties and relationships.
  • 15. Basic Concept of OOP 1. Data Abstraction (Data Hiding) 2. Encapsulation 3. Inheritance 4. Polymorphism
  • 16. Data Abstraction Abstraction or Data Abstraction refers to the act of representing essential features without including the background details or explanations. Data Hiding is a related concept. When abstraction exposes the necessary or required details, it hides the rest of the details, which is data hiding. For example, in a Switchboard, only switches and a board is exposed; other details like circuitry and wiring etc. are hidden.
  • 17. Encapsulation • Encapsulation is the way of combining both data and the functions that operate on that data under a single unit (called member functions or methods). • The wrapping up of data and operations/functions (that operate on the data) into a single unit (called class) is known as Encapsulation.
  • 18. Inheritance Understanding inheritance is critical to understanding the whole point behind object oriented programming. For instance, we are humans.We inherit from the class ‘Humans’ certain properties, such as ability to speak, breath, eat, drink etc. But these properties are not unique to humans. The class ‘Human’ inherits these properties from the class ‘Mammal’ which again inherits some of its properties from another class ‘Animal’. The capability to pass down properties is a powerful one. It allows us to describe things in an economical way.
  • 20. Inheritance Base Class & Subclass: A base class is a super class from which another class inherits properties. Inheriting Class is called subclass (derived class).
  • 21. Polymorphism Polymorphism is the ability for a message or data to be processed in more than one form.
  • 22. Advantages of OOP •Re-use of code. •Ease of comprehension. •Ease of fabrication & maintenance. •Easy redesign and extension.
  • 23. Disadvantages of OOP • With OOP, classes tend be overly generalised • The relations among classes become artificial at times. • The OOP programs design is tricky. • Also one needs to do proper planning and proper design for OOP programming. • To program with OOP, programmer need proper skills such as design skills, programming skills, thinking in terms of objects etc.