Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Linked list approach, read the files and (add or delete specified records using linked list) and output the updated list to p3artists.txt file: Introduction:

Using Linked list approach, read the files and (add or delete specified records using linked list) and output the updated list to "p3artists.txt" file:

Introduction:

We continue with the Bag data structure. However, in this project we focus on the representation of the Bag structure using singular linked list as described in chapter 3 of your textbook. Please study the sample programs LinkedBag.java and LinkedBagDemo.java.

Part A.

Data Files: p1artists.txt and p2changes.txt.

Assignment:

1) Use the Linked approach to update p1artists.txt through p2changes.txt to produce p3artists.txt.

If A : Add record using linked list

If D : Delete record using linked list

2) Use System.nanoTime() to find the time spent on this approach

Artist.java:

public class Artist { private int artistID; //id of artist private String artistName; //name of artist Artist(int number, String name) { this.artistID = number; this.artistName = name; }

//return the artistName public String getArtistName() { return artistName; }

//set the artistName public void setArtistName(String artistName) { this.artistName = artistName; }

//return the artistId public int getArtistID() { return artistID; }

// set the artistId public void setArtistID(int artistId) { this.artistID = artistId; }

// toString method public String toString() { return this.artistID + "\t" + this.artistName; }

}

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

=+What additional competencies are needed for this organization?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago