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

  Task 1university grading system maintains number of tables

task 1university grading system maintains number of tables to store retrieve and manipulate student marks. these tables

  Method to calculate all primes in the range [2..n]

One commonly used method to calculate all primes in the range [2..n] is to start with the number 2, mark it as prime, and mark all its multiples (excluding itself) as not prime. Then, we find the next smallest unmarked number, mark it as prime, and m..

  Create the look for two gui applications

Create the look for two GUI applications. You WILL NOT be getting the applications to do anything. We are only interested in seeing how well you can arrange the GUI components onto the window

  Primary care-secondary care and tertitary care

Discuss the differences among primary care, secondary care, and tertitary care and the 6 C's of primary care

  Elliptic curve encryption

write a program to implement Elliptic Curve encryption/decryption and program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).

  How many numbers do you want to enter

Write a program that asks the user "How many numbers do you want to enter?" With that value, create an array that is big enough to hold that amount of numbers (integers).

  Your task in this assignment is to develop a graphical user

your task in this assignment is to develop a graphical user interface based java program that can communicate with a

  Using a link list implementation

Using a link list implementation, simulate the war car game. The program should read an input of several line of card values and output the winner and the number of rounds it takes.

  Define an adt for character strings.

Define an ADT for character strings. Your ADT should consist of typical functions that can be performed on strings, with each function defined in terms of its input and output. Then define two different physical representations for strings.

  Hypothetical situation

Hypothetical Situation - A company lowers its price of an economy car a small amount   ($15,000 to $14,000) Sales go from 10,000 units to 50,000 units. Another company lowers its price on a luxury car a large amount ($80,000 to $40,000). Its sales go..

  Create an array of date objects

Create an array of Date objects of size 4. Initialize the array by using a loop. In the loop, use the Scanner.nextLine() method to input a date as a string, convert it to a date by using the toDate() method, and assign the result to an element in ..

  Give an example of an exception

A. Give an example of an exception that could be generated outside your code but caught within your code

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