Write a complete subclass of simplelist named listset where


Write a program to maintain a list of names with associated telephone numbers. Your user interface should appear like the one below:

1903_Telephone numbers.png

The two JTextField allow you input the name and phone number. Initially, they are blank.

The three buttons behave as described below:

ADD a click on this button causes the "NAME" and "PHONE" you input is added to a list and the two textflieds are back to be blank.

DISPLAY a click on this button causes to print out all the values in the list in the terminal window. However, there are no two lines are identical. See the picture below:

1773_Telephone numbers1.png

QUIT a click on this button causes the terminal of the program. System.exit(0) will work.

HINTS:

Write a complete subclass of SimpleList named ListSet where the ‘add' method is overridden such that a ListSet will never contain duplicate items. The ListSet must use content equality to determine whether it contains an item. The ListSet ‘add' method will not ‘add' an item if the ListSet already contains the item and will return ‘false'. If the ListSet doesn't contain the item, then the ‘added' item is inserted as the last item in the ListSet and the add method returns ‘true'. In either case, the iterator is positioned at the end of the ListSet after the ‘add' method is executed.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a complete subclass of simplelist named listset where
Reference No:- TGS0820259

Expected delivery within 24 Hours