Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Computer Engineering Expert

Implement a singly linked list in ASCENDING sorted order. (You should not use any of Java built-in Collection classes). The data value in the node is a Song object. The sorting is based on the length of song.

Your Driver file must read song’s information from a Songs.txt file. The data file has a number of lines. Each line is in the format of “SongTitle@LengthOftheSong”.

Assumptions: No song has same title and length.

The linked list class must comprise methods to:

a) return the size of the linked list
public int size( ) { …}

b) print the linked list
public void print( ) { … }

c) test if x is contained in the linked list.
public boolean contains (E x) { …}

d) add a value x if it is not already contained in the linked list.
public boolean add(E x)

e) remove a value x if it is contained in the linked list.
public boolean remove(E x) { …}

Note:

1) The linked list must be generics.

2) You need to prepare equals method in Song class to check if two song objects are equivalent or not. If the title AND the length are all similar, then the method returns true.

3) You as well require writing compareTo method in the Song class to compare two song’s lengths.

4) The song objects are sorted by the lengths in the linked list.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93119

Have any Question? 


Related Questions in Computer Engineering

A yard is a traditional english container it is 36 inches

A "yard" is a traditional English container. It is 36 inches long, and can be approximated by a 4-inch diameter glass sphere attached to a conical section whose narrow end is 1 inch in diameter, and whose wide end is 6 i ...

A 1000000 line of code program when printed at 50 lines per

A 1,000,000 line of code program, when printed at 50 lines per page, results in stack of paper about 10 feet high (3 meters). Show the calculation of this result. List any assumptions made.

1 explain the difference between a simple memory card and a

1. Explain the difference between a simple memory card and a smart card. 2. List and briefly describe the principal physical characteristics used for biometric identification. 3. Briefly describe the difference between D ...

Advanced exercise lambda calculus the book claims that the

(Advanced exercise) Lambda calculus. The book claims that the declarative model and the declarative concurrent model both do functional programming. For this exercise, prove this claim formally. First show that any execu ...

Regarding to capital structure calculate the following

Regarding to Capital Structure, calculate the following measures for three years of FLIGHT CENTRE AUSTRALIA 1. Capital structure (i.e., the percentage of debt and percentage of equity) 2. Cost of common equity and (if an ...

For a platform of your choice investigate the growth in the

For a platform of your choice, investigate the growth in the size of main memory(RAM) from the time the platform was developed to the present day. Create a chart showing milestones in memory growth and the approximate da ...

Forensics involves the investigation and documentation of a

Forensics involves the investigation and documentation of a given crime to provide evidence that is typically used for legal action. E-mail is extensively used in personal and business operations to communicate with indi ...

The necessary information is located in the attached

The necessary information is located in the attached document. I now need help answering the following six discussion questions: 1. What are the laws governing the proper practice of accounting and finance? 2. What are t ...

Please helpinstructionsprovide a java code to create and

Please Help. Instructions: Provide a Java code to create and initialize an array of integers (Java primitive int), floats or any other Java primitive type of your choice. You pick the array name and length. Demonstrate h ...

What are the differences between the three main types of

What are the differences between the three main types of data warehouse usage: information processing, analytical processing, and data mining? Discuss the motivation behind OLAP mining (OLAM).

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate