Project Management

  1. Without using Java Collections/Containers, write a program that reads/stores integers into a linked list, storing them in the order read/inserted.
    Add an integer in the list only if it isn’t in the list. In addition, create a method to delete a value (node) from the list; if the value is not in the list,
    print out an error message stating that it was not found and continue processing. Finally, terminate insertions into the list when the sentinel -9999
    is encountered and display the contents of the list. In your sample run, be sure to demonstrate insertion, deletion, and displaying the contents of
    the list.
  2. Design and implement a program using a linked list class from/using the Java Collections/Containers to create, manage, and retrieve information
    on a self-reorganizing list of names and telephone numbers.
    When a node is created its ct is set to zero and it is placed at the first of the list. Every time a node is referenced, its ct is increased by 1 and when
    ct reaches 3 (a magic number?) the node should be deleted from its current place on the list, replaced at the head of the list, and its ct reset to 0.
    The program should recognize three commands, requested by the prompt CMD:
    A Add a phone number. The program prompts for a name, and a telephone number.
    L Look up a number. The program prompts the user to input a name.
    C Change a phone number. The program prompts with name and a new phone number, printing an error message if the name does not
    exist in the list.
    S Save the list to a file, as described below
    Q Quit without saving, reverts back to the last saved version
    E Exit; save the list and exit the program
    The program should initialize itself from a text file of names and phone numbers (which contains a list of names and phone numbers that may
    initially be empty). When the command S is entered, the program should rewrite the file with the current form of the list.
    Additional Requirements:
    a. Do not use the Scanner class for any part of this assignment, which includes user I/O and file I/O / file processing
    b. Perform the following analysis: what is the order of magnitude to perform each operation enumerated above?
    Finally, 20% extra credit for using object serialization for saving/retrieving phone data.

Sample Solution