You are on page 1of 14

Amity School of Engineering & Technology

Amity School of Engineering & Technology


B.Tech(ECE), Semester 2
JAVA Programming
Mr. G.L Saini

1
Text/ Reference Books
Amity School of Engineering & Technology

 Patrick Naughton & Herbert Schild “Java the


complete Reference” Tata Mc-Graw Hill, 7th
edition.

 C Xavier “Java Programming A practical


approach” Tata Mc-Graw Hill

 Kathy Siera & Bert Bates, O’Reilly Media “Head


First Java” 2nd edition.
Websites
Amity School of Engineering & Technology

 http://www.roseindia.net/java/

 http://java.sun.com/j2se/

 http://www.java2s.com/
What is Programming?Amity School of Engineering & Technology

 Program
These are the set of instructions directing the
computer to do some action
 programming languages
Languages for specifying sequences of directions to a
computer
 Software:
It is the logical part of computer system, which is
made up by several programs. In short, It is set
of Programs.
History of JAVA
Amity School of Engineering & Technology

C++
C Java

Java is related to C++, which is direct descendent of C

From C, Java derives its syntax

Many of Java’s object-oriented features were


influenced by C++
5
History of JAVA cont… Amity School of Engineering & Technology

James Gosling and Sun Microsystems


Oak
Java, May 20, 1995, Sun World
HotJava
The first Java-enabled Web browser

JDK Evolutions
J2SE, J2ME, and J2EE (not mentioned in the
book, but could discuss here optionally)
OOP Definition
Amity School of Engineering & Technology

OOP is a programming methodology that helps


to organize a complex programs through the
use of inheritance, encapsulation and
polymorphism
To access the class, we need an instance which
can create an logical interface in between class
& user (through main function). Such instance
is termed as Object. That why this new
paradigm is termed as Object Oriented
Programming Paradigm
7
12/09/21
Why OOP? Amity School of Engineering & Technology

OOP increasing the flexibility in coding


without disturbing the other part of the code

OOP increasing the software development


speed by reusing & enhancing the existing code

Its reducing the translation burden (from a


real-world representation to the computer-world
representation) for the programmer
What is Object Oriented
Amity School of Engineering & Technology

Programming?
• Identifying objects and
assigning responsibilities to
these objects.
• Objects communicate to
An object is like a
other objects by sending
black box.
messages.
The internal • Messages are received by
details are
the methods of an object
hidden.

9
What is anAmity
object?
School of Engineering & Technology

• Everything in the world is an object.


• For example-

• Real world objects share two characteristics: They all have


state(attributes) and behavior (action). Dogs have state(name, color
etc) and behavior (barking, wagging tails etc).
What is an object? Cont...
Amity School of Engineering & Technology

• Tangible Things as a car, printer, ...


• Roles as employee, boss, ...
• Incidents as flight, overflow, ...
• Interactions as contract, sale, ...
• Specifications as colour, shape, …

11
So, what are objects?
Amity School of Engineering & Technology

• an object represents an individual,


identifiable item, unit, or entity, either real
or abstract, with a well-defined role in the
problem domain.
Or
• An "object" is anything to which a concept
applies.
Etc.
12
Why do we care about objects?
Amity School of Engineering & Technology

• Modularity - large software projects


can be split up in smaller pieces.
• Reusability - Programs can be
assembled from pre-written software
components.
• Extensibility - New software
components can be written or
developed from existing ones.
13
Amity School of Engineering & Technology

THANK YOU FOR YOUR


ATTENTION

You might also like