Sei sulla pagina 1di 35

 Machine Language – uses binary digits 1

and 0. It is the natural language of a


computer, they are machine dependent

 Assembly Language - it uses mnemonics


or symbols to represent instructions and
data. It uses assembler to convert source
code to machine language then loaded
run by a loader.
 High Level Language – it uses an English-
like statements and it uses compilers or
interpreters to translate the source code
to machine language.
› BASIC, FORTRAN, COBOL, Pascal, C, C++,
and JAVA
 The process of eliminating errors in a
program.

 Types of Bug / Error:


› Syntax Error – grammatical mistakes
› Run-time Error – detected when the program
is running.
› Logic Error – the output of program is wrong
 Object-oriented programming is a
method of implementation in which
programs are organized as cooperative
collections of objects, each of which
represents an instance of some class,
and whose classes are all members of
one or more hierarchy of classes united
via inheritance relationships.
 A programming paradigm that uses
objects and their interaction to design
applications and computer programs.

 A programming methodology that views


program as similarly consisting of objects
that interact with one another by means
of actions.
 An object can be considered a "thing"
that can perform a set of related
activities. It consists of data that can
perform certain actions.
 It is a software bundle of related state
and behavior
 Ex. Dogs have state (name, color, breed,
hungry) and behavior (barking, fetching,
wagging tail).
 An action done by an object
 It
is the blueprint or prototype from
which individual objects are created.

A class is a mechanism that combines


objects in a single unit.

 Objectsof the same type have the


same class.
All object-oriented programming
languages provide mechanisms that
help you implement the object-
oriented model.
They are:
• Encapsulation
• Inheritance
• Polymorphism
› information hiding  The process of hiding
all the details of how
piece of software is
› the mechanism written and telling only
that binds what a programmer
together code needs to know
and the data it
manipulates, and  allows a class to
keeps both safe change its internal
from outside implementation
interference and without hurting the
misuse. overall functioning of
the system.
 Advantages of Example:
Encapsulation
class Account
• Protection {
• Consistency int x=10; float
• Allows change withdraw();
void deposit(float
amount);
float balance;
}
 Polymorphism refers to a programming
language's ability to process objects differently
depending on their data type or class.

 Generally, the ability to appear in many forms

 More specifically, it is the ability to redefine


methods for derived classes.

 It means that one method, used as an


instruction, can cause different actions
depending on the kind of object that performs
the action.
 the process by which  A class that is derived
one object acquires from another class is
the properties of called the a subclass
another object. (also a derived class,
extended class, or child
 Ability of a new class class).
to be created, from an  The class from which the
existing class by subclass is derived is
extending it. called a super class (also
 A way of organizing a base class or a parent
classes where the class).
properties can be
defined only once and
yet applies to a whole
collection of classes.
 Developed by Sun Microsystems
(James Gosling)
 A general-purpose Object-Oriented
language
 Based on C/C++
 Designed for easy Web/Internet
applications
 Widespread acceptance
 A high-level programming language
originally developed by James Gosling
at Sun Microsystems

 The language derives much of its syntax


from C and C++ but has simpler object
model and fewer low-level facilities.
 Java was originally called OAK
› Oak was a programming language created by
James Gosling in 1991, initially designed for Sun
Microsystems set-top box project.
› The name OAK was used by Gosling after an
oak tree that stood outside his office.
› The language later evolved to become Java

 In 1994, Gosling realized that his language


would be ideal for developing a web
browser
 In 1995, Netscape Inc. decided to make
the next release of its Netscape
(Internet) browser capable of running
Java programs.

› The first public implementation was Java 1.0


in 1995
 With the advent of Java 2, new versions
had multiple configurations built for
different types of platforms:
› J2EE – for enterprise applications
› J2ME – mobile applications
› J2SE – standard edition

 In 2006, for marketing purposes, new J2


versions were renamed Java EE,
Java ME and Java SE.
 A form of instructions generated by a
Java compiler and interpreted by a
Java Virtual Machine.

 It is platform independent
 It is a software tool that behaves like a
high-level computer.

 It executes Java byte-code programs


 Compiling the program – use a Just-in-
Time (JIT) compiler to translate the Java
program byte-code.

 Running the program – use the byte-


code interpreter to translate each byte-
code instruction to machine language
and to run the machine language
instructions.
 Application  Applet
› A regular program › A regular program
meant to be run on meant to be run on
the computer the internet
› Programs that are
embedded in other
› Java can also be
applications, typically
used to develop in a web page
applications for hand- displayed in a web
held devices such as browser
Palmtops and cell
phones
 A java Platform is the set of APIs, class
libraries, and other programs used in
developing Java programs for specific
applications.
 Java Cards  A technology that
allows small Java-
based applications
Ex. SIM cards, (applets) to be run
ATM cards securely on smart
cards and similar
small memory
footprint devices.
 Java ME  Typical for creating
programs intended
(Micro Edition)
for small, resource-
constraints devices.
Ex. Cellular phones
Palm tops,  It specifies several
Mp4 players different sets of
PDA’s libraries
 Java SE  Usually intended for
workstation
(Standard Edition)
environments

Ex. Desktop PCs


 It consists of a virtual
Servers machine and a set
of libraries for
general-purpose
 Java EE  It targets large
distributed
(Enterprise Edition)
enterprises or
internet
environments that
requires server
programming.
 Platform  Portable;
independent Write - once – run –
anywhere
 Architecture neutral

 Easy to write and


 Simple debug
 Object-oriented  Characterized by
inheritance,
encapsulation,
polymorphism..

 Robust
 It is reliable
 Secure  Uses public key
encryption system to
allow the java
applications to
transmit over the
internet in the secure
encrypted form.
 Multithreaded  A single java program
that has different
threads can execute
independently at the
same time.

 A multithreading is a
specialized form of
multitasking
 Dynamic  It is designed to adapt
to an evolving
environment

 Performance  It uses just-in-time


compilation

Potrebbero piacerti anche