Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could someone help me with this in JAVA please. It should be a single .java file that contains the entire program. ReadFile Create a linked

Could someone help me with this in JAVA please. It should be a single .java file that contains the entire program.

image text in transcribed

ReadFile Create a linked list from an input file (input.txt) that contains an even number of first names. The number of items in the file is unknown. Split Create a split function that divides the newly created linked list into two equal sublists: myList1 and myList2. For example, originally you would point to (John, Jack, Jill, Jim). After the split, myList1 would point to john and jack and myList2 would point to jill and Jim. Traverse Displays the contents of the list Merge Merges then split list into a single lit Hint: You need to define 3 classes for this assignment Class Node { //Instance variables and methods only. Nothing should be static. //Need getter and setter methods } Class LinkedList { //Instance variables and methods only. Nothing should be static. //Need getter and setter methods } Class Driver { Public static void main(String [] args) { } } The call to the split method should look something like this LinkedList myList1=new LinkedList();| Linked List myList2= myList1.split(); The call to the merge method should look like this myList1.merge(myList2); //myList1 will be the only list

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions