Java Programming Essay

Masters
Essay
Technology
Pages 4 (1004 words)
Download 0
The DrawWindow class in Java's element package is a very useful tool and a program is written to demonstrate its capability in animation. There are methods for using arcs, lines, rectangles, circles and other forms using these basic features. Also, colors can be included through the java.awt package.

Introduction


In the second screenshot, a loop has been created so that the car object drawn in the first task is repeatedly produced in a line. Also a rectangle is drawn to indicate the presence of road below the cars.
Since a composite object was required, I created a commom composite object of a car having a roof, a body and two wheels. I also added colors to it, formed efficiently many such objects and showed some animation.
I have learnt from this assignment of how useful the elements package is in creating graphics in the absence of applets. The shapes like rectangle, circles, etc are available through it for simple animations. I have also understood well of the co-ordinate values used in drawing objects. Some functions like timers are also learnt in this process.
The easiest part is creating a single composite object and also using it to create many. The tough part was in assigning the parameters of the moving objects and its color parameters for producing animation.
...
Download paper
Not exactly what you need?

Related papers

Java programs
The application then turns to user mode. It asks the number of tickets purchased. Based on the number entered it asks for the ticket numbers. Another file called 'UserFile.txt' is created that holds all the numbers entered by the user. The numbers are then checked against the winning number and appropriate results are announced. The application then asks if another user wants to try his own. The…
Java Program ShopKeeper
Some utility methods like getStockValue() and getNeededItems() are also there to return the over all value of the stock and the list of needed items respectively.…
Systems Programming
If you have not completed the work by the due date please hand in whatever you have done.…
Object Oriented Programming
OOP is an acronym for Object Oriented Programming. Traditionally, a computer program was seen as a collection of functions or procedures or simply a list of instructions whereas with the advent of Object Oriented programming, each program may be seen as comprising a collection of individual units, or objects, that act on each other. In simpler terms, it is a type of programming in which…
Programming
A constructor is constructed by the class in case it is not written by the programmer. In this case time() is the default constructor which will be used in case time( int hh, int mm, int ss) is not used.…
Java Programming
Here we have used the access specifier as public which tells us that the class can be accessed anywhere in the program. In the same line we have used the concept of Inheritance, which is the process by which one object acquires the properties of another object. By the use of extends keyword we inherit all the functionality provided in the class JFrame, which is used to create a frame using Swings.…
Java Programming Essay
In the second screenshot, a loop has been created so that the car object drawn in the first task is repeatedly produced in a line. Also a rectangle is drawn to indicate the presence of road below the cars.…