This Sonia.. I' m doing my Computer Degree in India, Mumbai...
If any java programmers here pls help me to do this 2 questions..
If you finish these 2 tasks mail me firstname.lastname@example.org
Questions as follows
GUI, Event Handling, Exception Handling, Audio
An interface has two buttons labelled “Create” and “Exit”. Each time a user presses the “Create”
button; two circles appear at random positions on the screen. The circles need not be of the same
size. Once the user presses the “Exit” button, the program is to display the number of times that:
*** The areas of the two circles do not overlap.
*** The areas of the two circles overlap.
*** The areas of the two circles totally overlap.
In each case the system is to emit an appropriate audio indicating the nature of circle overlaps (the
three different scenarios described above). Note that the “Create” button may be pressed a number
of times before the “Exit” button is pressed which displays the result and ends the program.
Develop a Java program to implement this specification.
Methods, String, Thread, File Handling, Exception Handling
A user is interested in an alphabetical list of all the 4-letter words which have been used in a text
file. To achieve this, a program is required:
*** To read the lines from the text file and transfer all the words into a string array whose size
should not exceed 10.
*** Another part of the program takes the words, one at a time, from the string array and adds it into
an ArrayList, provided it is a 4-letter word. Duplicate words are not allowed.
*** In addition, the program should be able to provide an alphabetical list of these 4-letter words.
Take advantage of the thread feature of Java to implement this requirement.
Write this program using Java.