Program to maintain list of names with associated numbers

Assignment Help JAVA Programming
Reference no: EM13552331

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.

Reference no: EM13552331

Questions Cloud

Explain compare the total work done by the system : For an isothermal expansion of 1.00 mole of ideal gas at 399K and initially at 16.00bar pressure, compare the total work done by the system if the expansion is carried out
Estimate how hard does the beam push inward on the wall : A uniform 8.25m , 1750 kg beam is hinged to a wall and supported by a thin cable attached 2.00m from the free end of the beam, How hard does the beam push inward on the wall
Evaluate the force between those two wires : A 7.5-m long extension cord carries a current of 12 amps. The cord is made of two wires, Find the force between those two wires
Calculate the mass of the bug and rod : A thin uniform rod has a length of 0.520 and is rotating in a circle on a frictionless table. calculate the mass of the bug and rod
Program to maintain list of names with associated numbers : Write a complete subclass of SimpleList named ListSet where the ‘add' method is overridden such that a ListSet will never contain duplicate items - Write a program to maintain a list of names with associated telephone numbers.
Estimate the range of amplitue of the resulting wave : Two periodic waves interfere somehow. Both waves have the same frequency and wavelength. what is the range of amplitue of the resulting wave
Estimate what will the person hear : Suppose someone is running towards a siren which is at rest. The siren emits a frequency of 400 Hz. What will the person hear
Estimate the power generated by the applied force : A horizontal force of 50 N pushes a box that weighs 75 N across the floor at a constant speed. What is the power generated by the applied force
What is the rms-average magnitude of the momentum : Oxygen, modeled as an ideal gas, is in a container and has a temperature of 63.9°C. What is the rms-average magnitude of the momentum

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a java program that reads a five-line address

Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.

  Java application to generate three-digit random number

Write a Java application that generates a 3-digit random number 100 times. Display the output for each of the generated numbers and the sum of all 100 numbers.

  Creates pet objects from data read from the keyboard

The assignment is to write a program that creates Pet objects from data read from the keyboard. Store these objects into an instance of ArrayList.

  1 gqueuea queue is an ordered collection of items in which

1 gqueuea queue is an ordered collection of items in which the removal of items is restricted to the fifo rst in rst

  Temporarily move to the street so that the

Driveway is a "last-in, first-out" stack. Of course, when a car owner retrieves a vehicle that wasn't the last one in, the cars blocking it must temporarily move to the street so that the requested vehicle can leave

  Explain the legal doctrine benefits balancing

Explain the legal doctrine "Benefits Balancing" as it pertains to applying the reasonable standard of care doctrine in the medical fields. Does a defense that the majority of physicians normally do not give a particular diagnostic test in the normal ..

  An infix to postfix method for my java program.

an infixToPostFix method for my java program. The method must work with stacks and it should take a string as parameter. The method should be able to convert to postfix mathematic expressions such as: (12 + 4) - 23(9-6)/12. Treat the parenthesis as l..

  Create online store web site

the Java and JSP source codes and SQL scripts for creating a database in Oracle - any configuration files used

  Recommend at least five factors which programmers must

propose at least five factors that programmers should consider when choosing between data types such as those used in c

  Write program that convert us dollar into canadian dollar

Design a new class named Polygon that extends GeometricObject and implements Comparable. The number of sides in polygons varies, you cannot use a certain number of data fields for sides of a polygon - Write a program that passes an unspecified numb..

  Write a blog article for a codingtechnical community

write a blog article for a codingtechnical community blog.the theme is general c or java. choose any subject under this

  Explain where the following method invocations

Explain where the following method invocations are most likely to be found in a program for dealing with census data organized using the Model, View, Controller (MVC) design pattern. Choices are zero or more of Model, View, and Controller. Be sure to..

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