Write a program that lets the user enter numbers from a graphical user interface and display them in a text area, as shown below. Use a linked list to store the numbers. Do not store duplicate numbers.
Enter a number and when you press the enter key, have it added to the linked list and display it in the text area.
Add the buttons Sort, Shuffle, and Reverse to sort, shuffle, and reverse the list.
There are methods you can use to sort, shuffle, and reverse the list. You do not create you own. There is also a method contains that will tell you if an item is in the list.
Use a ListIterator to display the numbers in the text area.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

public class HW extends JFrame implements ActionListener{

    private JTextField input;
    private JTextArea output;
    private JButton [] buttons;
    private LinkedList<Integer> ll;
    public HW()   {
       setTitle("Collection HW");
       // set main layhout
       setLayout(new BorderLayout());
       // set up input panel
       JPanel iPanel = new JPanel();
       iPanel.add(new JLabel("Enter a number"));
       input = new JTextField(10);
       // we need this for enter action
$18.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats