Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Java Module 1

Rating
-
Sold
-
Pages
5
Grade
B
Uploaded on
19-11-2024
Written in
2024/2025

Java is simple and powerful

Institution
Course

Content preview

UNIT I
OBJECT-ORIENTED PROGRAMMING
Object-Oriented Programming or OOPs refers to languages that uses objects in programming. 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. 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
 Inheritance
 Polymorphism
 Abstraction
 Encapsulation

Object Oriented Programming popularly known as OOP, is used in a modern programming language
like Java

CORE OOPS CONCEPTS (PRINCIPLES OF OBJECT ORIENTATION-CLASS)

1) Class

The class is a group of similar entities. It is only a logical component and not the physical entity. For
example, if you had a class called “Expensive Cars” it could have objects like Mercedes, BMW,
Toyota, etc. Its properties (data) can be price or speed of these cars. While the methods may be
performed with these cars are driving, reverse, braking etc.

2) Object

An object can be defined as an instance of a class, and there can be multiple instances of a class in a
program. An Object contains both the data and the function, which operates on the data. For example
- chair, bike, marker, pen, table, car, etc.

An object consists of:
1. State : It is represented by attributes of an object. It also reflects the properties of an object.
1
Page

, 2. Behavior : It is represented by methods of an object. It also reflects the response of an object
with other objects.
3. Identity : It gives a unique name to an object and enables one object to interact with other
objects.

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:

CLASS
Fruit
OBJECTS
Apple
Banana
Mango

3) Inheritance

Inheritance is an OOPS concept in which one object acquires the properties and behaviors of the parent
object. It’s creating a parent-child relationship between two classes. It offers robust and natural
mechanism for organizing and structure of any software.




4) Polymorphism
Polymorphism refers to the ability of a variable, object or function to take on multiple forms. For
example, in English, the verb run has a different meaning if you use it with a laptop, a foot race,
and business. Here, we understand the meaning of run based on the other words used along with it.
The same also applied to Polymorphism.
2 Page

Written for

Institution
Course

Document information

Uploaded on
November 19, 2024
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
aminazida04

Get to know the seller

Seller avatar
aminazida04 Sias
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions