Computer Project: Mrs - Meenakshi Negi Harshit Dhiman
Computer Project: Mrs - Meenakshi Negi Harshit Dhiman
Computer
Project
Acknowledgement
I place my gratitude to all those who helped me in completion of this
project. I am very grateful to our school Principal Sister Anila
Bastine and my teacher Mrs.Meenakshi Negi for providing me with
this project. It was a golden opportunity for me to make this project
and I learnt a lot about it.
Index
S.no. Topic Pg.no.
2. Introduction of Blue-J 4
3. Section-A
Definitions 5
Access Specifier 6
Scanner Class(10 methods of scanner class) 7,8
Library Functions(10 String Library Functions, 9,10
10 Math Functions)
4. Section-B
Programs
5. Conclusion 17
6. Bibliography 18
Page |3
I.T. icon
James Gosling: The brilliant techie was born on 19th May in the
summer of 1955. The land which was blessed with the birth of such a
wonderful man is Calgary in the state of Alberta, Canada. James since
his childhood had a lot of interest in the newly developing computer
technology at that time. So he did Bachelor of Science from the very
famous University of Calgary, Canada, with province in Computer
Science in the year of 1977. Later in 1983 he went forward towards
doing his PHD in Computer Science from the Carnegie Mellon
University. At the time of PHD his doctoral thesis was entitled as,
"Algebraic Manipulation of Constraints". At the time of his studies he
was also dedicated towards writing of Emacs, which he names as the
Gomacs, he also worked towards development of multiprocessor
version of the operating system UNIX, and several compilers as well
as mail systems.
In the year of 1984 Sun Microsystems hired this great man. Gosling
worked with Sun Microsystems for an immense period of 26 years,
and left after it was acquired by the Oracle. Later in 2011 he joined to
work with Google. He worked there for some time and later he joined
his old Sun colleague in a startup names "Liquid Robotics". After a
few years Liquid Robotics was acquired by Boeing. After this
happened gosling left it and later started working with Amazon since
May, 2017.
Introduction of Blue-J
The development of Blue-J was started in 1999 by Michael
Kolling and John Rosenberg at Monash University, as a successor
to the Blue systems. Blue-J is an IDE (Integrated Development
Environment). Blue was an integrated system with its own
programming language and environment, and was a relative of
the Eiffel language. Blue-J implements the Blue environment design
for the Java programming language.
Section –A
Definitions
Access specifier
An important aspect of encapsulation is the control of information or
data sharing which is provided through access specifiers. They are
like entry gates that control what information or data can be
accessible to whom. Access Specifiers specify or restrict thee access
of a class, constructor, data members, methods and variables. Take
the example of your house which has bedroom, drawing room, study
room. Now you can specify who has access the different rooms. For
example your best friend can access your drawing room and study
room, your other friends can access your drawing room but only you
can access your bedroom. Access specifiers works in same fashion.
Page |7
Scanner class
Scanner class in Java is found in the java.util package. Java provides
various ways to read input from the keyboard; the java.util.Scanner
class is one of them.
The Java Scanner class breaks the input into tokens using a delimiter
which is whitespace by default. It provides many methods to read and
parse various primitive values.
The Java Scanner class is widely used to parse text for strings and
primitive types using a regular expression. It is the simplest way to
get input in Java. By the help of Scanner in Java, we can get input
from the user in primitive types such as int, long, double, byte, float,
short, etc.
The Java Scanner class extends Object class and implements iterator
and Closeable interfaces.
Library functions
Library functions are the inbuilt functions present in Java
library classes, provided by Java system to help programmers to
perform their task in an easier way.
10 Math functions:
Math.sqrt(): It is used to give square root of a given number.
Math.pow(): It is used to find the value of power of a given
number.
Section –B
Programs
Ques 1: Write a program to sort the given elements
int marks[] = {67,76,55,89,78}
Ans1: public class BubbleSort
{
public static void main(String args[]){
int marks[]={67,76,55,89,78};
int len = marks.length;
for (int i = 0; i< len-1; i++){
for (int j = 0; j< len-i-1; j++){
if (marks[j] > marks[j+1])
{
// swap temp and arr[i]
int temp = marks[j];
marks[j] = marks[j+1];
marks[j+1] = temp;
}
}
P a g e | 12
}
}
if(pos==0)
{ System.out.println(“Record not found”);
}
}
}
}
}
}
System.out.println();
}
}
}
String V = “SCHOOL”;
for(int i = 0; i>6; i--)
{
System.out.print(V.substring(0,i);
}
Syatem.out.println();
}
}
P a g e | 17
Conclusion
I am very happy to make this project. I would like to end this project
by concluding that Java language has wonderfully connected
computers to the real world. The whole new concept of object, having
its attributes and behaviour have taken computer language and coding
to a completely new level.
While doing this project, I learnt a lot about James Gosling, The
Father of Java. The ease which Java has created to study and interact
with immense and unrealistic for a new comer. I learnt how a segment
of a program can put hours of work to work of few minutes.
I tried to gather and sum up as many point as possible in the project.
It contains the basic details of the journey of Gosling and the path of
Sun Microsystems through which Java was made. It also included
some basic definitions for easy understanding of basic terms in Java
language. I ended the project with samples of programs.
To sum up, this whole project was of great interest for me and has
filled my mind with knowledge and curiosity to know more about this
language.
I also want to thank my Teacher for providing me with this project
and my friends and relatives who helped me so that I can complete
this project in limited time phrase.
P a g e | 18
Bibliography
Browser/Book Sites/Author