Introduction to �Object Oriented Programming�

Gayathri Namasivayam

Introduction to OOP

  • Why use OOP?
  • Building blocks of OOP
  • What is OOP?
  • OOP concepts
  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism
  • Advantages vs Disadvantages
  • Object Oriented Programming (OOP) is one of the most widely used programming paradigm
  • Why is it extensively used?
  • Well suited for building trivial and complex applications
  • Allows re-use of code thereby increasing productivity
  • New features can be easily built into the existing code
  • Reduced production cost and maintenance cost
  • Common programming languages used for OOP include C++, Java, and C#

Building Blocks of OOP: Objects & Classes

  • Object: models a
  • Real world object (ex. computer, book, box)
  • Concept (ex. meeting, interview)
  • Process (ex. sorting a stack of papers or comparing two computers to measure their performance)
  • Class: prototype or blueprint from which objects are created
  • Set of attributes or properties that describes every object
  • Set of behavior or actions that every object can perform
  • Set of data (value for each of its attribute)
  • Set of actions that it can perform
  • An identity
  • Every object belongs to a class

Real World Example of Objects & Classes

Object: FordCar1

Start, Accelerate, Reverse, Stop

Color: Yellow

Type: Coupe

Model: Mustang

Cylinder: 6

Color, Type, Model, Cylinder

Class: FordCar

Color: Orange

Model: Focus

Cylinder: 4

Object: FordCar2

Another Real World Example..

Name, Height, Age

Speak, Listen, Eat, Run, Walk

Class: Person

Object: Person1

Height: 5’ 4”

Height: 5’ 9”

Object: Person2

  • A class is a set of variables (to represent its attributes) and functions (to describe its behavior) that act on its variables

Class ShippingBox

int shipping_cost() {

return cost_per_pound*weight;

sender_name : string

receiver_name : string

cost_per_pound : int

weight : int

shipping_cost() : int

  • Object is an instance of a class that holds data (values) in its variables. Data can be accessed by its functions

Objects of ShippingBox class

sender_name = Jim

receiver_name = John

cost_per_pound = 5

weight = 10

shipping_cost()

Object BoxB

Object BoxA

sender_name = Julie

receiver_name = Jill

cost_per_pound = 2

  • Paradigm for problem solving by interaction among objects
  • It follows a natural way of solving problems
  • Ex. Ann wants to start her car

(1) Ann walks to her car

(2) Ann sends a message to the car to start by turning on the ignition

(3)The car starts

Problem Solving in OOP

Problem: Ann wants to start her car

Color = Yellow

Type = Coupe

Model = Mustang

Cylinder = 6

Accelerate()

Object Ann’s car

  • Extracting essential properties and behavior of an entity
  • Class represents such an abstraction and is commonly referred to as an abstract data type

Ex. In an application that computes the shipping cost of a box, we extract its properties: cost_per_pound, weight and its behavior: shipping_cost()

Shipping Box

Sender’s name,

Receiver’s name,

Cost of shipping per pound,

Calculate shipping cost

sender_name

receiver_name

cost_per_pound

shipping_cost ()

  • Mechanism by which we combine data and the functions that manipulate the data into one unit
  • Objects & Classes enforce encapsulation
  • Create new classes (derived classes) from existing classes (base classes)
  • The derived class inherits the variables and functions of the base class and adds additional ones!
  • Provides the ability to re-use existing code

Inheritance Example

BankAccount CheckingAccount SavingsAccount

customer_name : string

account_type : string

balance : int

insufficient_funds_fee : int

deposit() : int

withdrawal() : int

process_deposit() : int

interest_rate : int

calculate_interest() : int

CheckingAccount

SavingsAccount

BankAccount

  • Polymorphism*

(* To be covered in the next class)

Disadvantages of OOP

  • Initial extra effort needed in accurately modeling the classes and sub-classes for a problem
  • Suited for modeling certain real world problems as opposed to some others
  • Classes & Objects
  • Concepts in OOP
  • Advantages & Disadvantages
  • Be prepared for an in-class activity (based on topics covered today)!
  • Polymorphism in OOP!

Browse Course Material

Course info, instructors.

  • Adam Marcus

Departments

  • Electrical Engineering and Computer Science

As Taught In

  • Programming Languages
  • Software Design and Engineering

Learning Resource Types

Introduction to programming in java, lecture 4: classes and objects.

Lecture presentation on programming in Java. Topics include: object oriented programming, defining classes, using classes, constructors, methods, accessing fields, primitives versus references, references versus values, and static types and methods.

facebook

You are leaving MIT OpenCourseWare

Object-Oriented Programming Principles  in Java:  OOP Concepts for Beginners

Thanoshan MV

Object-oriented programming offers a sustainable way to write spaghetti code. It lets you accrete programs as a series of patches. ― Paul Graham

Fundamentals of object-oriented programming

Object-oriented programming is a programming paradigm where everything is represented as an object.

Objects pass messages to each other. Each object decides what to do with a received message. OOP focuses on each object’s states and behaviors.

What Are Objects?

An object is an entity that has states and behaviors.

For example, dog, cat, and vehicle. To illustrate, a dog has states like age, color, name, and behaviors like eating, sleeping, and running.

State tells us how the object looks or what properties it has.

Behavior tells us what the object does.

We can actually represent a real world dog in a program as a software object by defining its states and behaviors.

Software objects are the actual representation of real world objects. Memory is allocated in RAM whenever creating a logical object.

An object is also referred to an instance of a class. Instantiating a class means the same thing as creating an object.

The important thing to remember when creating an object is: the reference type should be the same type or a super type of the object type. We’ll see what a reference type is later in this article.

What Are Classes?

A class is a template or blueprint from which objects are created.

Imagine a class as a cookie-cutter and objects as cookies.

cookie-cutter

Classes define states as instance variables and behaviors as instance methods.

Instance variables are also known as member variables.

Classes don't consume any space.

To give you an idea about classes and objects, let's create a Cat class that represents states and behaviors of real world Cat.

Now we have successfully defined a template for Cat. Let’s say we have two cats named Thor and Rambo.

Russian-Blue_01

How can we define them in our program?

First, we need to create two objects of the Cat class.

Next, we’ll define their states and behaviors.

Like the above code examples, we can define our class, instantiate it (create objects) and specify the states and behaviors for those objects.

Now, we have covered the basics of object-oriented programming. Let's move on to the principles of object-oriented programming.

Principles of object-oriented programming

These are the four main principles of the object-oriented programming paradigm. Understanding them is essential to becoming a successful programmer.

Encapsulation

Inheritance, abstraction, polymorphism.

Now let's look at each in more detail.

Encapsulation is a process of wrapping code and data together into a single unit.

It's just like a capsule that contains a mix of several medicines, and is a technique that helps keep instance variables protected.

This can be achieved by using private access modifiers that can’t be accessed by anything outside the class. In order to access private states safely, we have to provide public getter and setter methods. (In Java, these methods should follow JavaBeans naming standards.)

Let’s say there is a record shop that sells music albums of different artists and a stock keeper who manages them.

classDiagramWithoutEncapsulation

If you look at figure 4, the StockKeeper class can access the Album class’s states directly as Album class’s states are set to public .

What if the stock keeper creates an album and sets states to negative values? This can be done intentionally or unintentionally by a stock keeper.

To illustrate, let’s see a sample Java program that explains the above diagram and statement.

Album class:

StockKeeper class:

Main class:

The album’s price and number of copies can’t be negative values. How can we avoid this situation? This is where we use encapsulation.

classDiagramWithEncapsulation-1

In this scenario, we can block the stock keeper from assigning negative values. If they attempt to assign negative values for the album’s price and number of copies, we’ll assign them as 0.0 and 0.

With encapsulation, we’ve blocked our stock keeper from assigning negative values, meaning we have control over the data.

Advantages of encapsulation in Java

  • We can make a class read-only or write-only : for a read-only class, we should provide only a getter method. For a write-only class, we should provide only a setter method.
  • Control over the data: we can control the data by providing logic to setter methods, just like we restricted the stock keeper from assigning negative values in the above example.
  • Data hiding: other classes can’t access private members of a class directly.

Let’s say that the record shop we discussed above also sells Blu-ray movies.

classDiagramForMovie

As you can see in the above diagram, there are many common states and behaviors (common code) between Album and Movie .

When implementing this class diagram into code, are you going to write (or copy & paste) the entire code for Movie ? If you do, you are repeating yourself. How can you avoid code duplication?

This is where we use inheritance.

Inheritance is a mechanism in which one object acquires all the states and behaviors of a parent object.

Inheritance uses a parent-child relationship (IS-A relationship).

So what exactly is inherited?

Visibility/access modifiers impact what gets inherited from one class to another.

In Java, as a rule of thumb we make instance variables private and instance methods public .

In this case, we can safely say that the following are inherited:

  • public instance methods.
  • private instance variables (private instance variables can be accessed only through public getter and setter methods).

Types of Inheritance in Java

There are five types of inheritance in Java. They are single, multilevel, hierarchical, multiple, and hybrid.

Class allows single, multilevel and hierarchical inheritances. Interface allows multiple and hybrid inheritances.

InheritanceTypes

A class can extend only one class however it can implement any number of interfaces. An interface can extend more than one interfaces.

inheritanceKeywords

Relationships

I. IS-A relationship

An IS-A relationship refers to inheritance or implementation.

a. Generalization

Generalization uses an IS-A relationship from a specialization class to generalization class.

generalization

II. HAS-A relationship

An instance of one class HAS-A reference to an instance of another class.

a. Aggregation

In this relationship, the existence of class A and B are not dependent on each other.

For this aggregation part, we going to see an example of the Student class and the ContactInfo class.

aggregation-1

Student HAS-A ContactInfo . ContactInfo can be used in other places – for example, a company's Employee class can also use this ContactInfo class. So Student can exist without ContactInfo and ContactInfo can exist without Student . This type of relationship is known as aggregation.

b. Composition

In this relationship, class B can not exist without class A – but class A can exist without class B.

To give you an idea about composition, let's see an example of the Student class and the StudentId class.

composition--1-

Student HAS-A StudentId . Student can exist without StudentId but StudentId can not exist without Student . This type of relationship is known as composition.

Now, let’s back to our previous record shop example that we discussed above.

classDiagramWithInheritance

We can implement this diagram in Java to avoid code duplication.

Advantages of inheritance

  • Code reuse: the child class inherits all instance members of the parent class.
  • You have more flexibility to change code: changing code in place is enough.
  • You can use polymorphism: method overriding requires IS-A relationship.

Abstraction is a process of hiding the implementation details and showing only functionality to the user.

A common example of abstraction is that pressing the accelerator will increase the speed of a car. But the driver doesn’t know how pressing the accelerator increases the speed – they don't have to know that.

Technically abstract means something incomplete or to be completed later.

In Java, we can achieve abstraction in two ways: abstract class (0 to 100%) and interface (100%).

The keyword abstract can be applied to classes and methods. abstract and final or static can never be together.

I. Abstract class

An abstract class is one that contains the keyword abstract .

Abstract classes can’t be instantiated (can’t create objects of abstract classes). They can have constructors, static methods, and final methods.

II. Abstract methods

An abstract method is one that contains the keyword abstract .

An abstract method doesn’t have implementation (no method body and ends up with a semi colon). It shouldn’t be marked as private .

III. Abstract class and Abstract methods

  • If at least one abstract method exists inside a class then the whole class should be abstract.
  • We can have an abstract class with no abstract methods.
  • We can have any number of abstract as well as non-abstract methods inside an abstract class at the same time.
  • The first concrete sub class of an abstract class must provide implementation to all abstract methods.
  • If this doesn't happen, then the sub class also should be marked as abstract.

In a real world scenario, the implementation will be provided by someone who is unknown to end users. Users don’t know the implementation class and the actual implementation.

Let’s consider an example of abstract concept usage.

abstraction

When do we want to mark a class as abstract?

  • To force sub classes to implement abstract methods.
  • To stop having actual objects of that class.
  • To keep having a class reference.
  • To retain common class code.

An interface is a blueprint of a class.

An interface is 100% abstract. No constructors are allowed here. It represents an IS-A relationship.

NOTE: Interfaces only define required methods. We can not retain common code.

An interface can have only abstract methods, not concrete methods. By default, interface methods are public and abstract . So inside the interface, we don’t need to specify public and abstract .

So when a class implements an interface’s method without specifying the access level of that method, the compiler will throw an error stating “Cannot reduce the visibility of the inherited method from interface” . So that implemented method’s access level must be set to public .

By default, interface variables are public , static and final .

For instance:

Let’s see an example that explains the interface concept:

interface

Default and Static methods in Interfaces

Usually we implement interface methods in a separate class. Let’s say we are required to add a new method in an interface. Then we must implement that method in that separate class, too.

To overcome this issue Java 8 introduced default and static methods that implement methods inside an interface, unlike abstract methods.

  • Default method
  • Static method

Similar to static methods of classes, we can call them by their interface’s name.

  • Marker interface

It’s an empty interface. For instance, Serializable, Cloneable, and Remote interfaces.

Advantages of interfaces

  • They help us use multiple inheritance in Java.
  • They provide abstraction.
  • They provide loose coupling: objects are independent from one another.

When do we want to change a class to an interface?

NOTE: Remember, we can’t retain common code inside the interface.

If you want to define potentially required methods and common code, use an abstract class .

If you just want to define a required method, use an interface .

Polymorphism is the ability of an object to take on many forms.

Polymorphism in OOP occurs when a super class references a sub class object.

All Java objects are considered to be polymorphic as they share more than one IS-A relationship (at least all objects will pass the IS-A test for their own type and for the class Object).

We can access an object through a reference variable. A reference variable can be of only one type. Once declared, the type of a reference variable cannot be changed.

A reference variable can be declared as a class or interface type.

A single object can be referred to by reference variables of many different types as long as they are the same type or a super type of the object.

Method overloading

If a class has multiple methods that have same name but different parameters, this is known as method overloading.

Method overloading rules:

  • Must have a different parameter list.
  • May have different return types.
  • May have different access modifiers.
  • May throw different exceptions.

NOTE: Static methods can also be overloaded.

NOTE: We can overload the main() method but the Java Virtual Machine (JVM) calls the main() method that receives String arrays as arguments.

Rules to follow for polymorphism

Compile time rules.

  • Compiler only knows reference type.
  • It can only look in reference type for methods.
  • Outputs a method signature.

Run time rules

  • At runtime, JVM follows exact runtime type (object type) to find method.
  • Must match compile time method signature to method in actual object’s class.

Method overriding

If a subclass has the same method as declared in the super class, this is known as method overriding.

Method overriding rules:

  • Must have the same parameter list.
  • Must have the same return type: although a covariant return allows us to change the return type of the overridden method.
  • Must not have a more restrictive access modifier: may have a less restrictive access modifier.
  • Must not throw new or broader checked exceptions: may throw narrower checked exceptions and may throw any unchecked exception.
  • Only inherited methods may be overridden (must have IS-A relationship).

Example for method overriding:

NOTE: Static methods can’t be overridden because methods are overridden at run time. Static methods are associated with classes while instance methods are associated with objects. So in Java, the main() method also can’t be overridden.

NOTE: Constructors can be overloaded but not overridden.

Object types and reference types

In Person mary = new Student(); , this object creation is perfectly fine.

mary is a Person type reference variable and new Student() will create a new Student object.

mary can’t access study() in compile time because the compiler only knows the reference type. Since there is no study() in the reference type class, it can’t access it. But in runtime mary is going to be the Student type (Runtime type/ object type).

Please review this post for more information on runtime types.

In this case, we can convince the compiler by saying “at runtime, mary will be Student type, so please allow me to call it”. How can we convince the compiler like this? This is where we use casting.

We can make mary a Student type in compile time and can call study() by casting it.

We’ll learn about casting next.

Object type casting

Java type casting is classified into two types:

  • Widening casting (implicit): automatic type conversion.
  • Narrowing casting (explicit): need explicit conversion.

In primitives, long is a larger type than int . Like in objects, the parent class is a larger type than the child class.

The reference variable only refers to an object. Casting a reference variable doesn’t change the object on the heap but it labels the same object in another way by means of instance members accessibility.

I. Widening casting

II. Narrowing casting

We have to be careful when narrowing. When narrowing, we convince the compiler to compile without any error. If we convince it wrongly, we will get a run time error (usually ClassCastException ).

In order to perform narrowing correctly, we use the instanceof operator. It checks for an IS-A relationship.

As I already stated before, we must remember one important thing when creating an object using the new keyword: the reference type should be the same type or a super type of the object type.

Thank you everyone for reading. I hope this article helped you.

I strongly encourage you to read more related articles on OOP.

Checkout my original article series on Medium: Object-oriented programming principles in Java

Please feel free to let me know if you have any questions.

Dream is not that which you see while sleeping it is something that does not let you sleep. ― A P J Abdul Kalam, Wings of Fire: An Autobiography

Happy Coding!

System.out.println("Hey there, I am Thanoshan!");

If this article was helpful, share it .

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available. See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases. See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.

Lesson: Object-Oriented Programming Concepts

If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language.

What Is an Object?

An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object, introduces the concept of data encapsulation, and explains the benefits of designing your software in this manner.

What Is a Class?

A class is a blueprint or prototype from which objects are created. This section defines a class that models the state and behavior of a real-world object. It intentionally focuses on the basics, showing how even a simple class can cleanly model state and behavior.

What Is Inheritance?

Inheritance provides a powerful and natural mechanism for organizing and structuring your software. This section explains how classes inherit state and behavior from their superclasses, and explains how to derive one class from another using the simple syntax provided by the Java programming language.

What Is an Interface?

An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface. This section defines a simple interface and explains the necessary changes for any class that implements it.

What Is a Package?

A package is a namespace for organizing classes and interfaces in a logical manner. Placing your code into packages makes large software projects easier to manage. This section explains why this is useful, and introduces you to the Application Programming Interface (API) provided by the Java platform.

Questions and Exercises: Object-Oriented Programming Concepts

Use the questions and exercises presented in this section to test your understanding of objects, classes, inheritance, interfaces, and packages.

About Oracle | Contact Us | Legal Notices | Terms of Use | Your Privacy Rights

Copyright © 1995, 2022 Oracle and/or its affiliates. All rights reserved.

  • Top Courses
  • Online Degrees
  • Find your New Career
  • Join for Free

LearnQuest

Introduction to Object-Oriented Programming with Java

This course is part of Core Java Specialization

Taught in English

Some content may not be translated

Evan Bergman

Instructors: Evan Bergman +1 more

Instructors

Instructor ratings

We asked all learners to give feedback on our instructors based on the quality of their teaching style.

Financial aid available

33,467 already enrolled

Coursera Plus

(433 reviews)

Recommended experience

Beginner level

Some programming experience in any language or Course 1 in this Specialization

Skills you'll gain

  • Recursively Enumerable Set
  • Computer Programming
  • Java Programming

Details to know

java oop presentation

Add to your LinkedIn profile

See how employees at top companies are mastering in-demand skills

Placeholder

Build your subject-matter expertise

  • Learn new concepts from industry experts
  • Gain a foundational understanding of a subject or tool
  • Develop job-relevant skills with hands-on projects
  • Earn a shareable career certificate

Placeholder

Earn a career certificate

Add this credential to your LinkedIn profile, resume, or CV

Share it on social media and in your performance review

Placeholder

There are 4 modules in this course

Introduction to OO Programming with Java is course 2 of the Core Java Specialization. After completing this course, you'll be able to create simple Java classes that exhibit the principle of Encapsulation, to import other classes for use, to work with Strings, print output and use advanced math functions.

We'll begin with a brief refresher on necessary concepts from Object-Oriented Programming. Next, we'll introduce basic Java concepts regarding classes, enabling you to start writing simple Java classes with attributes and methods. We'll introduce the idea of instances, or objects created from classes, so that you can start to build object-oriented solutions. Finally, we'll cover namespaces and Java Libraries to explain how Java packages classes, so that everyone can develop code without name collisions. You will be able to organize and access classes, as well as use selected standard classes from the Java runtime environment. To be successful in this course, you should have taken Course 1: Introduction to Java or have equivalent knowledge.

Classes and Objects

In this module, we discuss why we are using Object-Oriented Programming, and introduce the concepts in Java of Classes, Objects, Attributes, and Methods. Along with that, we'll discuss some of the conventions of the JavaBeans Specification, and make use of them in our code.

What's included

11 videos 5 readings 3 quizzes 2 ungraded labs

11 videos • Total 57 minutes

  • Course Overview • 0 minutes • Preview module
  • Managing Complexity • 9 minutes
  • Code Re-use • 1 minute
  • Managing Change • 3 minutes
  • Moving to OO from Procedural • 5 minutes
  • OO Definitions • 9 minutes
  • Defining a Class • 4 minutes
  • An Example Class • 8 minutes
  • Objects • 3 minutes
  • Objects Example • 6 minutes
  • Experience the Lab Environment • 3 minutes

5 readings • Total 125 minutes

  • How many classes are defined in Java Standard Edition? • 10 minutes
  • The Bean Specification • 60 minutes
  • A Computed, Read-Only Property • 15 minutes
  • Formatting Output using PrintStream • 30 minutes
  • Importing Lab Starters and/or Solutions • 10 minutes

3 quizzes • Total 90 minutes

  • Practice Review • 30 minutes
  • Assessment • 30 minutes

2 ungraded labs • Total 60 minutes

  • Experience the Lab Environment • 15 minutes
  • Implement the Car Class (Optional) • 45 minutes

Creating Classes

In this module, we'll go into more detail on creating classes in Java, and how to organize classes into packages. We'll cover attributes (instance and class variables), methods, access modifiers, parameters, variable length argument lists, local variables, constants, constructors, overloaded methods, and more.

15 videos 2 quizzes 2 ungraded labs 1 plugin

15 videos • Total 110 minutes

  • Introduction to Packages • 4 minutes • Preview module
  • Packages and the Classpath • 7 minutes
  • Declaring a Class • 6 minutes
  • Class Anatomy • 6 minutes
  • Adding Attributes and Methods • 6 minutes
  • Method Parameters • 7 minutes
  • Method Variables • 5 minutes
  • Java Access Modifiers • 3 minutes
  • Constructors • 9 minutes
  • Creating Classes Lab Summary • 1 minute
  • Creating Classes Lab Full Walkthrough (Optional) • 15 minutes
  • Static Attributes • 4 minutes
  • Static Methods Demo • 5 minutes
  • Creating Calculator Classes Lab Summary • 3 minutes
  • Creating Calculator Classes Lab Full Walkthrough (Optional) • 23 minutes

2 quizzes • Total 60 minutes

2 ungraded labs • total 120 minutes.

  • Creating Classes • 60 minutes
  • Creating Calculator Classes • 60 minutes

1 plugin • Total 15 minutes

  • Activity: Declaring Classes and Packaging hem • 15 minutes

Using Java Objects

In this relatively short module, having discussed, in more detail, creating classes, we'll briefly turn our attention back to objects. How to create them with the "new" keyword, the difference between type and class (something we'll revisit often), and (conceptually) what happens in a JVM when we create a new object.

4 videos 2 readings 1 quiz 1 ungraded lab

4 videos • Total 47 minutes

  • Creating an Object • 8 minutes • Preview module
  • Working with Objects • 3 minutes
  • Creating Objects Lab Summary • 4 minutes
  • Creating Objects Lab Full Walkthrough (Optional) • 30 minutes

2 readings • Total 11 minutes

  • Constructor Methods under the Covers • 10 minutes
  • Representations in different JVMs • 1 minute

1 quiz • Total 30 minutes

1 ungraded lab • total 60 minutes.

  • Creating Objects • 60 minutes

Namespaces and Java Libraries

In this module, we'll look more closely at the use of Java packages. How we declare our package; the implications of being in a package; why packages are important; how we import classes from other packages; what import does for us; how we come up with our own, unique, package name by following the specified rules; how to resolve name collisions. Finally, we will concluding by looking at four specific Java classes: String, StringBuffer, StringBuilder and Math.

10 videos 3 readings 2 quizzes 1 discussion prompt 1 ungraded lab

10 videos • Total 60 minutes

  • JAR Files and Namespaces (Packages) • 6 minutes • Preview module
  • Packaging Classes • 4 minutes
  • Importing Packages • 5 minutes
  • Using Imported Classes • 4 minutes
  • The String Class • 7 minutes
  • Creating String Objects • 5 minutes
  • StringBuffer and StringBuilder • 5 minutes
  • The Math Class • 3 minutes
  • Creating Calculator Objects Lab Summary • 2 minutes
  • Creating Calculator Objects Lab Full Walkthrough (Optional) • 15 minutes

3 readings • Total 70 minutes

  • I installed my own Java, and it is later than version 8. Where did rt.jar go? • 10 minutes
  • Strings, Buffers and Builders • 30 minutes
  • Java Math Support • 30 minutes

1 discussion prompt • Total 10 minutes

  • Static Imports • 10 minutes
  • Creating Calculator Objects • 60 minutes

java oop presentation

LearnQuest is the preferred training partner to the world’s leading companies, organizations, and government agencies. Our team boasts 20+ years of experience designing, developing and delivering a full suite industry-leading technology education classes and training solutions across the globe. Our trainers, equipped with expert industry experience and an unparalleled commitment to quality, facilitate classes that are offered in various delivery formats so our clients can obtain the training they need when and where they need it.

Recommended if you're interested in Software Development

java oop presentation

Object-Oriented Hierarchies in Java

Java class library.

java oop presentation

Java Servlet Pages (JSPs)

java oop presentation

Introduction to Java Enterprise Edition (EE)

Why people choose coursera for their career.

java oop presentation

Learner reviews

Showing 3 of 433

433 reviews

Reviewed on Jul 1, 2021

I love this specialization, i found it more nutritive than other courses in which you JUST learn the syntax and how to create a functional code.

Reviewed on Jan 12, 2024

this course was amazing..teaching was also good ...it covered each and every thing of object oriented concept..

Reviewed on May 23, 2021

I learned so many new things about OOP also java this is very helpful for me

New to Software Development? Start here.

Placeholder

Open new doors with Coursera Plus

Unlimited access to 7,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions

When will i have access to the lectures and assignments.

Access to lectures and assignments depends on your type of enrollment. If you take a course in audit mode, you will be able to see most course materials for free. To access graded assignments and to earn a Certificate, you will need to purchase the Certificate experience, during or after your audit. If you don't see the audit option:

The course may not offer an audit option. You can try a Free Trial instead, or apply for Financial Aid.

The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.

What will I get if I subscribe to this Specialization?

When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile. If you only want to read and view the course content, you can audit the course for free.

What is the refund policy?

If you subscribed, you get a 7-day free trial during which you can cancel at no penalty. After that, we don’t give refunds, but you can cancel your subscription at any time. See our full refund policy Opens in a new tab .

Is financial aid available?

Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.

More questions

java oop presentation

Flipped classroom.

  • Each week, send an email to all students in the class that briefly describes activities for that week (lectures, reading, and programming assignments drawn from the book or from this booksite).
  • Students watch the lecture videos at their own pace, do the readings, and work on the programming assignments.

Self-study.

Available lectures..

Javatpoint Logo

Java Object Class

Java inheritance, java polymorphism, java abstraction, java encapsulation, java oops misc.

JavaTpoint

  • Send your Feedback to [email protected]

Help Others, Please Share

facebook

Learn Latest Tutorials

Splunk tutorial

Transact-SQL

Tumblr tutorial

Reinforcement Learning

R Programming tutorial

R Programming

RxJS tutorial

React Native

Python Design Patterns

Python Design Patterns

Python Pillow tutorial

Python Pillow

Python Turtle tutorial

Python Turtle

Keras tutorial

Preparation

Aptitude

Verbal Ability

Interview Questions

Interview Questions

Company Interview Questions

Company Questions

Trending Technologies

Artificial Intelligence

Artificial Intelligence

AWS Tutorial

Cloud Computing

Hadoop tutorial

Data Science

Angular 7 Tutorial

Machine Learning

DevOps Tutorial

B.Tech / MCA

DBMS tutorial

Data Structures

DAA tutorial

Operating System

Computer Network tutorial

Computer Network

Compiler Design tutorial

Compiler Design

Computer Organization and Architecture

Computer Organization

Discrete Mathematics Tutorial

Discrete Mathematics

Ethical Hacking

Ethical Hacking

Computer Graphics Tutorial

Computer Graphics

Software Engineering

Software Engineering

html tutorial

Web Technology

Cyber Security tutorial

Cyber Security

Automata Tutorial

C Programming

C++ tutorial

Control System

Data Mining Tutorial

Data Mining

Data Warehouse Tutorial

Data Warehouse

RSS Feed

  • Java Arrays
  • Java Strings
  • Java Collection
  • Java 8 Tutorial
  • Java Multithreading
  • Java Exception Handling
  • Java Programs
  • Java Project
  • Java Collections Interview
  • Java Interview Questions
  • Spring Boot
  • Java Tutorial

Overview of Java

  • Introduction to Java
  • The Complete History of Java Programming Language
  • C++ vs Java vs Python
  • How to Download and Install Java for 64 bit machine?
  • Setting up the environment in Java
  • How to Download and Install Eclipse on Windows?
  • JDK in Java
  • How JVM Works - JVM Architecture?
  • Differences between JDK, JRE and JVM
  • Just In Time Compiler
  • Difference between JIT and JVM in Java
  • Difference between Byte Code and Machine Code
  • How is Java platform independent?

Basics of Java

  • Java Basic Syntax
  • Java Hello World Program
  • Java Data Types
  • Primitive data type vs. Object data type in Java with Examples
  • Java Identifiers

Operators in Java

  • Java Variables
  • Scope of Variables In Java

Wrapper Classes in Java

Input/output in java.

  • How to Take Input From User in Java?
  • Scanner Class in Java
  • Java.io.BufferedReader Class in Java
  • Difference Between Scanner and BufferedReader Class in Java
  • Ways to read input from console in Java
  • System.out.println in Java
  • Difference between print() and println() in Java
  • Formatted Output in Java using printf()
  • Fast I/O in Java in Competitive Programming

Flow Control in Java

  • Decision Making in Java (if, if-else, switch, break, continue, jump)
  • Java if statement with Examples
  • Java if-else
  • Java if-else-if ladder with Examples
  • Loops in Java
  • For Loop in Java
  • Java while loop with Examples
  • Java do-while loop with Examples
  • For-each loop in Java
  • Continue Statement in Java
  • Break statement in Java
  • Usage of Break keyword in Java
  • return keyword in Java
  • Java Arithmetic Operators with Examples
  • Java Unary Operator with Examples
  • Java Assignment Operators with Examples
  • Java Relational Operators with Examples
  • Java Logical Operators with Examples
  • Java Ternary Operator with Examples
  • Bitwise Operators in Java
  • Strings in Java
  • String class in Java
  • Java.lang.String class in Java | Set 2
  • Why Java Strings are Immutable?
  • StringBuffer class in Java
  • StringBuilder Class in Java with Examples
  • String vs StringBuilder vs StringBuffer in Java
  • StringTokenizer Class in Java
  • StringTokenizer Methods in Java with Examples | Set 2
  • StringJoiner Class in Java
  • Arrays in Java
  • Arrays class in Java
  • Multidimensional Arrays in Java
  • Different Ways To Declare And Initialize 2-D Array in Java
  • Jagged Array in Java
  • Final Arrays in Java
  • Reflection Array Class in Java
  • util.Arrays vs reflect.Array in Java with Examples

OOPS in Java

Object oriented programming (oops) concept in java.

  • Why Java is not a purely Object-Oriented Language?
  • Classes and Objects in Java
  • Naming Conventions in Java
  • Java Methods

Access Modifiers in Java

  • Java Constructors
  • Four Main Object Oriented Programming Concepts of Java

Inheritance in Java

Abstraction in java, encapsulation in java, polymorphism in java, interfaces in java.

  • 'this' reference in Java
  • Inheritance and Constructors in Java
  • Java and Multiple Inheritance
  • Interfaces and Inheritance in Java
  • Association, Composition and Aggregation in Java
  • Comparison of Inheritance in C++ and Java
  • abstract keyword in java
  • Abstract Class in Java
  • Difference between Abstract Class and Interface in Java
  • Control Abstraction in Java with Examples
  • Difference Between Data Hiding and Abstraction in Java
  • Difference between Abstraction and Encapsulation in Java with Examples
  • Difference between Inheritance and Polymorphism
  • Dynamic Method Dispatch or Runtime Polymorphism in Java
  • Difference between Compile-time and Run-time Polymorphism in Java

Constructors in Java

  • Copy Constructor in Java
  • Constructor Overloading in Java
  • Constructor Chaining In Java with Examples
  • Private Constructors and Singleton Classes in Java

Methods in Java

  • Static methods vs Instance methods in Java
  • Abstract Method in Java with Examples
  • Overriding in Java
  • Method Overloading in Java
  • Difference Between Method Overloading and Method Overriding in Java
  • Differences between Interface and Class in Java
  • Functional Interfaces in Java
  • Nested Interface in Java
  • Marker interface in Java
  • Comparator Interface in Java with Examples
  • Need of Wrapper Classes in Java
  • Different Ways to Create the Instances of Wrapper Classes in Java
  • Character Class in Java
  • Java.Lang.Byte class in Java
  • Java.Lang.Short class in Java
  • Java.lang.Integer class in Java
  • Java.Lang.Long class in Java
  • Java.Lang.Float class in Java
  • Java.Lang.Double Class in Java
  • Java.lang.Boolean Class in Java
  • Autoboxing and Unboxing in Java
  • Type conversion in Java with Examples

Keywords in Java

  • Java Keywords
  • Important Keywords in Java
  • Super Keyword in Java
  • final Keyword in Java
  • static Keyword in Java
  • enum in Java
  • transient keyword in Java
  • volatile Keyword in Java
  • final, finally and finalize in Java
  • Public vs Protected vs Package vs Private Access Modifier in Java
  • Access and Non Access Modifiers in Java

Memory Allocation in Java

  • Java Memory Management
  • How are Java objects stored in memory?
  • Stack vs Heap Memory Allocation
  • How many types of memory areas are allocated by JVM?
  • Garbage Collection in Java
  • Types of JVM Garbage Collectors in Java with implementation details
  • Memory leaks in Java
  • Java Virtual Machine (JVM) Stack Area

Classes of Java

  • Understanding Classes and Objects in Java
  • Singleton Method Design Pattern in Java
  • Object Class in Java
  • Inner Class in Java
  • Throwable Class in Java with Examples

Packages in Java

  • Packages In Java
  • How to Create a Package in Java?
  • Java.util Package in Java
  • Java.lang package in Java
  • Java.io Package in Java
  • Java Collection Tutorial

Exception Handling in Java

  • Exceptions in Java
  • Types of Exception in Java with Examples
  • Checked vs Unchecked Exceptions in Java
  • Java Try Catch Block
  • Flow control in try catch finally in Java
  • throw and throws in Java
  • User-defined Custom Exception in Java
  • Chained Exceptions in Java
  • Null Pointer Exception In Java
  • Exception Handling with Method Overriding in Java
  • Multithreading in Java
  • Lifecycle and States of a Thread in Java
  • Java Thread Priority in Multithreading
  • Main thread in Java
  • Java.lang.Thread Class in Java
  • Runnable interface in Java
  • Naming a thread and fetching name of current thread in Java
  • What does start() function do in multithreading in Java?
  • Difference between Thread.start() and Thread.run() in Java
  • Thread.sleep() Method in Java With Examples
  • Synchronization in Java
  • Importance of Thread Synchronization in Java
  • Method and Block Synchronization in Java
  • Lock framework vs Thread synchronization in Java
  • Difference Between Atomic, Volatile and Synchronized in Java
  • Deadlock in Java Multithreading
  • Deadlock Prevention And Avoidance
  • Difference Between Lock and Monitor in Java Concurrency
  • Reentrant Lock in Java

File Handling in Java

  • Java.io.File Class in Java
  • Java Program to Create a New File
  • Different ways of Reading a text file in Java
  • Java Program to Write into a File
  • Delete a File Using Java
  • File Permissions in Java
  • FileWriter Class in Java
  • Java.io.FileDescriptor in Java
  • Java.io.RandomAccessFile Class Method | Set 1
  • Regular Expressions in Java
  • Regex Tutorial - How to write Regular Expressions?
  • Matcher pattern() method in Java with Examples
  • Pattern pattern() method in Java with Examples
  • Quantifiers in Java
  • java.lang.Character class methods | Set 1
  • Java IO : Input-output in Java with Examples
  • Java.io.Reader class in Java
  • Java.io.Writer Class in Java
  • Java.io.FileInputStream Class in Java
  • FileOutputStream in Java
  • Java.io.BufferedOutputStream class in Java
  • Java Networking
  • TCP/IP Model
  • User Datagram Protocol (UDP)
  • Differences between IPv4 and IPv6
  • Difference between Connection-oriented and Connection-less Services
  • Socket Programming in Java
  • java.net.ServerSocket Class in Java
  • URL Class in Java with Examples

JDBC - Java Database Connectivity

  • Introduction to JDBC (Java Database Connectivity)
  • JDBC Drivers
  • Establishing JDBC Connection in Java
  • Types of Statements in JDBC
  • JDBC Tutorial
  • Java 8 Features - Complete Tutorial

As the name suggests, Object-Oriented Programming or OOPs refers to languages that use objects in programming, they use objects as a primary source to implement what is to happen in the code. Objects are seen by the viewer or user, performing tasks assigned by you. Object-oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism etc. in programming. The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function. 

OOPS COncepts in Java

Let us discuss prerequisites by polishing concepts of method declaration and message passing. Starting off with the method declaration, it consists of six components: 

  • public: Accessible in all classes in your application.
  • protected: Accessible within the package in which it is defined and in its subclass(es) (including subclasses declared outside the package) .
  • private: Accessible only within the class in which it is defined.
  • default (declared/defined without using any modifier): Accessible within the same class and package within which its class is defined.
  • The return type : The data type of the value returned by the method or void if it does not return a value.
  • Method Name : The rules for field names apply to method names as well, but the convention is a little different.
  • Parameter list : Comma-separated list of the input parameters that are defined, preceded by their data type, within the enclosed parentheses. If there are no parameters, you must use empty parentheses ().
  • Exception list : The exceptions you expect the method to throw. You can specify these exception(s).
  • Method body : It is the block of code, enclosed between braces, that you need to execute to perform your intended operations.

Message Passing : Objects communicate with one another by sending and receiving information to each other. A message for an object is a request for execution of a procedure and therefore will invoke a function in the receiving object that generates the desired results. Message passing involves specifying the name of the object, the name of the function and the information to be sent.

Master OOP in Java Write cleaner, more modular, and reusable Java code by building a foundation in object-oriented programming with Educative’s interactive course Learn Object-Oriented Programming in Java . Sign up at Educative.io with the code GEEKS10 to save 10% on your subscription.

Now that we have covered the basic prerequisites, we will move on to the 4 pillars of OOPs which are as follows. But, let us start by learning about the different characteristics of an Object-Oriented Programming Language.

OOPS concepts are as follows: 

  • Object 
  • Method and method passing
  • Abstraction
  • Encapsulation
  • Inheritance
  • Compile-time polymorphism
  • Runtime polymorphism

java oop presentation

A class is a user-defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type. Using classes, you can create multiple objects with the same behavior instead of writing their code multiple times. This includes classes for objects occurring more than once in your code. In general, class declarations can include these components in order: 

  • Modifiers : A class can be public or have default access (Refer to this for details).
  • Class name: The class name should begin with the initial letter capitalized by convention.
  • Superclass (if any): The name of the class’s parent (superclass), if any, preceded by the keyword extends. A class can only extend (subclass) one parent.
  • Interfaces (if any): A comma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface.
  • Body: The class body is surrounded by braces, { }.

An object is a basic unit of Object-Oriented Programming that represents real-life entities. A typical Java program creates many objects, which as you know, interact by invoking methods. The objects are what perform your code, they are the part of your code visible to the viewer/user. An object mainly consists of: 

  • State : It is represented by the attributes of an object. It also reflects the properties of an object.
  • Behavior : It is represented by the methods of an object. It also reflects the response of an object to other objects.
  • Identity : It is a unique name given to an object that enables it to interact with other objects.
  • Method : A method is a collection of statements that perform some specific task and return the result to the caller. A method can perform some specific task without returning anything. Methods allow us to reuse the code without retyping it, which is why they are considered time savers . In Java, every method must be part of some class, which is different from languages like C, C++, and Python. 

  class and objects one simple java program :    

Let us now discuss the 4 pillars of OOPs:

Pillar 1: Abstraction

Data Abstraction is the property by virtue of which only the essential details are displayed to the user. The trivial or non-essential units are not displayed to the user. Ex: A car is viewed as a car rather than its individual components. Data Abstraction may also be defined as the process of identifying only the required characteristics of an object, ignoring the irrelevant details. The properties and behaviors of an object differentiate it from other objects of similar type and also help in classifying/grouping the object.

Consider a real-life example of a man driving a car. The man only knows that pressing the accelerators will increase the car speed or applying brakes will stop the car, but he does not know how on pressing the accelerator, the speed is actually increasing. He does not know about the inner mechanism of the car or the implementation of the accelerators, brakes etc. in the car. This is what abstraction is. 

In Java, abstraction is achieved by interfaces and abstract classes . We can achieve 100% abstraction using interfaces.

The abstract method contains only method declaration but not implementation.

Demonstration of Abstract class 

Pillar 2: Encapsulation

It is defined as the wrapping up of data under a single unit. It is the mechanism that binds together the code and the data it manipulates. Another way to think about encapsulation is that it is a protective shield that prevents the data from being accessed by the code outside this shield. 

  • Technically, in encapsulation, the variables or the data in a class is hidden from any other class and can be accessed only through any member function of the class in which they are declared.
  • In encapsulation, the data in a class is hidden from other classes, which is similar to what data-hiding does. So, the terms “encapsulation” and “data-hiding” are used interchangeably.
  • Encapsulation can be achieved by declaring all the variables in a class as private and writing public methods in the class to set and get the values of the variables.

Demonstration of Encapsulation:

Pillar 3: Inheritance  

Inheritance is an important pillar of OOP (Object Oriented Programming). It is the mechanism in Java by which one class is allowed to inherit the features (fields and methods) of another class. We are achieving inheritance by using extends keyword. Inheritance is also known as “ is-a ” relationship.

Let us discuss some frequently used important terminologies:

  • Superclass: The class whose features are inherited is known as superclass (also known as base or parent class).
  • Subclass: The class that inherits the other class is known as subclass (also known as derived or extended or child class). The subclass can add its own fields and methods in addition to the superclass fields and methods.
  • Reusability: Inheritance supports the concept of “reusability”, i.e. when we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the existing class. By doing this, we are reusing the fields and methods of the existing class.

Demonstration of Inheritance :

Pillar 4: Polymorphism

It refers to the ability of object-oriented programming languages to differentiate between entities with the same name efficiently. This is done by Java with the help of the signature and declaration of these entities. The ability to appear in many forms is called polymorphism .

Note: Polymorphism in Java is mainly of 2 types:  Overloading Overriding 

Please Login to comment...

Similar reads.

  • java-basics
  • Java-Object Oriented
  • CBSE Exam Format Changed for Class 11-12: Focus On Concept Application Questions
  • 10 Best Waze Alternatives in 2024 (Free)
  • 10 Best Squarespace Alternatives in 2024 (Free)
  • Top 10 Owler Alternatives & Competitors in 2024
  • 30 OOPs Interview Questions and Answers (2024)

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

Java Tutorial

Java methods, java classes, java file handling, java how to, java reference, java examples, java - what is oop.

OOP stands for Object-Oriented Programming .

Procedural programming is about writing procedures or methods that perform operations on the data, while object-oriented programming is about creating objects that contain both data and methods.

Object-oriented programming has several advantages over procedural programming:

  • OOP is faster and easier to execute
  • OOP provides a clear structure for the programs
  • OOP helps to keep the Java code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug
  • OOP makes it possible to create full reusable applications with less code and shorter development time

Tip: The "Don't Repeat Yourself" (DRY) principle is about reducing the repetition of code. You should extract out the codes that are common for the application, and place them at a single place and reuse them instead of repeating it.

Java - What are Classes and Objects?

Classes and objects are the two main aspects of object-oriented programming.

Look at the following illustration to see the difference between class and objects:

Another example:

So, a class is a template for objects, and an object is an instance of a class.

When the individual objects are created, they inherit all the variables and methods from the class.

You will learn much more about classes and objects in the next chapter.

Get Certified

COLOR PICKER

colorpicker

Report Error

If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:

[email protected]

Top Tutorials

Top references, top examples, get certified.

PowerShow.com - The best place to view and share online presentations

  • Preferences

Free template

Java Oop PowerPoint PPT Presentations

Java Programming for Beginners to Java Object Oriented Programming : Unleashing the Power of Java PowerPoint PPT Presentation

welcome to ducat india

Oops concept in Java

Nov 24, 2021

50 likes | 72 Views

Object-Oriented Programming (OOP) uses u201cobjectsu201d to model realworld objects. Object- oriented Programming (OOP) consist of some important concepts namely Encapsulation, Polymorphism, Inheritance and Abstraction. These features are generally referred to as the OOPS concepts. OOPs

Share Presentation

Ducat1

Presentation Transcript

Welcome to Ducat India Apply Now Language | Industrial Training | Digital Marketing | Web Technology | Testing+ | Database | Networking | Mobile Application | ERP | Graphic | Big Data | Cloud Computing Call us: 70-70-90-50-90 www.ducatinida.com

Oops concept in Java Object-Oriented Programming (OOP) uses “objects” to model realworld objects. Object- oriented Programming (OOP) consist of some important concepts namely Encapsulation, Polymorphism, Inheritance and Abstraction. These features are generally referred to as the OOPS concepts. OOPs Object-Oriented Programming is a concept to design a program using object and classes. An object in OOP has some state and behavior. In Java, the state is the set of values of an object’s variables at any particular time and the behaviour of an object is implemented as methods. Class can be considered as the blueprint or a template for an object and describes the properties and behavior of that object, but without any actual existence. An object is a particular instance of a class which has actual existence and there can be many objects (or instances) for a class. Static variables and methods are not purely object oriented because they are not specific to instances (objects) but common to all instances.

Classes • Acting as blueprints of a Java program, classes are templates that describe the characteristics of an element or method. They are generic elements in Java programming. They also help a programmer to understand the coding system of another programmer, making its structure clear. Classes exist in the program as long as they desire, meaning they do not have a lifespan. • The following is a list of possible class variables: • Class • A class is a variable that needs to be declared before it enters a class, which can be found within any class and outside any method. • Instance • Instance is a variable that remains within a particular class but is outside a method. However, it is accessible from any other way once declared. • Local • A local is a variable that is defined inside any method in the program and requires initial declaration and acknowledgement. It is omitted after it has executed the command or function.

Objects • Java objects are elements that possess behaviours and states. When parts are defined, they come with their features that further adds value to a program component without having to include an extensive element. These are what you call instances of classes. Because of the behaviours and states of objects, methods are executed successfully. Furthermore, a particular item is associated with a unique function or command so that it will adhere to specific instructions. In contrast with a class, an object ceases to exist once the program has been executed. • One of the characteristics of object-oriented programming is organizing things and concepts. Three object relationships define why elements should or should not be moved to another particular program component: • Is-a Relationship – this means that a type of object is more specific than its fellows (number 1 is a number) • Has-a relationship – this means that a variety of object contains or is associated with another object (given number 1 and number 2: number 1 has a succeeding number, number 2) • Uses-a relationship – this means that a type of object will be using another object as a program progresses (given number 1, number 2 and number 3: • number 1 uses a number 2 to arrive at the sum of number 3) • It is essential to know how to work around with classes and objects when programming using the Java language since they are considered as the generic elements of the software. We also learned how they are organized and their existing relationships with one another.

Thank You!! Call us: 70-70-90-50-90 www.ducatinida.com

  • More by User

Oops forgot one.

Oops forgot one.

Hypnotic Agents. A dose-related, generalized depression (more than seen with anti-anxiety sedative drugs) of the CNS that produces drowsiness and induces sleepOften an increase in the dosage of a sedative agent will produce hypnotic activityIdeal hypnotic agent would produce drowsiness and facilit

388 views • 22 slides

OOPs

OOPs. Object oriented programming. Abstract data types. Representationof type and operations in a single unit Available for other units to create variables of the type Possibility of hiding data structure of type and implementation of operations. Limitations of ADT and OOP extensions.

531 views • 21 slides

Oops Risk Management

Oops Risk Management

275 views • 15 slides

OOPS Test

OOPS Test. Ormrod’s Introduction to Educational Psychology Concepts and Content. DIRECTIONS: Read each statement; then decide if each statement is true or false. Mark your response on a sheet of paper. .

461 views • 21 slides

OOPS!

OOPS!. Reconstruction (1865-1877). Key Questions. 1. How do we bring the South back into the Union?. 4. To what extend Was reconstruction successful?. 2. How do we rebuild the South after its destruction during the war?.

247 views • 6 slides

Concepts of oops….

Concepts of oops….

Concepts of oops…. Objects. Object is the basic unit of object-oriented programming. Objects are identified by its unique name. An object represents a particular instance of a class. There can be more than one instance of a class. Each instance of a class can hold its own relevant data.

595 views • 10 slides

Oops….

Oops…. [email protected] [email protected] andrian [email protected] MSR ’ 13. Inevitable, due to the complexity &novelty of our work. (But rarely reported, which is…. suspicious) What can we learn from those mistakes?.

736 views • 14 slides

OOPS!

OOPS!. An Unconventional approach to MIT Opencourseware. 2002 年 9 月 30 日上線 目前已經公布 903 門課程 鼓勵非商業性的引用、轉載、改寫、翻譯 預計在五年內公開全校所有的 2000 門課程 因分享知識的開創性而被譽為教育界的大霹靂,已有超過兩千萬人次上線 由 MIT 、 Andrew W. Mellon 基金會、 William 與 Flora Hewlett 基金會贊助. MIT Opencourseware. 33 categories, over 900 courses

325 views • 17 slides

oops

What animal is it?. snake. oops. tortoise. great. rabbit. oops. next. What animal is it?. ant. oops. fish. oops. lizard. great. next. What animal is it?. canary. oops. stick insect. great. snail. oops. next. What animal is it?. guinea pig. oops. ant. great. lizard.

294 views • 9 slides

Oops She’s Delivering!

Oops She’s Delivering!

Oops She’s Delivering!. OB Workshop Module. Peter Hutten-Czapski MD President SRPC ‘00-02. Oops She’s Delivering.

692 views • 46 slides

Java OO Concept

Java OO Concept

Java OO Concept. Chate Patanothai. Java: call by value. Method parameters are copied in the parameter variables when a method starts. Any changes to the parameter variables do not affect the original variables. True in all cases; primitives and references. Java: call by value.

436 views • 28 slides

OOPs

OOPs. Object oriented programming. Based on ADT principles. Representation of type and operations in a single unit Available for other units to create variables of the type Possibility of hiding data structure of type and implementation of operations. Limitations of ADT --> OOP extensions.

460 views • 25 slides

OOPS CONCEPT

OOPS CONCEPT

OOPS CONCEPT. BY- RAJNI KARDAM PGT(Comp. Science) GROUP(1). OOPS. Object Oriented Programming Structure. PROCEDURAL Vs OOP PROGRAMMING. OBJECT. Object is an identifiable entity with some characteristics and behaviour. CLASS.

7.73k views • 13 slides

OOPS!!!!

ST R G TE. Teal ’ c zachránce- 1. část. SG1. Doufám že víte, co se vám může přihodit. Pokud se nevrátíte do dvou dní, pošlu za vámi SG2. Sbohem. Generál Hammond se loučí s SG1, kteří odcházejí na neznámou planetu. Teal ’ cu.Vnikli sem vetřelci. Vem si své muže a zab je. Ano, můj pane.

78 views • 1 slides

OOPS - concepts in php

OOPS - concepts in php

Object Oriented Programming (OOP) is the programming method that involves the use of the data , structure and organize classes of an application. The data structure becomes an objects that includes both functions and data.

640 views • 44 slides

Java and oops

Java and oops

Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented,and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA)

378 views • 18 slides

Object-oriented programming (OOPs) concept in Java

Object-oriented programming (OOPs) concept in Java

Object-oriented programming (OOPs) concept in Java Object-oriented programming: as the name implies, Object-Oriented Programming or OOPs refers to languages that use objects in programming. Object-oriented programming aims to real-world entities, such as inheritance, to hide, to implement polymorphism, etc. in the programming. The main goal of OOP is that data and functions that operate on them, so that no other part of the code to access this data except this feature.

70 views • 3 slides

Oscar oops moments

Oscar oops moments

Here are all those moments where the thing that happens was not supposed to happen at that time.

52 views • 4 slides

Python Oops Concept

Python Oops Concept

Learn each important topic - classes, object, inheritance, abstraction and more with proper examples of the Python Oops Concept at UMED Academy and start your object oriented journey step-by-step. for more informationu2019s you can visit our website http://www.umedacademy.com/, mail [email protected] & call 91 8338000667.

192 views • 9 slides

Java OOPs Tutorial For Beginners | Java Object Oriented Programming | Java OOPs Basics | Simplilearn

Java OOPs Tutorial For Beginners | Java Object Oriented Programming | Java OOPs Basics | Simplilearn

This presentation on Java OOPs will give an introduction to Java Object-Oriented Programming. This video explains how to create and use OOP concepts. Whether you are an experienced programmer or not, this channel is intended for everyone who wishes to learn Java programming. You will also learn about all the OOP concepts: Abstraction, Encapsulation, Polymorphism, and Inheritance. And, at the end of all concepts, you will see an interesting program so that you will have in-depth knowledge of of oops concepts in Java. Below topics are explained in this Java programming presentation: 1. Java OOP concepts 2. Abstraction 3. Encapsulation 4. Polymorphism 5. Inheritance About Simplilearn Java certification training course: If youu2019re looking to master web application development for virtually any computing platform, this Java Certification Training course is for you. This all-in-one Java training will give you a firm foundation in Java, the most commonly used programming language in software development. This advanced Java Certification Training course is designed to guide you through the concepts of Java from introductory techniques to advanced programming skills. The course will provide you with the knowledge of Core Java 8, operators, arrays, loops, methods, and constructors while giving you hands-on experience in JDBC and JUnit framework. Java Certification Course Key Features: 1. 70 hours of blended training 2. Hands-on coding and implementation of two web-based projects 3. Includes Hibernate and Spring frameworks 4. 35 coding-related exercises on Core Java 8 5. Lifetime access to self-paced learning 6. Flexibility to choose classes Eligibility: Simplilearnu2019s Java Certification Training course is ideal for software developers, web designers, programming enthusiasts, engineering graduates, and students or professionals who wish to become Java developers. Pre-requisites: Prior knowledge of Core Java is a prerequisite to taking this advanced Java Certification training course. Our Core Java online self-paced course is available for free to become familiar with the basics of Java programming. Learn more at https://www.simplilearn.com/mobile-and-software-development/java-javaee-soa-development-training

253 views • 21 slides

tinder oops

tinder oops

Learn how to fix Tinder's error u201cOops something went wrongu201c. It is one of the most popular platforms on the internet. Itu2019s quite a long time from now that people are experiencing little issues with login. Especially those who signed up for Tinder with their Facebook profile or ID. But most users having the same issue even when they trying logging in with their phone numbers.

102 views • 4 slides

IMAGES

  1. Basic concepts of OOP- Java/C++

    java oop presentation

  2. PPT

    java oop presentation

  3. Object-Oriented Programming

    java oop presentation

  4. Java OOP

    java oop presentation

  5. GitHub

    java oop presentation

  6. PPT

    java oop presentation

VIDEO

  1. OOP

  2. OOP For JAVA // Lec03

  3. FREE Download

  4. IBDP CS OOP Java Class 1 (Part 3

  5. Lecture 5 JAVA OOP

  6. Case study2 OOP Presentation

COMMENTS

  1. Object Oriented Programming_combined.ppt

    Introduction to OOP. Building Blocks of OOP: Objects & Classes. Object: models a. Real world object (ex. computer, book, box) Concept (ex. meeting, interview) Process (ex. sorting a stack of papers or comparing two computers to measure their performance) . Class: prototype or blueprint from which objects are created. Introduction to OOP.

  2. Object-Oriented-Programming Concepts in Java

    In this article, we'll look into Object-Oriented Programming (OOP) concepts in Java. We'll discuss classes, objects, abstraction, encapsulation, inheritance, and polymorphism. 2. Classes. Classes are the starting point of all objects, and we may consider them as the template for creating objects. A class would typically contain member ...

  3. Lecture 4: Classes and Objects

    Lecture presentation on programming in Java. Topics include: object oriented programming, defining classes, using classes, constructors, methods, accessing fields, primitives versus references, references versus values, and static types and methods.

  4. PDF 03-Object-oriented programming in java

    An object is a bundle of state and behavior. State -the data contained in the object. In Java, these are the fields of the object. Behavior -the actions supported by the object. In Java, these are called methods. Method is just OO-speak for function. Invoke a method = call a function.

  5. Object-Oriented Programming in Java

    Object-oriented programming (OOP) is a fundamental programming paradigm based on the concept of " objects ". These objects can contain data in the form of fields (often known as attributes or properties) and code in the form of procedures (often known as methods). The core concept of the object-oriented approach is to break complex problems ...

  6. Mastering Java OOP: A Full Guide

    Introduction to Object-Oriented Programming. At the heart of Java's design philosophy is Object-Oriented Programming. OOP is a paradigm that uses "objects" — entities that combine data and ...

  7. Object-Oriented Programming Principles in Java: OOP Concepts for Beginners

    Fundamentals of object-oriented programming. Object-oriented programming is a programming paradigm where everything is represented as an object. Objects pass messages to each other. Each object decides what to do with a received message. OOP focuses on each object's states and behaviors.

  8. Lesson: Object-Oriented Programming Concepts (The Java ...

    Lesson: Object-Oriented Programming Concepts. If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the ...

  9. Introduction to Object-Oriented Programming with Java

    There are 4 modules in this course. Introduction to OO Programming with Java is course 2 of the Core Java Specialization. After completing this course, you'll be able to create simple Java classes that exhibit the principle of Encapsulation, to import other classes for use, to work with Strings, print output and use advanced math functions.

  10. Lectures

    Our examples involve abstractions such as color, images, and genes. This style of programming is known as object-oriented programming because our programs manipulate objects, which hold data type values. Lecture 9: Creating Data Types. Creating your own data types is the central activity in modern Java programming.

  11. Java OOPs Concepts

    OOPs (Object-Oriented Programming System) Object means a real-world entity such as a pen, chair, table, computer, watch, etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies software development and maintenance by providing some concepts: Object. Class.

  12. Object Oriented Programming (OOPs) Concept in Java

    Master OOP in Java Write cleaner, more modular, and reusable Java code by building a foundation in object-oriented programming with Educative's interactive course Learn Object-Oriented Programming in Java.Sign up at Educative.io with the code GEEKS10 to save 10% on your subscription.. Now that we have covered the basic prerequisites, we will move on to the 4 pillars of OOPs which are as follows.

  13. Java OOP (Object-Oriented Programming)

    Object-oriented programming has several advantages over procedural programming: OOP is faster and easier to execute. OOP provides a clear structure for the programs. OOP helps to keep the Java code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug. OOP makes it possible to create full reusable applications ...

  14. Object-Oriented Programming (OOP) Using Java

    Object Oriented Programming. Object Oriented Programming. Chapter 2 introduces Object Oriented Programming. OOP is a relatively new approach to programming which supports the creation of new data types and operations to manipulate those types. This presentation introduces OOP. Data Structures and Other Objects. 574 views • 39 slides

  15. Oops Concept In Java

    An object in object oriented programming can be physical or conceptual. Conceptual objects are entities that are not tangible in the way real-world physical objects are. Bulb is a physical object. While college is a conceptual object. Conceptual objects may not have a real world equivalent. For instance, a Stack object in a program.

  16. OOPS Concept in JAVA

    In this page, we will learn about basics of OOPs. Object Oriented Programming is a paradigm that. provides many concepts such as inheritance, data. binding, polymorphism etc. 3. OOPS CONSEPTS. Object means a real word entity such as pen, chair, table etc. Object-Oriented Programming is. a methodology or paradigm to design a program.

  17. PDF Object-Oriented Concepts Presentation Topics

    of Object-Oriented Programming (OOP) which needs refreshing. Most topics have a number of questions which should be dealt with in your presentation, but your presentation should not be confined by these questions. 1 Memory Management • Whose responsibility is memory management in C++, Java and C# (the programmer's or the run-time environment)?

  18. 1,833 Java Oop PPTs View free & download

    Object Oriented Programming (OOPs) Concept in Java - In this presentation, I discussed the object-oriented features of Java. As the name suggests, Object-Oriented Programming or OOPs refers to languages that use objects in programming.

  19. PPT

    This presentation on Java OOPs will give an introduction to Java Object-Oriented Programming. This video explains how to create and use OOP concepts. Whether you are an experienced programmer or not, this channel is intended for everyone who wishes to learn Java programming. You will also learn about all the OOP concepts: Abstraction ...