Computer Project Icse Class 10
Computer Project Icse Class 10
Java and
Bluej
Java history is interesting to know.
The history of java starts from Green
Team. Java team members (also known
as Green Team), initiated a
revolutionary task to develop a
language for digital devices such as set-
top boxes, televisions etc.
For the green team members, it was an
advance concept at that time. But, it
was suited for internet programming.
Later, Java technology as incorporated
by Netscape.
Currently, Java is used in internet
programming, mobile devices, games,
e-business solutions etc. There are
given the major points that describes
the history of java.
1) James Gosling, Mike Sheridan,
and Patrick Naughton initiated the
Java language project in June 1991. The
small team of sun engineers
called Green Team.
2) Originally designed for small,
embedded systems in electronic
appliances like set-top boxes.
3) Firstly, it was called "Greentalk" by
James Gosling and file extension was
.gt.
4) After that, it was called Oak and was
developed as a part of the Green
project.
5) Why Oak? Oak is a symbol of
strength and choosen as a national tree
of many countries like U.S.A., France,
Germany, Romania etc.
6) In 1995, Oak was renamed
as "Java" because it was already a
trademark by Oak Technologies.
7) Why they choosed java name for
java language? The team gathered to
choose a new name. The suggested
words were "dynamic", "revolutionary",
"Silk", "jolt", "DNA" etc. They wanted
something that reflected the essence of
the technology: revolutionary, dynamic,
lively, cool, unique, and easy to spell
and fun to say.
According to James Gosling "Java was
one of the top choices along with Silk".
Since java was so unique, most of the
team members preferred java.
8) Java is an island of Indonesia where
first coffee was produced (called java
coffee).
9) Notice that Java is just a name not
an acronym.
10) Originally developed by James
Gosling at Sun Microsystems (which is
now a subsidiary of Oracle Corporation)
and released in 1995.
11) In 1995, Time magazine called Java
one of the Ten Best Products of
1995.
12) JDK 1.0 released in(January 23,
1996).
BlueJ is an integrated development
environment (IDE) for the Java programming
language, developed mainly for educational
purposes, but also suitable for small-
scale software development. It runs with the
help of JDK (Java Development Kit).
The development of BlueJ was started in
2000 by Michael Kölling and John
Rosenberg at Monash University, as a
successor to the Blue system. BlueJ is an
IDE. Blue was an integrated system with its
own programming language and environment.
BlueJ implements the Blue environment
design for the Java programming language.
BlueJ is currently being maintained by a team
at the University of Kent, Canterbury, England
– where Kölling used to lecture.
In March 2009, the BlueJ project became free
and open source software, and licensed
under GNU GPL with the classpath exception.
Since February 2017, Michael Kölling and
most of the BlueJ team work at King's College
London, as it can be seen on BlueJ version
4.0.0's splash screen.[4]
OOPs (Object
Oriented
Programming
System)
Object means a real word entity such
as pen, chair, table etc. Object-
Oriented Programming is a
methodology or paradigm to design a
program using classes and objects. It
simplifies the software development and
maintenance by providing some
concepts:
o Object
o Class
o Inheritance
o Polymorphism
o Abstraction
o Encapsulation
Object
Any entity that has state and behavior
is known as an object. For example:
chair, pen, table, keyboard, bike etc. It
can be physical and logical.
Class
Collection of objects is called class. It
is a logical entity.
Inheritance
When one object acquires all the
properties and behaviours of parent
object i.e. known as inheritance. It
provides code reusability. It is used to
achieve runtime polymorphism.
Polymorphism
When one task is performed by
different ways i.e. known as
polymorphism. For example: to
convince the customer differently, to
draw something e.g. shape or rectangle
etc.
In java, we use method overloading and
method overriding to achieve
polymorphism.
Another example can be to speak
something e.g. cat speaks meaw, dog
barks woof etc.
Abstraction
Hiding internal details and showing
functionality is known as abstraction.
For example: phone call, we don't know
the internal processing.
In java, we use abstract class and
interface to achieve abstraction.
Encapsulation
Binding (or wrapping) code and
data together into a single unit is
known as encapsulation. For
example: capsule, it is wrapped with
different medicines.
A java class is the example of
encapsulation. Java bean is the fully
encapsulated class because all the data
members are private here.
Features of
Java
1.Simple
According to Sun, Java language is
simple because:
syntax is based on C++ (so easier
for programmers to learn it after
C++).
removed many confusing and/or
rarely-used features e.g., explicit
pointers, operator overloading etc.
No need to remove unreferenced
objects because there is Automatic
Garbage Collection in java.
2. Platform Independent
A program or technology is said to be
platform independent if and only if which
can run on all available operating systems
with respect to its development and
compilation. (Platform represents O.S).
3. Architectural Neutral
Architecture represents processor.
A Language or Technology is said to be
Architectural neutral which can run on any
available processors in the real world
without considering their development and
compilation.
4. Portable
If any language supports platform
independent and architectural neutral
feature known as portable. The languages
like C, CPP, Pascal are treated as non-
portable language. It is a portable language.
According to SUN microsystem.
5.Object-oriented
Object-oriented means we organize our
software as a combination of different
types of objects that incorporates both
data and behaviour.
Object-oriented programming(OOPs) is a
methodology that simplify software
development and maintenance by
providing some rules.
Constructor
in Java
Constructor in java is a special type of
method that is used to initialize the
object.
Java constructor is invoked at the time
of object creation. It constructs the
values i.e. provides data for the object
that is why it is known as constructor.
Example of default
constructor
In this example, we are creating the no-arg
constructor in the class bike. It will be
invoked at the time of object creation.
class Bike1
{
Bike1()
{
System.out.println("Bike is created");
}
public static void main(String args[])
{
Bike1 b=new Bike1();
}
}
Java parameterized
constructor
A constructor that have parameters is
known as parameterized constructor.
Parameterized constructor is used to provide
different values to the distinct objects.
Syntax of parameterized
constructor
<class_name>(data type
variable_name , data type
variable_name,.....)
{
}
Example of parameterized
constructor
In this example, we have created the
constructor of Student class that have two
parameters. We can have any number of
parameters in the constructor.
class Student4{
int id;
String name;
Student4(int i,String n)
{
id = i;
name = n;
}
void display()
{
System.out.println(id+" "+name);
}