You are on page 1of 12

MIDTERM REPORT

ON

BRICK GAME
INTRODUCTION TO JAVA
Java is a high-level, third-generation programming language, like C, Fortran, Smalltalk, Perl,
and many others. It is a platform for distributed computing – a development and run-time
environment that contains built-in support for the World Wide Web.

Java is a powerful object-oriented programming language introduced by Sun Microsystems in


1995, which has built-in support to create programs with a graphical user interface (GUI),
utilize the Internet, create client-server solutions, and much more. Programs written in Java
can run, without change, on any of the common computer operating systems Windows
95/NT, Macintosh, and Unix. A variant of Java programs called applets can be embedded
inside a web page and execute on the computer that is viewing the page, automatically and in
a secure environment.

As a language, Java is closely related to C++, which is also object-oriented but retains a lot of
idiosyncrasies inherited from its predecessor language C. Java has removed the inconsistent
elements from C++, is exclusively object-oriented, and can be considered a modern version
of C++. Because of its logical structure Java has quickly become a popular choice as a
teaching language, and because of its extensive Internet support and the promise of writing
programs once and using them on every operating system Java is becoming more and more
accepted in industry.

The original and reference implementation Java compilers, virtual machines, and class
libraries were originally released by Sun under proprietary licenses. As of May 2007, in
compliance with the specifications of the Java Community Process, Sun relicensed most of its
Java technologies under the GNU General Public License. Others have also developed
alternative implementations of these Sun technologies, such as the GNU Compiler for Java
(bytecode compiler), GNU Classpath (standard libraries), and IcedTea-Web (browser plugin
for applets).

The latest version is Java 8 which is the only version currently supported for free by Oracle,
although earlier versions are supported both by Oracle and other companies on a commercial
basis.
HISTORY OF JAVA

Java development began at Sun Microsystems in 1991, the same year the World Wide Web
was conceived. Java’s creator, James Gosling, did not design Java for the Internet. His
objective was create a common development environment for consumer electronic devices
which was easily portable from one device to another. The development team began by using
C++, a high-level programming language, as their model but later altered it so as to have
simplified syntax, increased robustness, better security features and greater portability across
different operating system platforms. This effort evolved into a language, code named Oak
and later named Java that retains much of the syntax and power of C++, but is simpler and
more platform independent.

Java can be used to write computer applications that crunch numbers, process words, play
games, store data or do any of the thousands of other things computer software can do. It is
worthwhile to remember that though java is quite similar to C++. It is a different language
with different characteristics.

1. Both programs are composed of one or more files with the “CLASS” extension and
having machine independent Java Byte code.
2. Both require JVM (Java Virtual Machine) to execute these Byte codes.

JAVA PLATFORM

The evolution of the Java platform and supporting technologies has proceeded at quite a rapid
pace. An indication to this quick maturation is that commercial applications have already
been developed and are being deployed in Java. Some issues affecting this move to Java are:

Reduce Development Time and Cost

Java takes advantage of OOPS features. Furthermore, it has an edge over C++ for developing
robust higher level software quickly.

Commercial class libraries

The Java language includes numerous built-in classes, which forms the foundation for all
Java programs.
Component Based Applications

Java is considered to be the foundation to a new breed of productivity applications – such as


word processors or spreadsheets – that are based on the object or component programming
model. In this model, applications can be designed as a collection of downloadable
components rather than as a single shrink-wrapped software program. This in turn helps to
face challenges in performance, usage monitoring and licensing.

The problem with distributing executable programs through web pages is that computer
programs are very closely tied to specific hardware and operating system they run on. A
Windows programs will not run on a computer that only runs DOS. A Mac application can’t
run on a Unix workstation. VMS code can’t be executed on an IBM mainframe, and so on.
Therefore major commercial applications like Microsoft Word and Netscape Navigator have
to be written almost separately for all the different platforms they run on. (A platform is
loosely defined computer industry buzzword that typically means some combination of
hardware and system software that will mostly run all the same software.) Netscape
Navigator is one of the most cross-platform compatible of all major applications, yet it only
runs on a small number of platforms. Java solves the problem of platform independence by
using byte code.

FEATURES OF JAVA
1) Compiled and Interpreter:- has both Compiled and Interpreter Feature Program of java
is First Compiled and Then it is must to Interpret it .First of all The Program of java is
Compiled then after Compilation it creates Bytes Codes rather than Machine Language.

Then After Bytes Codes are Converted into the Machine Language is Converted into the
Machine Language with the help of the Interpreter So For Executing the java Program First
of all it is necessary to Compile it then it must be Interpreter

2) Platform Independent:- Java Language is Platform Independent means program of java


is Easily transferable because after Compilation of java program bytes code will be created
then we have to just transfer the Code of Byte Code to another Computer.

This is not necessary for computers having same Operating System in which the code of the
java is Created and Executed After Compilation of the Java Program We easily Convert the
Program of the java top the another Computer for Execution.
3) Object-Oriented:- We Know that is purely OOP Language that is all the Code of the java
Language is Written into the classes and Objects So For This feature java is Most Popular
Language because it also Supports Code Reusability, Maintainability etc.

4) Robust and Secure:- The Code of java is Robust and Means of first checks the reliability
of the code before Execution When We trying to Convert the Higher data type into the Lower
Then it Checks the Demotion of the Code the It Will Warns a User to Not to do this So it is
called as Robust.

Secure : When We convert the Code from One Machine to Another the First Check the Code
either it is Effected by the Virus or not or it Checks the Safety of the Code if code contains
the Virus then it will never Executed that code on to the Machine.

5) Distributed:- Java is Distributed Language Means because the program of java is


compiled onto one machine can be easily transferred to machine and Executes them on
another machine because facility of Bytes Codes So java is Specially designed For Internet
Users which uses the Remote Computers For Executing their Programs on local machine
after transferring the Programs from Remote Computers or either from the internet.

6) Simple Small and Familiar:- is a simple Language Because it contains many features of
other Languages like c and C++ and Java Removes Complexity because it doesn’t use
pointers, Storage Classes and Go to Statements and java Doesn’t support Multiple Inheritance

7) Multithreaded and Interactive:- Java uses Multithreaded Techniques For Execution


Means Like in other in Structure Languages Code is Divided into the Small Parts Like These
Code of java is divided into the Smaller parts those are Executed by java in Sequence and
Timing Manner this is Called as Multithreaded In this Program of java is divided into the
Small parts those are Executed by Compiler of java itself Java is Called as Interactive
because Code of java Supports Also CUI and Also GUI Programs

8) Dynamic and Extensible Code:- Java has Dynamic and Extensible Code Means With the
Help of OOPS java Provides Inheritance and With the Help of Inheritance we Reuse the Code
that is Pre-defined and Also uses all the built in Functions of java and Classes

9) Distributed:- Java is a distributed language which means that the program can be design
to run on computer networks. Java provides an extensive library of classes for
communicating ,using TCP/IP protocols such as HTTP and FTP. This makes creating network
connections much easier than in C/C++. You can read and write objects on the remote sites
via URL with the same ease that programmers are used to when read and write data from and
to a file. This helps the programmers at remote locations to work together on the same
project.

10) Secure: Java was designed with security in mind. As Java is intended to be used in
networked/distributor environments so it implements several security mechanisms to protect
you against malicious code that might try to invade your file system.

11) Architectural Neutral: One of the key feature of Java that makes it different from other
programming languages is architectural neutral (or platform independent). This means that
the programs written on one platform can run on any other platform without having to rewrite
or recompile them. In other words, it follows 'Write-once-run-anywhere' approach.

Java programs are compiled into byte-code format which does not depend on any machine
architecture but can be easily translated into a specific machine by a Java Virtual Machine
(JVM) for that machine. This is a significant advantage when developing applets or
applications that are downloaded from the Internet and are needed to run on different
systems.

12) Portable : The portability actually comes from architecture-neutrality. In C/C++, source
code may run slightly differently on different hardware platforms because of how these
platforms implement arithmetic operations. In Java, it has been simplified.

Unlike C/C++, in Java the size of the primitive data types are machine independent. For
example, an int in Java is always a 32-bit integer, and float is always a 32-bit IEEE 754
floating point number. These consistencies make Java programs portable among different
platforms such as Windows, Unix and Mac .

13) Interpreted : Unlike most of the programming languages which are either complied or
interpreted, Java is both complied and interpreted The Java compiler translates a java source
file to bytecodes and the Java interpreter executes the translated byte codes directly on the
system that implements the Java Virtual Machine. These two steps of compilation and
interpretation allow extensive code checking and improved security.

14) High performance: Java programs are complied to portable intermediate form know as
bytecodes, rather than to native machine level instructions and JVM executes Java bytecode
on. Any machine on which it is installed. This architecture means that Java programs are
faster than program or scripts written in purely interpreted languages but slower than C and
C++ programs that compiled to native machine languages.

Although in the early releases of Java, the interpretation of by bytecode resulted in slow
performance but the advance version of JVM uses the adaptive and Just in time (JIT)
compilation technique that improves performance by converting Java bytecodes to native
machine instructions on the fly.
INTRODUCTION TO BRICK GAME

Brick game is a Breakout clone in which the player must smash a wall of bricks by deflecting
a bouncing ball with a paddle. Here is how simple brick game works. You have layers of
colored bricks and a tossed up ball with which to break the layers. Controlling the momentum
of the ball (usually a white ball) is a paddle which you have to control. The paddle may move
horizontally and is controlled with the computer's mouse or the touch of a finger (in the case
of touch screen). When the ball is bounced up by the paddle, it will hit a brick and then the
brick is gone. After that the ball will come down, if the paddle misses the ball, game is over.
Users can use the gamepad to control the position of paddle. At the same time, there will be
music outputs to match different game effects. The basic user interface may be similar to
figure. If there is enough time, the brick can be made more complex. When all the bricks
have been destroyed, the player advances to a new level. There are 34 levels. There are many
versions of brick breaker, some in which you can shoot flaming fireballs or play with more
than one ball if the player gets a power up. For example, we can hide bonus in some brick
and once that brick is bounced, the bonus will jump out on screen the game score will
increase greatly.
The game needs a controller to receive the operation signals from users and control the
breaker. We choose the PC game controller to realize the function. The controller is shown in
figure3. The game is for one player. So, we do not need two controllers for two players. If
time permits, we can also make the game as a competition between two players.
INTRODUCTION TO NETBEANS

NetBeans is a software development platform written in Java. The NetBeans Platform allows
applications to be developed from a set of modular software components called modules.
Applications based on the NetBeans Platform, including the NetBeans integrated
development environment (IDE), can be extended by third party developers.

The NetBeans IDE is primarily intended for development in Java, but also supports other
languages, in particular PHP, C/C++ and HTML5.

NetBeans is cross-platform and runs on Microsoft Windows, Mac OS X, Linux, Solaris and
other platforms supporting a compatible JVM.

The editor supports many languages from Java, C/C++, XML and HTML, to PHP, Groovy,
Javadoc, JavaScript and JSP. Because the editor is extensible, you can plug in support for
many other languages.

The NetBeans Team actively supports the product and seeks feature suggestions from the
wider community. Every release is preceded by a time for Community testing and feedback. [5]
Over 18 million downloads of the NetBeans IDE to date, and over 800,000 participating
developers, the NetBeans project is thriving and continues to grow.

A new version was released 8.2/october 3,2016.NetBeans IDE is the official IDE for Java 8.
With its editors, code analyzers, and converters, you can quickly and smoothly upgrade your
applications to use new Java 8 language constructs, such as lambdas, functional operations,
and method references.

Netbeans Platform

The NetBeans Platform is a framework for simplifying the development of Java Swing
desktop applications. The NetBeans IDE bundle for Java SE contains what is needed to start
developing NetBeans plugins and NetBeans Platform based applications; no additional SDK
is required.

Applications can install modules dynamically. Any application can include the Update Center
module to allow users of the application to download digitally signed upgrades and new
features directly into the running application. Reinstalling an upgrade or a new release does
not force users to download the entire application again.
The platform offers reusable services common to desktop applications, allowing developers
to focus on the logic specific to their application. Among the features of the platform are:

 User interface management (e.g. menus and toolbars)

 User settings management

 Storage management (saving and loading any kind of data)

 Window management

 Wizard framework (supports step-by-step dialogs)

 NetBeans Visual Library

 Integrated development tools


REFERENCES

1. http://www.makeuseof.com/tag/simple-brick-breaker-the-old-classic-game-remains-
as-addictive-as-it-was-before-iphone/
2. http://www.analog.com/media/en/technical-documentation/data-sheets/SSM2603.pdf
3. http://free-electrons.com/doc/embedded_linux_audio.pdf
https://en.wikipedia.org/wiki/Java_(programming_language)
4. https://en.wikipedia.org/wiki/NetBeans
5. https://netbeans.org/

You might also like