Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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 p 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. rocessing. Finally, terminate insertions into the list when the sentinel -9999 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 L C Add a phone number. The program prompts for a name, and a telephone number. Look up a number. The program prompts the user to input a name 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. Save the list to a file, as described below Quit without saving, reverts back to the last saved version Exit; save the list and exit the program Q 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

what is a peer Group? Importance?

Answered: 1 week ago