Create a gui front end for your bubble sort program

Assignment Help JAVA Programming
Reference no: EM13941772

Design and implement a Java program which sorts a 10 element integer array using the bubble sort process. The elements of the array to be sorted should be supplied by the user (assume the user will not input duplicates).

Remember to write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Remember also that by convention, class names commence with a capital letter.

Create a GUI front end for your bubble sort program. The result should look something like that presented in Figure 1. You may use any graphic element to create your display - JOptionPanes are the easiest and most basic tools available to you, but you may also experiment with additional GUI controls such as JFrames, JPanels, etc. I would advise you to use objects from the Swing library (those objects begin with 'J') as opposed to objects from the AWT library - Swing objects are a little easier to use and are ultimately more flexible and robust than AWT objects.

In the example below, there are 10 text fields on a JFrame background to allow input of array elements (remember that for each text field you must press the carriage return key to invoke the listener). When the array has been populated, we press the start button, at which point the given array is output as a label. We then sort the result and output the sorted array.

Hint: Do not attempt to make the GUI too sophisticated. Just concentrate on producing a working result (although sound programming techniques should still be applied).

2184_pp.png

Figure 1: Bubble sort GUI (partial example)

Remember to write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Remember also that by convention, class names commence with a capital letter.

As with all programs I write, I should provide a well-structured solution that is easy to read. I should use meaningful identifier names and I should provide useful comments.

Reference no: EM13941772

Questions Cloud

Ferraris of work design : Edwin Lawler, Management Professor at the University of Southern California, states, "Teams are the Ferraris of work design. They're high performance but high maintenance and expensive." Do you agree? Why or why not?
Drawbacks or risks of living in flat world of globalisation : What would be some of the key drawbacks or risks of living in the flat world of Globalisation 3.0 as Friedman describes it?
Creating a gui front end for a pizza ordering program : Kindly remember to write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Please remember also that by convention, class names commence with a capital letter.
Applied or theoretical concept of e-business : Your essay will address an applied or theoretical concept of e-business.. The suggested length is approximately 3-4 pages
Create a gui front end for your bubble sort program : Design and implement a Java program which sorts a 10 element integer array using the bubble sort process. The elements of the array to be sorted should be supplied by the user (assume the user will not input duplicates).
Describing the legal and ethical issues tied to the case : Research an organization that has had a lawsuit filed against them for wrongful termination. Write a 350-word summary describing the legal and ethical issues tied to the case
Summary on the importance of employee rights : Select the best actions to take. Write a 350-word summary on the importance of employee rights
How do native americans accept the dawes act : How do Native Americans accept the Dawes Act? What are their primary issues or complaints concerning the act and what is the final impact of the Dawes Act on Indian populations?
Johnstone company manufactures two products : Johnstone Company manufactures two products, Board 12 and Case 165. Johnstone's overhead costs consist of setting up machines, $1,600,000; machining, $3,600,000; and inspecting, $1,200,000.

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Relation between the objects

What will be said about the relation between the objects object1 and object2 - Make this program using java programming.

  Write a class encapsulating a pc-based game

Write a class encapsulating a PC-based game, which inherits from Game. A PC-bases game has the following additional attributes: the minimum megabytes of RAM needed to play the fame, the number of megabytes needed on the hard drive to install the fame..

  How are data structures managed and organized in language

How are data structures managed and organized in this language. How does the management or syntax of data structures in this language differ from how data structures are handled in other language

  Create the working applet to compute tax

Write down a java applet. Your applet assits to find out how much federal tax we require to pay suppose the tax rate is 12%. Create and implement the working applet to compute tax.

  Apply the bfs algorithm and show the output

Apply the BFS algorithm and show the output and Apply the DFS algorithm and show the output - Define the necessary functions to implement the search problem. This should include a function that takes a vertex as input and returns the set of vertice..

  Write a bag class with a generic type

Write a Bag class with a generic type. Write a class such as item that has a name and price. Add objects of item to the bag and find the average and the total of the price of all items in the bag.

  Create a class named movie that can be used with a video

extend above with a Rental class. This class should store a Movie that is rented, an integer representing the ID of the customer who rented the movie, and an integer indicating how many days late the movie is.

  Write a program in java to perform lzw decoding

Write a program in java to perform LZW decoding. It should read and write textual lists of integers.

  Program that lets the user enter four quarterly sales

The figures should be stored in a two-dimensional array. Once the figures arc entered, the program should display the following data for each quarter:

  Write a mathematical recursive definition

Write a mathematical, recursive definition of p(n) - Prove that your answer to Part a is correct by using mathematical induction.

  Create a class in java to enable its object to be persiste

How do you create a class in Java to enable its object to be persistent? What are Java data streams and how are they used to facilitate storage and retrieval of persistent objects?

  Write down a java program which prints out division by zero

write a java program that prints out division by zero and array out of bounds exceptions when a user attempts to find

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd