Uploaded by Mamadou Wague

Computer science

advertisement
Brian Hsin
4/15/2008
Pogramming CSC 110
Professor Genis
Introduction
Living in the 21st century can be very callous, the invention of the personal pc
and the world wide web has revolutionized the world. Manual labor has become a thing
of the past, everything is only a click away. Even though this may sound good on paper,
however it also brings up a whole new set of problems. Since everything is automated
and so easily accessible, many job opportunities will no longer exist. So the big quesiton
arises: How do we seek employment in the 21st century? The answer is simple,
computers.
Since the entire world revolves around the computer, people that are computer
literate will always have an edge in seeking a job position. The computer can do almost
anything, keep track of a corporation's cash flow, payroll, inventory etc. It's able to
execute these tasks very accurately in a matter of seconds, minus human error. Now I
know wat your thinking, computers are going to take over the world!!! But heres the
catch, computers cannot do anything on it's own, it has to be told by us what to do.
However, it cannot understand human language such as English, Spanish, or Chinese.
Computers has a language of it's own. "Programmers" are computer langauge literate
so they can communicate their thought to the PC and manipulate it to perform the tasks
they desire. Therefore in our current society computer programmers are in very high
demand everywhere, especially the business world.
I am currently an Information Technology major at BMCC, and this semester I
took an introduction to Java course (CSC 110). Java is a very powerful language that is
in high demand right now, everything including cell phones run off Java. After receiving
an A in the class I was offered a job at Z-Media, one of the leading corporations in the
electronic world. This job will significantly improve my financial situation as well as give
me some hands on experience for the future. Like most high end jobs, Mr. Zamora (my
potential boss) wants me to come in for an interview on monday. Their are three other
highly qualified candidates that learned C++ for the job. I need to be able to prove to Mr.
Zamora I have a deep understanding in Java and why it's superior to other languages.
To prepare I decided to organize all the information I have learned for the interview.
Java
Brief History
Java is a fairly young language comparatively, it was released by Sun
Microsystems in 1995. The language was developed by a man named James Gosling
back in 1991. It was initially named oak because he had a big oak tree outside his office
and was later renamed Java. Java language is extremely close to C/C++ as far as
syntax, but it had a "Write Once, Run Anywhere" policy that enables one program run
on any computer without recompiling, regardless of it's architecture. This is one of the
key features that sets Java apart from other languages. Instead of having a different
compiler for each platform, you write the code once and it is able to run on any OS
without having to download a new compiler. Java is also fairly secure, allowing you to
configure the level of security, as a result major web browsers such as google, yahoo
incorporated the ability to run secure Java applet within it's web pages. Java soon
became very popular, you cannot go through a day without using an Java application.
Everytime you look at your cell phone, access a website, watch a youtube video, you
are indirectly using a Java application.
Primary Goals
There were five primary goals in the creation of the Java language:[12]
It should use the object-oriented programming methodology.
It should allow the same program to be executed on multiple operating systems.
It should contain built-in support for using computer networks.
It should be designed to execute code from remote sources securely.
It should be easy to use by selecting what were considered the good parts of other
object-oriented languages
1. Object-Oriented programming(Java)
As you may have noticed, I have posted the five primary goals that makes Java
unique. Number one is the object-oriented programming methodoly. To put it in
perspective for people who are not familiar with Java, think of an object like a "black
box" where you store the code (sequence of instructions) and the data (the information
the code runs on) in the same location. The reason it is referred to as "black box" is that
it also shuts out the user from the programmer's source code. By doing this we have
eliminated the chance that people will alter the code. In object-orientated programming
the user will never have to look at the code to understand what it's suppose to do, the
message itself provides the user with all the possible options. This may not seem like a
big deal, even if someone does change the program. However some of the biggest
mistakes in programming history have been caused by someone trying to alter another's
source code.
For example if programmer A wrote a program to perform a certain task and
programmer B decide to alter code and manages to keep it working. But six months
later programmer A decides to add new data into the program, now programmer B's
altered code no longer works. Object- orientated methodology eliminates this problem.
C++ (difference)
Since C/C++ is the next most widely used langauge, I'm going to compare it to
Java .C++ uses the more traditional method, keeping the code and data seperate. In C
language, units of codes are called functions and the data are called structures. The
functions and structures are not formally connected, function can operate on more then
one type of structure, and vice versa. In Java everything is combined into a indivisible
thing.
2. Multi-platform Compatibility(Java)
Java is referred to as a very portable language, this means that one program can
go from one OS to another without recompiling. A programmer can write one program
on Windows and then transfer it to a Mac without doing anything. Unlike previous
languages such as C/C++ which takes the programmer's source code and compiles
directly to computer language. Java takes the source code and compiles it to something
called byte code and then the Java Virtual Machine (JVM) takes the byte code and
comminicates with the computer. This is known as "interpretation" language. By having
the JVM like a middle man between computer langauge and source code is the reason
why Java is able to run on all OS's without recompiling. This is another huge selling
point of Java.("Write Once Run Anywhere")
C++ (difference)
C++ is not nearly as portable as Java. In C++, like languages before it requires
you to recompile a program when you switch between platforms. When you save and
compile a code in C++ it is converted from source code directly to computer language.
This may like a positive attribute, however it is not. Because Mac, Windows, Linux,
Leperd and so on are all written differently so the "computer" language they understand
differs from OS to OS. Therefore when when a programmer writes a program on
Windows and wants to run it on a mac, he or she needs to recompile it for the mac. Also
there is a different compiler for each OS as well. With Java you only have to compile
once and there is one universal compiler for all OS's.
3. Built in support of computer network
This is another key feature of Java. This is actually a very complicated process
that we do not touch on in Java 1. So I'm going to try my best to explain with in
lan-mens terms. Basically Java has a preset library that allows you to call all the
premade functions versus C++, due to its age has a very limited preset library so the
programmer has to make everything from scratch. This allows Java programmers to
comminicate with the network even in the most advance programs fairly easily.
4. Remote Access
Another feature of Java is it's ability to execute code from "remote sources"
securely. "Remote Procedure Call (RPC) is a technology that allows a computer to
cause a subroutine or precedure to execute in another adress space(commonly on
another computer on a shared network) without the programmer explicitly coding the
details for this remote interaction." To put it in simple terms, a programmer is able to
write a code on one computer and split the tasks into multiple machines so it wont
overload one. Since Java is "portable", all the programmer has to do is call the method
in the preset library to split the tasks to any other machine regardless of infrastructure
without doing anything. This is another instance where the "Write Once Run Anywhere"
policy comes in handy. The Remote Procedure Call feature is not an exclusive to Java
however, C++ can also perform the same task, however it's alot more time consuming
and tedious.
5.It should be easy to use by selecting what were considered the good parts of other
object-oriented languages.
The last "primary goal" of Java is basically self explanatory, so I'm not going to go into
any details since I mentioned object-oriented methodology above. Basically Java chooses the
best qualities in other object-orientated languages before it and eliminate the parts that slowed it
down.
Java vs. C++
Java has gained enormous popularity since it first appeared. Its rapid ascension and wide
acceptance can be traced to its design and programming features, particularly in its promise that
you can write a program once, and run it anywhere. Java was chosen as the programming
language for network computers (NC) and has been perceived as a universal front end for the
enterprise database. As stated in Java language white paper by Sun Microsystems: "Java is a
simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable,
multithreaded, and dynamic."
Through my research and picking at my mom's brain i realized that there are numberous
numbers of reason that Java is better then C++ and in some cases vice versa. So instead of taking
another 2 pages to explain each one I'm just goint to addess the most important ones.
Advantages of Java
1. One of the key features that made Java universal is " Java is Simple", comparatively
to other languages. One of the main reason is because it's Object- orientated, it has clean
syntax, easy to read, and very close to human language.
2. Java uses Object-Orientated Methodology. It allows the user to get all the
information they need without ever looking at the code, "black box."
3. Java is converted into byte code and then the JVM interprets it to the computer.
This makes Java "portable," meaning one program is compatible with all OS's.
"Write
once Run Anywhere."
4. Java allows you to configure the security level of you program, therefore it was
adopted my major web broswers and corporations, thus making it popular.
5. Allows you to perform Remote Procedure Call which allows you to access a
program that is stored in one computer from another adress with ease (securely). This
allows programmers to split a program up to two computers so they don't get
overworked.
Disadvantages of Java
Like all other languages Java isnt without drawbacks:
1. Because Java is in interpreted language it is not compiled directly to computer
language. Although this makes it more portable, but it effects the speed. But due to the
cheap and fast computers are these days we should not be able to tell the difference unless the
program is really advanced.
2. Second problems roots from the fact that Java was officially introduced in
1997.
Although Java is compatible with all the major OS's linux, Windows, Mac
etc. Some
underfunded schools and small businesses still use really outdated platforms that Java does not
recognize. Again this is only a very short temporary
problem with the increasing speed
and dropping prices for personal computers.
3. Java also lacks the numbers of genuine textbooks. But this problem will also be
taken care of in a short time.
4. Java is also often criticized making a code so close to C/C++, which made it
switch over. Again this is easy to change.
easy to
Conclusion
I was always taught that nothing it perfect, to judge if something is good you
take all the pros and weigh it with the cons. If the pros outweighs the cons then it's
a good thing. Using the primitive yet effective judgement method lets take the
language Java into perspective. There are numerous attributes that makes Java an
incredibly user friendly and effective language, which I have only named a few of
them. You take the few/set backs Java has, they are all minor and temporary. So
my conclusion is Java is the most superior language of the time and I'm the most
qualified candidate for the job.
Hsin, Brian (20080123023008270224)
Received Sat Apr 19 2008 17:58
Comments: Here is my essay, im sorry its a bit late. Took me a while to settle in. I'm not sure if the footnotes
show up in word xp version w/o printing that is why i sent a bibliography with it.
Download