TRYLOGIC SOFT SOLUTIONS AP (P)LTD Object Oriented : In java everything is an Object. Java can be...

19
JAVA INTRODUCTION TRYLOGIC SOFT SOLUTIONS AP (P)LTD

Transcript of TRYLOGIC SOFT SOLUTIONS AP (P)LTD Object Oriented : In java everything is an Object. Java can be...

Page 1: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

JAVA INTRODUCTION

TRYLOGIC SOFT SOLUTIONS AP (P)LTD

Page 2: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Java is: Object Oriented : In java everything is

an Object. Java can be easily extended since it is based on the Object model.

Platform independent: Unlike many other programming languages including C and C++ when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run

Page 3: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Simple :Java is designed to be easy to learn. If you understand the basic concept of OOP java would be easy to master.

Secure : With Java.s secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.

Architectural- neutral :Java compiler generates an architecture-neutral object file format which makes the compiled code to be executable on many processors, with the presence Java runtime system.

Page 4: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Portable :being architectural neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler and Java is written in ANSI C with a clean portability boundary which is a POSIX subset.

Robust :Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.

Page 5: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

High Performance: With the use of Just-In-Time compilers Java enables high performance.

Distributed :Java is designed for the distributed environment of the internet.

Dynamic : Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.

Page 6: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

OOPS ConceptsThere are some basic concepts of object oriented programming as follows:

1. Object2. Class3. Data abstraction4. Data encapsulation5. Inheritance6. Polymorphism

Page 7: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

What Is an Object?

These real-world objects all have states and behaviors.

Definition: An object is a software bundle of variables and related methods (function).

A common visual representation of a software object.

Page 8: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Classes A class (e.g., Dog) is a kind of mold or template to

create objects (e.g., Mary and DooDoo) mold = 模型 = mould An object is an instance of a class. The object belongs

to that class

Dog DogDog

Mary

DogDog

DooDoo

Instance-of

DogDog

Page 9: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Example: Bicycle

The software bicycle's current state: its speed is 10 mph, its pedal cadence is 90 rpm, and its current gear is the 5th gear.

The software bicycle would also have methods to brake, change the pedal cadence, and change gears.

Page 10: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

An Abstract Data Type (ADT) is a user-defined data type that satisfies the following two conditions: (Encapsulation + Information Hiding) The representation of, and operations on,

objects of the type are defined in a single syntactic unit; also, other program units can create objects of the type.

The representation of objects of the type is hidden from the program units that use these objects, so the only operations (methods) possible are those provided in the type's definition which are known as interfaces.

ADT --- Data Abstraction

Page 11: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Encapsulation Hide the object's nucleus from other objects in the

program.

The implementation details can change at any time without affecting other parts of the program.

It is an ideal representation of an object, but For implementation or efficiency reasons, an object may wish

to expose some of its variables or hide some of its methods. Benefits:

Modularity The source code for an object can be written and maintained

independently of the source code for other objects.

Information hiding An object has a public interface that other objects can use to

communicate with it.

Page 12: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

What Is Inheritance? (extends)

Subclasses inherit variables and methods from superclasses. States:

Gear & Speed Behaviors:

Brake & Accelerate Subclasses can

Add variables and methods. Override inherited methods.

Benefits: Provide specialized behaviors Reuse the code in the superclass Abstract classes -- define "generic" behaviors.

Page 13: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

What Is Polymorphism

Polymorphism came greek words poly meaning many morphism means forms.

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object.

Page 14: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

WHAT IS ANDROID ?Generally, Android is a software stack for mobile devices that includes an operating system, middleware and key applications.Android is based on JAVA and all its applications are developed in JAVAUses Linux to provide core system services

SecurityMemory managementProcess managementPower managementHardware drivers

Page 15: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Android Features

Application framework enabling reuse and replacement of components

Optimized Java virtual machine: Dalvik (about this DVM we learn in coming classes)

Optimized Graphics Processing, supporting 2D and 3D graphics(OpenGL ES 1.0 )

Integrated open source web browser: WebKit

SQLite for structured data storage

Page 16: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Multimedia capability, supporting varieties of audio, video and still image formats

GSM TelephonyBluetooth, EDGE, 3G and Wi-Fi supportCamera, GPS, compass, accelerometer and other sensors support Rich development environment, including an

emulator, debugging tools, memory probe tools, log tools and powerful eclipse plugins

Hardware dependent

Page 17: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

HISTORY OF ANDROID

Android, Inc. was founded in Palo Alto California, United States in October, 2003 by Andy Rubin (co-founder of Danger), Rich Miner and Chris WhiteGoogle acquired Android Inc. on August 17, 2005, making Android Inc. a wholly owned subsidiary of Google Inc With same Android, Inc Team.

Google was planning to enter the mobile phone market with this move.In 2007 announced Open Handset Alliance with several companies which include Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint Nextel, T-Mobile and Texas Instruments

Page 18: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Android Open Source Project(AOSP) "The goal of the Android Open Source

Project is to create a successful real-world product that improves the mobile experience for end users.

And one that can run any application written by third-party developers using the Android SDK

Page 19: TRYLOGIC SOFT SOLUTIONS AP (P)LTD  Object Oriented : In java everything is an Object. Java can be easily extended since it is based on the Object model.

Android Versions