Sie sind auf Seite 1von 19

BITS Pilani

BITS Pilani
Hyderabad Campus

Ms. Prafulla Kalapatapu


Computer Science & Information Systems Group
BITS-Pilani Hyderabad Campus
prafulla@hyderabad.bits-pilani.ac.in

BITS Pilani
Hyderabad Campus

Object Oriented Programming


Summer term Semester 2015

Todays Agenda

Course Assessment

Course Reference

Overview

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Course Assessment

Evaluation
Component
Test-1
Test-2
Lab
Comprehensive

Mode
Closed Book
Closed Book
Open Book
Open+Closed
Book

Weightage
20%
20%
20%
40%

Chamber Consultation hours


Chamber : B204
Tuesday : 4:00 PM to 5:00 PM
Email
: prafulla@hyderabad.bits-pilani.ac.in
Notices:
IPC Notice Board & Course Management site

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Course Reference
Text Books
T1: Object Oriented Design & Patterns, Cay Horstmann, John Wiley &
Sons, 2004
Reference Books
R1: The complete Reference Java 2, 5th Edition, Herbert Schildt, Tata
McGraw-Hill Edition
R2: JavaTMDesign Patterns - A Tutorial, James W. Cooper, Addison-Wesley,
2000
R3: Core JAVA 2, Volume I Fundamentals (Seventh Edition), Cay
Horstmann and Gary Cornell, Prentice-Hall, 2005

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Overview

What is Object Oriented Programming.

Properties of OOP.

History and OOP Features.

Encapsulation.

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Object Oriented Programming


Object

Oriented

Programming

To perform
some task

Consists

An Entity in real World

CS F213 OOP Summer Term 2015

Data + Instructions

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

What an Object Consists?

What an Object Consists?


has

does

CS F213 OOP Summer Term 2015

Properties

Behaviour / Operations

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Languages with object oriented


properties
Few of them are

C++
JAVA
Small Talk
C#

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

What are object oriented


properties?
There are 4 properties
1.
2.
3.
4.

Encapsulation
Abstraction
Polymorphism
Inheritance

CS F213 OOP Summer Term 2015

If any language satisfies these 4


properties, then we can call it as
object oriented programming
language.

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Single line definition for each of


above properties
1.

Encapsulation : Combining data and code together at one place.


Data +
code

2.

Abstraction : hiding essential details and unhiding the non-essential


details.
a

3.

b
Polymorphism : One name acts as multiple forms based on user
interaction.

4.

Inheritance : Deriving one from an existing one.

A
B
CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

JAVA
History of JAVA
1. First name was OAK
Because it got
registered by other
company

Renamed to JAVA
By

Mr. James Gosling Team


2. It was developed for Electronic devices.
CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [1]


1.

Simple:
[ follows C,C++ syntax rules]

Difficult concepts of C and C++ have been omitted in JAVA

Pointers

Why eliminated from Java

- Pointers break security


- Memory allocation and deallocation problem
- So, pointers leads to confusion to a programmer

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [2]


2. Distributed:
Using JAVA, we can write program to send/receive information from
one system to other in the network
Eg: Client- Server program

Request
Client

Server
Response

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [3]


3. Robust:
Strong
There are 2 reasons to say it Robust
- Exception Handling
- Memory Management by JVM
S1
S2
S3
.
.
S25
.
.
.
S100

If Memory management
[allocation & deallocation]
not there, program may crash
at runtime [lack of memory]
Exception
(An error at
runtime)

In JAVA, JVM will take care of


that

Abnormal Termination from program [loss of


data, user does not know what happened]

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [4]


4. System Independence:
JAVAs byte code is machine independent

Java
Comp
iler
1.java

---------------------1.class
Runs on any OS
Consists of byte code

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [5]


5. Portability:
If a program yields the same results on every machine , then that program
is called portable.
- JAVA programs are portable

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [6]


6. Interpreted:
JAVA uses both compiler and interpreter for the execution

A program that transforms


source code into machine
code in total.

A program that can analyze


and execute a program line
by line

CS F213 OOP Summer Term 2015

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Features of JAVA [7]


7. High Performance:
Because of the use of interpreter, java programs execution is slow. To
overcome this problem, along with interpreter, they have introduced JIT
Compiler [JUST IN TIME]

8. Multi-Threading:
Thread

Represents individual process, to execute group of


statements simultaneously

Multi threading

CS F213 OOP Summer Term 2015

Multiple processes running at a time.

Prafulla Kalapatapu

BITS Pilani, Hyderabad Campus

Das könnte Ihnen auch gefallen