Question: Java Programming problem: Given a text file with the following series of characters: A B C D E F G H The characters are not

Java Programming problem:

Given a text file with the following series of characters:

A

B C D E F G H

The characters are not strings, but are simple classes that contain a string variable, with the character given being a name. Meaning, A is not a string, but is the String name of an object.

Create a Linked List class and a main program that creates a Linked List storing those characters. Note, the Linked List must be a Generic Type Linked List, and the program must be able to create a Linked List of any size, so a text file with more or less characters must also work with the program. The characters must be stored as String variables in the Linked List. The program must also include a method that can be given a String and search the Linked List to return the object instance who's name matches the String.

Basically, you're given an arbitrary number of letters in a text file, and your program has to create a Linked List and add all those characters into the linked list, each character being a node within the list. The object class is just a simple object that has a name variable but must be able to have extra fields added to it. The search method is given a letter and searches the linked list to find the object with a name that matches the given letter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!