This document provides an introduction to object-oriented programming concepts including classes, objects, encapsulation, inheritance, and polymorphism. It defines a class as a blueprint for creating objects with data fields and methods. An object is an instance of a class that stores its own set of data and behaviors. Encapsulation, inheritance, and polymorphism are described as key principles of OOP. Common programming paradigms like procedural, object-oriented, functional, and declarative are also overviewed.
Object-oriented programming aims to implement real-world entities as objects that contain both data and functions. Some key characteristics of OOP include classes that act as blueprints for objects, encapsulation that binds data to the functions that operate on it, inheritance that allows classes to inherit properties from other classes, and polymorphism which allows the same message to be displayed in different forms. Advantages of OOP include reusability, flexibility, ease of maintenance and security through features like encapsulation.
The document discusses procedural programming and object-oriented programming. Procedural programming focuses on functions and steps, while object-oriented programming focuses more on modeling real-world objects and their properties and interactions. Key concepts discussed for object-oriented programming include objects, classes, abstraction, encapsulation, inheritance, and polymorphism. Visual programming is also introduced, which allows creating graphical user interfaces visually rather than through code.
The document discusses object-oriented programming and several key concepts:
1) OOP organizes programs around objects and well-defined interfaces rather than procedural code. This improves modularity and reuse.
2) Objects encapsulate both data (attributes) and behaviors (methods) and communicate via messages. This mimics the real world.
3) Distributed object systems allow objects to communicate across a network. Paradigms like remote method invocation, object request brokers, and object spaces define how this is implemented.
This document provides an introduction to object-oriented programming concepts including classes, objects, encapsulation, inheritance, and polymorphism. It defines a class as a blueprint for creating objects with data fields and methods. An object is an instance of a class that stores its own set of data and behaviors. Encapsulation, inheritance, and polymorphism are described as key principles of OOP. Common programming paradigms like procedural, object-oriented, functional, and declarative are also overviewed.
Object-oriented programming aims to implement real-world entities as objects that contain both data and functions. Some key characteristics of OOP include classes that act as blueprints for objects, encapsulation that binds data to the functions that operate on it, inheritance that allows classes to inherit properties from other classes, and polymorphism which allows the same message to be displayed in different forms. Advantages of OOP include reusability, flexibility, ease of maintenance and security through features like encapsulation.
The document discusses procedural programming and object-oriented programming. Procedural programming focuses on functions and steps, while object-oriented programming focuses more on modeling real-world objects and their properties and interactions. Key concepts discussed for object-oriented programming include objects, classes, abstraction, encapsulation, inheritance, and polymorphism. Visual programming is also introduced, which allows creating graphical user interfaces visually rather than through code.
The document discusses object-oriented programming and several key concepts:
1) OOP organizes programs around objects and well-defined interfaces rather than procedural code. This improves modularity and reuse.
2) Objects encapsulate both data (attributes) and behaviors (methods) and communicate via messages. This mimics the real world.
3) Distributed object systems allow objects to communicate across a network. Paradigms like remote method invocation, object request brokers, and object spaces define how this is implemented.
Object oriented programming 6 oop with c++Vaibhav Khanna
This document discusses core concepts of object-oriented programming (OOP). It explains that OOP aims to represent real-world entities as objects that interact by sending messages. It then defines key OOP concepts - objects are run-time entities representing people or things, classes are user-defined types that define objects, encapsulation wraps data and functions into classes, inheritance allows classes to inherit properties from other classes, polymorphism allows the same operation to behave differently based on object type, dynamic binding determines behavior at run-time based on object type, and message passing allows objects to communicate by sending requests.
This document provides an overview of object-oriented programming (OOP) concepts including objects, classes, encapsulation, inheritance, polymorphism, and abstraction. It explains that OOP allows decomposition of programs into objects that contain both data and functions. Classes act as blueprints for objects and define their properties and behaviors.
1. Object oriented programming (OOP) is a programming paradigm that models concepts as "objects" that contain data and functionality.
2. A class defines the format for objects, including attributes like properties and behaviors like methods. Creating an object from a class is like a real-world object.
3. OOP concepts like encapsulation, inheritance, and polymorphism address limitations of procedural programming by combining related data and functions into classes and objects. Encapsulation wraps data and functions together, hiding implementation details.
This document compares procedure-oriented programming and object-oriented programming. Procedure-oriented programming divides programs into smaller subprograms called functions that can access shared global data, while object-oriented programming divides programs into objects that encapsulate both data and functions together and protect data from access by external functions. The document also discusses key object-oriented programming concepts like classes, encapsulation, inheritance, polymorphism, and messaging that provide benefits like code reuse and easier management of complex software projects.
This document provides information about an Object Oriented Programming course, including the class schedule, textbook, expectations, assignments, grading breakdown, and an introduction to OOP concepts. The class meets Monday, Wednesday, and Thursday each week at various times. Students are expected to be punctual, have at least 80% attendance, submit assignments on time, and attend all quizzes, which are unannounced. The textbook is Introduction to Java Programming by Y.Deniel Liang, and the grading includes quizzes, assignments, presentations, sessionals, and a final exam. An introduction to object-oriented programming concepts like objects, classes, inheritance, polymorphism, abstraction, and encapsulation is also provided.
Unit 2 discusses different programming paradigms including structured and unstructured programming. Structured programming divides code into modular functions making it easier to test, debug and modify, while unstructured programming writes code in a single block. Common structured programming languages include C and Pascal.
Unit 2 discusses different programming paradigms including structured and unstructured programming. Structured programming divides code into modular functions making it easier to test, debug and modify, while unstructured programming writes code in a single block. Common structured programming languages include C and Pascal.
Intro to JAVA
Basics of Oops
Features of Oops
Applications of Oops
How to create a JAVA program
How to Edit a Java Program
Compiling a Java program
Java Class file
Run or Executing a Java program
Command line arguments
Object And Oriented Programing ( Oop ) LanguagesJessica Deakin
The document discusses object-oriented programming (OOP) languages and provides examples to illustrate key concepts. It defines an object as something that can have features and behaviors. Features represent variables, while behaviors represent methods. A car object is used as an example, with features like speed and gear, and behaviors like changing gears and braking. The main features of OOP are identified as objects, classes, inheritance, abstraction, interfaces, encapsulation, polymorphism, and data abstraction. C++ is presented as an example of an OOP language that supports both procedural and object-oriented programming.
introduction of Object oriented programmingRiturajJain8
Object oriented programming (OOP) represents problems using real-world objects and their interactions. This chapter introduces OOP concepts including classes, objects, abstraction, encapsulation, inheritance, and polymorphism. It contrasts OOP with structured programming, which organizes programs in a logical structure rather than representing real-world entities. The chapter defines key OOP terms and provides examples to illustrate abstraction, encapsulation, inheritance, and polymorphism.
The document provides an introduction to object-oriented programming (OOP). It defines key OOP concepts like objects, classes, inheritance, encapsulation, and polymorphism. It also discusses design patterns like factory pattern and singleton pattern. Object-oriented programming uses objects and their interactions to design applications and computer programs. Classes and objects help manage complexity by encapsulating data and code into reusable components.
Object-oriented programming has its roots in SIMULA 67. Key aspects of OOP include abstract data types, inheritance, and dynamic binding. Java supports OOP through classes that are subclasses of the root class "Object" and utilize single inheritance. All Java objects are allocated dynamically on the heap using the "new" operator.
What is Object-Oriented Programming?
The OOP programming approach is based on fundamental concepts of class and object.
OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects.
There are many object-oriented programming languages including JavaScript, C++, Java, and Python.
It is programming style which is associated with concepts of class and object and various other concepts like:
Inheritance
polymorphism
abstraction
Encapsulation etc
Program are divided into small modules known as classes.
Function and data are tied together in an object.
Ducat India provides training in various technologies including object-oriented programming (OOP) in Java. OOP uses objects to model real-world objects, with objects having state and behavior. A class defines a template for objects and describes their properties and behaviors. Objects are instances of classes and have actual existence at runtime. Key OOP concepts in Java include encapsulation, inheritance, polymorphism, and abstraction.
This document provides an overview of object-oriented programming and Java. It discusses the major programming paradigms including imperative, logical, functional and object-oriented. It then covers the key principles of object-oriented programming like encapsulation, inheritance, abstraction and polymorphism. The document also defines Java applications and applets and explains the processes of editing, compiling and interpreting Java code.
Unit 1 introduces the basics of object-oriented programming (OOP). OOP treats data as objects that contain both data fields (properties) and methods (behaviors). Classes are templates that are used to create objects. Some key principles of OOP include encapsulation, which binds an object's data and methods together, inheritance which allows classes to share structures and behaviors of other classes, and polymorphism which allows different classes to have similarly-named methods that work in different ways. OOP aims to make code reusable, modular, and adaptable to changing requirements compared to traditional procedural programming.
Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
Object oriented programming is a modular approach to programming that treats data and functions that operate on that data as objects. The basic elements of OOP are objects, classes, and inheritance. Objects contain both data and functions that operate on that data. Classes are templates that define common properties and relationships between objects. Inheritance allows new classes to acquire properties of existing classes. OOP provides advantages like modularity, code reuse, and data abstraction.
This document describes the encapsulation and decapsulation process as a message passes through the layers of the OSI model. As the message moves from the physical layer at the source to the application layer at the destination, each higher layer encapsulates the message from the layer below and adds its own header. During decapsulation at the destination, headers are removed in reverse order as the message moves down the layers.
More Related Content
Similar to java introduction features and propertie
Object oriented programming 6 oop with c++Vaibhav Khanna
This document discusses core concepts of object-oriented programming (OOP). It explains that OOP aims to represent real-world entities as objects that interact by sending messages. It then defines key OOP concepts - objects are run-time entities representing people or things, classes are user-defined types that define objects, encapsulation wraps data and functions into classes, inheritance allows classes to inherit properties from other classes, polymorphism allows the same operation to behave differently based on object type, dynamic binding determines behavior at run-time based on object type, and message passing allows objects to communicate by sending requests.
This document provides an overview of object-oriented programming (OOP) concepts including objects, classes, encapsulation, inheritance, polymorphism, and abstraction. It explains that OOP allows decomposition of programs into objects that contain both data and functions. Classes act as blueprints for objects and define their properties and behaviors.
1. Object oriented programming (OOP) is a programming paradigm that models concepts as "objects" that contain data and functionality.
2. A class defines the format for objects, including attributes like properties and behaviors like methods. Creating an object from a class is like a real-world object.
3. OOP concepts like encapsulation, inheritance, and polymorphism address limitations of procedural programming by combining related data and functions into classes and objects. Encapsulation wraps data and functions together, hiding implementation details.
This document compares procedure-oriented programming and object-oriented programming. Procedure-oriented programming divides programs into smaller subprograms called functions that can access shared global data, while object-oriented programming divides programs into objects that encapsulate both data and functions together and protect data from access by external functions. The document also discusses key object-oriented programming concepts like classes, encapsulation, inheritance, polymorphism, and messaging that provide benefits like code reuse and easier management of complex software projects.
This document provides information about an Object Oriented Programming course, including the class schedule, textbook, expectations, assignments, grading breakdown, and an introduction to OOP concepts. The class meets Monday, Wednesday, and Thursday each week at various times. Students are expected to be punctual, have at least 80% attendance, submit assignments on time, and attend all quizzes, which are unannounced. The textbook is Introduction to Java Programming by Y.Deniel Liang, and the grading includes quizzes, assignments, presentations, sessionals, and a final exam. An introduction to object-oriented programming concepts like objects, classes, inheritance, polymorphism, abstraction, and encapsulation is also provided.
Unit 2 discusses different programming paradigms including structured and unstructured programming. Structured programming divides code into modular functions making it easier to test, debug and modify, while unstructured programming writes code in a single block. Common structured programming languages include C and Pascal.
Unit 2 discusses different programming paradigms including structured and unstructured programming. Structured programming divides code into modular functions making it easier to test, debug and modify, while unstructured programming writes code in a single block. Common structured programming languages include C and Pascal.
Intro to JAVA
Basics of Oops
Features of Oops
Applications of Oops
How to create a JAVA program
How to Edit a Java Program
Compiling a Java program
Java Class file
Run or Executing a Java program
Command line arguments
Object And Oriented Programing ( Oop ) LanguagesJessica Deakin
The document discusses object-oriented programming (OOP) languages and provides examples to illustrate key concepts. It defines an object as something that can have features and behaviors. Features represent variables, while behaviors represent methods. A car object is used as an example, with features like speed and gear, and behaviors like changing gears and braking. The main features of OOP are identified as objects, classes, inheritance, abstraction, interfaces, encapsulation, polymorphism, and data abstraction. C++ is presented as an example of an OOP language that supports both procedural and object-oriented programming.
introduction of Object oriented programmingRiturajJain8
Object oriented programming (OOP) represents problems using real-world objects and their interactions. This chapter introduces OOP concepts including classes, objects, abstraction, encapsulation, inheritance, and polymorphism. It contrasts OOP with structured programming, which organizes programs in a logical structure rather than representing real-world entities. The chapter defines key OOP terms and provides examples to illustrate abstraction, encapsulation, inheritance, and polymorphism.
The document provides an introduction to object-oriented programming (OOP). It defines key OOP concepts like objects, classes, inheritance, encapsulation, and polymorphism. It also discusses design patterns like factory pattern and singleton pattern. Object-oriented programming uses objects and their interactions to design applications and computer programs. Classes and objects help manage complexity by encapsulating data and code into reusable components.
Object-oriented programming has its roots in SIMULA 67. Key aspects of OOP include abstract data types, inheritance, and dynamic binding. Java supports OOP through classes that are subclasses of the root class "Object" and utilize single inheritance. All Java objects are allocated dynamically on the heap using the "new" operator.
What is Object-Oriented Programming?
The OOP programming approach is based on fundamental concepts of class and object.
OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects.
There are many object-oriented programming languages including JavaScript, C++, Java, and Python.
It is programming style which is associated with concepts of class and object and various other concepts like:
Inheritance
polymorphism
abstraction
Encapsulation etc
Program are divided into small modules known as classes.
Function and data are tied together in an object.
Ducat India provides training in various technologies including object-oriented programming (OOP) in Java. OOP uses objects to model real-world objects, with objects having state and behavior. A class defines a template for objects and describes their properties and behaviors. Objects are instances of classes and have actual existence at runtime. Key OOP concepts in Java include encapsulation, inheritance, polymorphism, and abstraction.
This document provides an overview of object-oriented programming and Java. It discusses the major programming paradigms including imperative, logical, functional and object-oriented. It then covers the key principles of object-oriented programming like encapsulation, inheritance, abstraction and polymorphism. The document also defines Java applications and applets and explains the processes of editing, compiling and interpreting Java code.
Unit 1 introduces the basics of object-oriented programming (OOP). OOP treats data as objects that contain both data fields (properties) and methods (behaviors). Classes are templates that are used to create objects. Some key principles of OOP include encapsulation, which binds an object's data and methods together, inheritance which allows classes to share structures and behaviors of other classes, and polymorphism which allows different classes to have similarly-named methods that work in different ways. OOP aims to make code reusable, modular, and adaptable to changing requirements compared to traditional procedural programming.
Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
Object oriented programming is a modular approach to programming that treats data and functions that operate on that data as objects. The basic elements of OOP are objects, classes, and inheritance. Objects contain both data and functions that operate on that data. Classes are templates that define common properties and relationships between objects. Inheritance allows new classes to acquire properties of existing classes. OOP provides advantages like modularity, code reuse, and data abstraction.
Similar to java introduction features and propertie (20)
This document describes the encapsulation and decapsulation process as a message passes through the layers of the OSI model. As the message moves from the physical layer at the source to the application layer at the destination, each higher layer encapsulates the message from the layer below and adds its own header. During decapsulation at the destination, headers are removed in reverse order as the message moves down the layers.
This document discusses the rules for relational databases defined by E.F. Codd, including that all data should be represented as values in tables, each data value can be logically accessed using a table name, primary key and column name, null values should be supported systematically, and the database description should be queryable using the same relational language as the data. It also covers relational algebra operations like select, project, union, difference, cartesian product, and aggregation functions.
This document discusses different types of switched networks including circuit-switched networks, datagram networks, and virtual-circuit networks. It provides details on the key aspects of each type:
- Circuit-switched networks use dedicated channels for each connection and resources are allocated for the full duration of a call. Datagram networks divide messages into packets that are routed independently without resource reservation. Virtual-circuit networks have characteristics of both, allocating resources for the duration of a connection like circuit-switching but allowing packets to take different paths.
- The structure of switches is also discussed, including crossbar switches for circuit switching and packet switches that use techniques like time-slot interchange and time-space-time switching to
Circuit switching and packet switching are the two main switching techniques used in communications networks. Circuit switching establishes a dedicated communication path between two stations for the duration of the call. It is inefficient if the channel is idle but provides transparent transfer once connected. Packet switching breaks messages into packets that are transmitted individually and reassembled at the destination. It makes more efficient use of network resources but adds complexity for routing and reassembly. X.25 and Frame Relay are common standards used to implement packet switching networks.
The document discusses network models and the OSI model. It describes the seven layers of the OSI model which include the physical, data link, network, transport, session, presentation and application layers. Each layer has a specific function and works together with other layers for communication. The document also discusses the TCP/IP protocol suite and how it maps to the OSI model. Finally, it covers the different addressing schemes used in TCP/IP including physical, logical, port and specific addresses.
The document provides an overview of artificial neural networks (ANN). It discusses how ANN are constructed to model the human brain and can perform tasks like pattern matching and classification. The key points are:
- ANN consist of interconnected nodes that operate in parallel, and connections between nodes are associated with weights. Each node receives weighted inputs and its activation level is calculated.
- Early models include the McCulloch-Pitts neuron model and Hebb network. Learning can be supervised, unsupervised, or reinforcement. Common activation functions and learning rules like backpropagation and Hebbian learning are described.
- Terminology includes weights, bias, thresholds, learning rates, and more. Different network architectures like feed
The document discusses the Arduino UNO board. It describes the components of the board including the ATmega328 microcontroller and digital and analog pins. It explains how to program the board using the Arduino IDE and connect it to a computer via USB. The steps to get started with the board are outlined, including installing drivers and uploading code to control digital pins using functions like pinMode(), digitalWrite(), and delay().
AI can be defined in multiple ways, including studying how to make computers intelligent like humans, automating intelligent behavior, and studying cognitive abilities through computational models. The Turing test proposes that a computer can be considered intelligent if a human cannot distinguish it from a real person through conversation. Early programs like ELIZA passed the Turing test through simple pattern matching and question swapping rather than true understanding. While the Turing test can be passed through extensive rules, it does not prove a system has human-level intelligence or comprehension.
This document provides an introduction to the Internet of Things (IoT) and discusses several applications of IoT technology. It defines IoT as connecting millions of smart devices and sensors to the Internet to collect and share data. Examples given include smart doorbells, wearables, and traffic lights. The document then discusses applications of IoT in agriculture, consumer use, healthcare, insurance, and traffic monitoring. It explains how IoT allows remote monitoring and control of systems to increase efficiency and convenience across several industries.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTjpsjournal1
The rivalry between prominent international actors for dominance over Central Asia's hydrocarbon
reserves and the ancient silk trade route, along with China's diplomatic endeavours in the area, has been
referred to as the "New Great Game." This research centres on the power struggle, considering
geopolitical, geostrategic, and geoeconomic variables. Topics including trade, political hegemony, oil
politics, and conventional and nontraditional security are all explored and explained by the researcher.
Using Mackinder's Heartland, Spykman Rimland, and Hegemonic Stability theories, examines China's role
in Central Asia. This study adheres to the empirical epistemological method and has taken care of
objectivity. This study analyze primary and secondary research documents critically to elaborate role of
china’s geo economic outreach in central Asian countries and its future prospect. China is thriving in trade,
pipeline politics, and winning states, according to this study, thanks to important instruments like the
Shanghai Cooperation Organisation and the Belt and Road Economic Initiative. According to this study,
China is seeing significant success in commerce, pipeline politics, and gaining influence on other
governments. This success may be attributed to the effective utilisation of key tools such as the Shanghai
Cooperation Organisation and the Belt and Road Economic Initiative.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
International Conference on NLP, Artificial Intelligence, Machine Learning an...gerogepatton
International Conference on NLP, Artificial Intelligence, Machine Learning and Applications (NLAIM 2024) offers a premier global platform for exchanging insights and findings in the theory, methodology, and applications of NLP, Artificial Intelligence, Machine Learning, and their applications. The conference seeks substantial contributions across all key domains of NLP, Artificial Intelligence, Machine Learning, and their practical applications, aiming to foster both theoretical advancements and real-world implementations. With a focus on facilitating collaboration between researchers and practitioners from academia and industry, the conference serves as a nexus for sharing the latest developments in the field.
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
2. • C is
called a structured programming lang
uage because to solve a large
problem,
• C programming language divides the
problem into smaller
modules called functions or
procedures each of which handles a
particular responsibility.
• The program which solves the entire
problem is a collection of such
functions.
• structured programming can save
time and energy when writing small
and simple programs (Though Simple
program is quite relative to the
writer) that would essentially hold
into one page.
• Object-Oriented Programming
(OOP) is a programming language
model organized around objects
rather than “actions”.
• The leading languages based on
OOP are C++, Java, Python, C#,
Visual Basic etc…
• The first step in OOP is to identify
all the objects the programmer
wants to manipulate and how they
relate to each other.
• Once an object has been identified,
the role of the programmer is to
generalize it as a class of objects
and define the kind of data that it
contains and list of procedures that
manipulate it.
3. OOP Basics
• Object:In real world could be a desk,tv,bicycle etc.
• It share two characteristics state and behavior.
• An object stores its state in fields called variables and its behavior through
methods.
• Methods operate on an object internal state and serve as the primary
mechanism for object to object communication.
4.
5.
6.
7. Encapsulation
• Encapsulation in java is a process of wrapping code and data
together into a single unit, for example capsule i.e. mixed of
several medicines.
• It is a technique of making the fields in a class private and
providing access to fields via public methods
8. Polymorphism
• It is the concept of object oriented programming.The ability of different
objects to respond, each in its own way, to identical messages is called
polymorphism.
• When one task is performed by different ways i.e. known as
polymorphism.
• poly mean many morph mean form.
9. Inheritance
• Inheritance in java is a mechanism in which one object acquires all the
properties and behaviors of parent object.
• The idea behind inheritance in java is that you can create new classes
that are built upon existing classes.
• When you inherit from an existing class, you can reuse methods and fields
of parent class, and you can add new methods and fields also.
• Inheritance represents the IS-A relationship, also known as parent-
child relationship.
10. Program
• An organized list of instructions that, when executed, causes the computer
to behave in a predetermined manner. Without programs, computers are
useless.
• A program is like a recipe. It contains a list of ingredients
(called variables) and a list of directions (called statements) that tell the
computer what to do with the variables. The variables can represent
numeric data, text, or graphical images.
• There are many programming languages --
C, C++, Pascal, BASIC, FORTRAN, COBOL, and LISP are just a few. These are
all high-level languages. One can also write programs in low-level
languages called assembly languages, although this is more difficult.
• Low-level languages are closer to the language used by a computer, while
high-level languages are closer to human languages.
• Eventually, every program must be translated into a machine
language that the computer can understand. This translation is performed
by compilers, interpreters, and assemblers.
• When you buy software, you normally buy an executable version of a
program. This means that the program is already in machine language -- it
has already been compiled and assembled and is ready to execute.
11.
12. L 3.4
Java Class Hierarchy
In Java, class “Object” is the base class to all other classes
If we do not explicitly say extends in a new class definition, it
implicitly extends Object
The tree of classes that extend from Object and all of its subclasses are
is called the class hierarchy
All classes eventually lead back up to Object
This will enable consistent access of objects of different classes.
13.
14. Abstraction is the concept of exposing only the
required essential characteristics and behavior
with respect to a context.
Hiding of data is known as data abstraction. In
object oriented programming language this is
implemented automatically while writing the
code in the form of class and object.
Real Life Example of Abstraction in Java
Abstraction shows only important things to the
user and hides the internal details, for example,
when we ride a bike, we only know about how
to ride bikes but can not know about how it
work? And also we do not know the internal
functionality of a bike.