Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: This is an individual assignment. Answers should be your own work You are expected to code this through the requirements and design, then writing

image text in transcribed

image text in transcribed

Instructions: This is an individual assignment. Answers should be your own work You are expected to code this through the requirements and design, then writing the code. yourself from scratch by thinking Introduction: This project creates a custom linked list structure. It serves as an exercise in working with linked sts and nodes. Overview Suppose the names "Bob", "Dan", and "Ben", are added, the result is head-->l B |-- Ben l-- Bobl-- D l-- Dan If the names "Deb" and "Sarah" are added, it looks like this: >| Ben |-->| Bob |-->| D >ISarah|- If "Deb" and "Sarah" are deleted, the list should look like the first list again. Details: Create a Java class called NameList (not generic) that stores names and implements the structure shown above. Note that the names are kept in sorted order. Letter nodes are always uppercase. Lowercase names will follow uppercase names in normal sorted order. You may *not* use Java's Linkedlist class. You should cre ate your own nodes and link them together as shown in the illustration. Your class should support the following methods. 20 points new name. Names must be at least 2 characters long. Adds the letter node if not already present. 20 points remove - Removes a name. If the name is the last one for a letter, the letter node should also be removed. 20 points removeletter Removes a letter and all names for that letter. 20 points find Finds a name by traversing the nodes. 10 points toString - Returns a string of the list formatted as shown below using the first list above as an example: Ben Bob Dan 10 points main Demonstrates the methods of your Namelist class

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

What are the formulas for number 11/12

Answered: 1 week ago

Question

1. Discuss the four components of language.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago