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

Course conclusionnbspnbspplease respond to the followingyou

"Course Conclusion"   Please respond to the following: You have just completed 10 weeks of an introduction to networking course. Imagine you have been asked to create a one-day training course that highlights the importa ...

Computer viruses and worms are often transmitted as

Computer viruses and worms are often transmitted as attachments to electronic mail. The Drib's development network infrastructure directs all electronic mail to a mail server. Consider an alteration of the developmen ...

Use the fdm to calculate the characteristic impedance of

Use the FDM to calculate the characteristic impedance of the high-frequency, air-filled rectangular transmission line

The suggestion in the previous problem can result in a

The suggestion in the previous problem can result in a considerable overhead for the procedure calls to the insertion sort. An alternative and more effective approach is to postpone the insertion sorting until after all ...

1 what are all the possible resulting values of w x y and z

1. What are all the possible resulting values of w, x, y, and z? For each possible outcome, explain how we might arrive at those values. You will need to examine all possible inter leavings of instructions. 2. How could ...

Amicable numbers are pairs of numbers each of whose

Amicable numbers are pairs of numbers each of whose divisors add to the other number. (Note: 1 is included as a divisor but the numbers are not included as their own divisors.) Design and implement an algorithm that test ...

1 list and describe the three fundamental ways that data

1. List and describe the three fundamental ways that data can be intercepted. How does a physcial security program protect against each of these data interception methods? 2. What can you do to reduce the risk of laptop ...

A certain college classifies students according to credits

A certain college classifies students according to credits earned. A student with less than 7 credits is a Freshman. At least 7 credits are required to be a Sophomore, 16 to be a Junior and 26 to be classified as a Senio ...

Design an algorithm for power evaluation that is built upon

Design an algorithm for power evaluation that is built upon a base 3 strategy rather than the current base 2 method. Compare the results for this new method with the current algorithm.

What is the relationship between hvac and physical security

What is the relationship between HVAC and physical security? What four physical characteristics of the indoor environment are controlled by a properly designed HVAC system? What are the optimal temperature and humidity r ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro