You are on page 1of 10

BSEMC-DAT 1A

ASSIGNMENT NO. 1
Student Name : Beduya, Gemari P. [ CICT3 ]
BS Computer Science Major in Network and Data
Communication
Submitted To : Ruben Espejo Jr., MSCS
1. WHAT IS JAVA PROGRAMMING?

➭ Java was originally designed for embedded network applications running on multiple platforms. It is a
portable, object-oriented, interpreted language. Java is extremely portable. The same Java application will
run identically on any computer, regardless of hardware features or operating system, as long as it has a
Java interpreter. Besides portability, another of Java's key advantages is its set of security features which
protect a PC running a Java program not only from problems caused by erroneous code but also from
malicious programs (such as viruses). You can safely run a Java applet downloaded from the Internet,
because Java's security features prevent these types of applets from accessing a PC's hard drive or
network connections. An applet is typically a small Java program that is embedded within an HTML page.

2. HISTORY OF JAVA PROGRAMMING

➭ The history of Java is very interesting. Java was originally designed for interactive television, but it
was too advanced technology for the digital cable television industry at the time. The history of Java
starts with the Green Team. Java team members (also known as Green Team), initiated this project to
develop a language for digital devices such as set-top boxes, televisions, etc. However, it was best suited
for internet programming. Later, Java technology was incorporated by Netscape. The principles for
creating Java programming were "Simple, Robust, Portable, Platform-independent, Secured, High
Performance, Multithreaded, Architecture Neutral, Object-Oriented, Interpreted, and Dynamic". Java was
developed by James Gosling, who is known as the father of Java, in 1995. James Gosling and his team
members started the project in the early '90s. Currently, Java is used in internet programming, mobile
devices, games, e-business solutions, etc. Following are given significant points that describe 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) Initially it was designed for small, embedded systems in electronic appliances like set-top boxes.

3) Firstly, it was called "Greentalk" by James Gosling, and the file extension was .gt.

4) After that, it was called Oak and was developed as a part of the Green project.
3. KEY FEATURES OF JAVA

Here are the advanced features of Java programming in detail:


1. Simple and Familiar
Java is simple because:

Its coding style is very clean and easy to understand. It removes complexity because it doesn’t use
complex and difficult features of other languages like C and C++, which are as follows.

 Concept of Explicit Pointers


 Storage classes
 Preprocessors and header files
 Multiple Inheritance
 Operator Overloading
 Goto Statements

Apart from the removal of these confusing and ambiguous concepts, there is a provision of Automatic
Garbage Collection, in which there is no need to remove the unreferenced objects explicitly.

Java is familiar because:

 It has a base of familiar languages like C and C++ and contains many features of these languages.
 It removes the drawbacks, complexities and confusing elements of C/C++. So if you have good
knowledge of C/C++, you will find Java familiar and easy to understand.

2. Compiled and Interpreted


Usually, a computer language can be either compiled or interpreted. Java integrates the power of
Compiled Languages with the flexibility of Interpreted Languages.

Java compiler (javac) compiles the java source code into the bytecode.

Java Virtual Machine (JVM) then executes this bytecode which is executable on many operating systems
and is portable.

The diagram below shows the above process:

3. Platform Independent
The most significant feature of Java is that it provides platform independence which leads to a facility of
portability, which ultimately becomes its biggest strength.

Being platform-independent means a program compiled on one machine can be executed on any machine
in the world without any change. Java achieves platform independence by using the concept of the BYTE
code.

The Java compiler never converts the source code to machine code like that of the C/C++ compiler.
Instead, it converts the source code into an intermediate code called the byte code and this byte code is
further translated to machine-dependent form by another layer of software called JVM (Java Virtual
Machine).

Therefore, JVM can execute bytecode on any platform or OS on which it is present, regardless of the fact
that on which machine the bytecode was generated.

This is where the “Write Once, run anywhere” (WORA) slogan for Java comes in, which means that we can
develop applications on one environment (OS) and run on any other environment without doing any
modification in the code.

4. Portable
Java is “portable” refers to the SE (Standard Edition) version. The portability actually comes from
architecture-neutrality.

In C/C++, the source code may run slightly differently on different hardware platforms, but Java
simplifies it. You can run Java bytecode on any hardware that has a compliant JVM which can convert the
bytecode according to that particular machine.

In Java, the size of the primitive data types is machine-independent, which were dependent in the case of
C/C++. So, these provisions make Java programs portable among different platforms such as Windows,
Unix, Solaris, and Mac.

Moreover, any changes and updates made in Operating Systems, Processors and System resources will
not enforce any changes in Java programs.

5. Architectural Neutral
This buzzword means that the program written on one platform or OS is independent of other platforms
or environments and can run on any other Operating System without recompiling them.

In other words, it is based on the ‘Write-once-run-anywhere’ (WORA) or ‘Write-once-run-everywhere’


(WORE) approach.

Byte-code is not dependent on any machine architecture and Java Virtual Machine (JVM) can easily
translate bytecode into a machine-specific code.

This feature is very useful when we develop applets or download applications from the Internet.

Moreover, these applications need to run on different machines, so this feature proves to be very
important in this case.

6. Object-Oriented
Next in Java features article, we will discuss the OOP feature. Java strongly supports the concepts of
Object-Oriented Programming due to which it is called a pure object-oriented language.
Java supports major Object-Oriented programming features like Encapsulation, Abstraction, and
Inheritance.

Almost everything in Java is an object. All programs and data live within objects and classes. ‘Objects’
model Java rather than the ‘processes’. Java comes with an extensible set of classes organized in packages.

For example, we cannot develop an executable program in Java without making use of the class. This indicates that
Java very strictly applies the principle of Encapsulation.

7. Robust
Java is robust as it is capable of handling run-time errors, supports automatic garbage collection and
exception handling, and avoids explicit pointer concept.

Java has a strong memory management system. It helps in eliminating errors as it checks the code during
both compile and runtime.

Java is garbage-collected language – JVM automatically deallocates the memory blocks and programmers do
not have to worry about deleting the memory manually as in case of C/C++.

Java also provides the concept of exception handling which identifies runtime errors and eliminates them.

In Java, any runtime error encountered by the JVM is never passed directly to the underlying system
rather immediately terminates the program stopping it from causing any harm to the underlying system.

8. Secure
Security is an important issue for any programming language as there is a threat of malicious activities
and viruses. Java supports access modifiers to check memory access and also ensures that no viruses
enter an applet.

Java is a more secure language as compared to C/C++, as it does not allow a programmer to explicitly
create pointers. Thus in Java, we can not gain access to a particular variable if we do not initialize it
properly.

Programs run in a virtual machine sandbox – A separate environment that allows users to execute their
applications without affecting the underlying system.

It has a bytecode verifier that checks the code fragments for any illegal code that violates the access right.

9. Distributed
Java is distributed because it encourages users to create distributed applications.

In Java, we can split a program into many parts and store these parts on different computers. A Java
programmer sitting on a machine can access another program running on the other machine.
This feature in Java gives the advantage of distributed programming, which is very helpful when we
develop large projects. Java helps us to achieve this by providing the concept of RMI (Remote Method
Invocation) and EJB (Enterprise JavaBeans).

Java comes with an extensive library of classes for interacting, using TCP/IP protocols such as HTTP and
FTP, which makes creating network connections much easier than in C/C++.

It also enables multiple programmers at many locations to work together on a single project.

10. Multi-threaded and Interactive


A thread is an independent path of execution within a program, executing concurrently. Multithreaded
means handling multiple tasks simultaneously or executing multiple portions (functions) of the same
program in parallel.

The code of java is divided into smaller parts and Java executes them in a sequential and timely manner.

Advantages:

 The main advantage of multithreading is that the maximum utilization of resources is possible.
 It doesn’t occupy memory for each thread. It shares a common memory area.
 There is no need to wait for the application to finish one task before beginning another one.
 There is a decreased cost of maintenance. Also, It is time-saving.
 It improves the performance of complex applications.

Java is interactive because its code supports effective CUI (Character User Interface) and GUI (Graphical
User Interface) programs. It greatly improves the interactive performance of graphical applications.

11. High Performance


The performance of Java is impressive for an interpreted language because of its intermediate bytecode.

Java provides high performance with the use of “JIT – Just In Time compiler”, in which the compiler
compiles the code on-demand basis, that is, it compiles only that method which is being called. This saves
time and makes it more efficient.

Java architecture is also designed in such a way that it reduces overheads during runtime. The inclusion
of multithreading enhances the overall execution speed of Java programs.

Bytecodes generated by the Java compiler are highly optimized, so Java Virtual Machine can execute
them much faster.

12. Dynamic and Extensible


Java is dynamic and extensible means with the help of OOPs, we can add classes and add new methods
to classes, creating new classes through subclasses. This makes it easier for us to expand our own classes
and even modify them.

Java gives the facility of dynamically linking new class libraries, methods, and objects. It is highly
dynamic as it can adapt to its evolving environment.
Java even supports functions written in other languages such as C and C++ to be written in Java
programs. These functions are called “native methods”. These methods are dynamically linked at
runtime.

4. WHAT IS IDE?

➭ Integrated development environments (IDE) are applications that facilitates the development of other
applications. Designed to encompass all programming tasks in one application, one of the main benefits
of an IDE is that they offer a central interface with all the tools a developer needs, including:

 Code editor: Designed for writing and editing source code, these editors are distinguished from
text editors because work to either simplify or enhance the process of writing and editing of code
for developers
 Compiler: Compilers transform source code that is written in a human readable/writable
language in a form that computers can execute.
 Debugger: Debuggers are used during testing and can help developers debug their application
programs.
 Build automation tools: These can help automate developer tasks that are more common to save
time.

In addition, some IDEs may also include:

 Class browser: Used to study and reference properties of an object-oriented class hierarchy.
 Object browser: Used to inspect objects instantiated in a running application program.
 Class hierarchy diagram: Allows developers to visualize the structure of object-oriented
programming code.

The IDE may be a stand-alone application, though it might also be included as part of one or more
compatible applications.

5. WHAT IS PROGRAM DEVELOPMENT LIFE CYCLE?

➭ Program Development Life Cycle (PDLC) is a systematic way of developing quality software. It
provides an organized plan for breaking down the task of program development into manageable
chunks, each of which must be successfully completed before moving on to the next phase.

The program development process is divided into the steps discussed below:

1. Defining the Problem –


The first step is to define the problem. In major software projects, this is a job for system analyst,
who provides the results of their work to programmers in the form of a program specification.
The program specification defines the data used in program, the processing that should take
place while finding a solution, the format of the output and the user interface.
2. Designing the Program –
Program design starts by focusing on the main goal that the program is trying to achieve and
then breaking the program into manageable components, each of which contributes to this goal.
This approach of program design is called top-bottom program design or modular programming.
The first step involve identifying main routine, which is the one of program’s major activity.
From that point, programmers try to divide the various components of the main routine into
smaller parts called modules. For each module, programmer draws a conceptual plan using an
appropriate program design tool to visualize how the module will do its assign job.
Program Design Tools:
The various program design tools are described below:

 Structure Charts – A structure chart, also called Hierarchy chart, show top-down design
of program. Each box in the structure chart indicates a task that program must
accomplish.
 Algorithms –
An algorithm is a step-by-step description of how to arrive at a solution in the most
easiest way. Algorithms are not restricted to computer world only. In fact, we use them
in everyday life.
 Flowcharts –
A flowchart is a diagram that shows the logic of the program.
 Decision tables –
A Decision table is a special kind of table, which is divided into four parts by a pair of
horizontal and vertical lines.
 Pseudocode –
A pseudocode is another tool to describe the way to arrive at a solution. They are
different from algorithm by the fact that they are expressed in program language like
constructs.
 Coding the Program –
Coding the program means translating an algorithm into specific programming
language. The technique of programming using only well defined control structures is
known as Structured programming. Programmer must follow the language rules,
violation of any rule causes error. These errors must be eliminated before going to the
next step.
 Testing and Debugging the Program –
After removal of syntax errors, the program will execute. However, the output of the
program may not be correct. This is because of logical error in the program. A logical
error is a mistake that the programmer made while designing the solution to a problem.
So the programmer must find and correct logical errors by carefully examining the
program output using Test data. Syntax error and Logical error are collectively known as
Bugs. The process of identifying errors and eliminating them is known as Debugging.
 Documenting the Program –
After testing, the software project is almost complete. The structure charts, pseudocodes,
flowcharts and decision tables developed during the design phase become
documentation for others who are associated with the software project. This phase ends
by writing a manual that provides an overview of the program’s functionality, tutorials
for the beginner, in-depth explanations of major program features, reference
documentation of all program commands and a thorough description of the error
messages generated by the program.
 Deploying and Maintaining the Program –
In the final phase, the program is deployed (installed) at the user’s site. Here also, the
program is kept under watch till the user gives a green signal to it.
Even after the software is completed, it needs to be maintained and evaluated regularly.
In software maintenance, the programming team fixes program errors and updates the
software.
Here is the list of links I’ve visited upon searching for answers for indicated questions, respectively.

https://www.sciencedirect.com/topics/computer-science/java-programming-language

https://www.javatpoint.com/history-of-java

https://techvidvan.com/tutorials/features-of-java-programming-language/

https://www.veracode.com/security/integrated-development-environment

https://www.geeksforgeeks.org/software-engineering-program-development-life-cycle-pdlc/

You might also like