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

1 a certain two-input gate computes the exclusive-or

1. A certain two-input gate computes the exclusive-OR function using negative logic. What function does the same gate compute using positive logic? 2. Is there a Boolean function that cannot be realized using only AND an ...

1 provide junit test class taxreturntest with three test

1. Provide JUnit test class TaxReturnTest with three test methods that test different tax situations for the TaxReturn class in Chapter 5. 2. Write methods that show the letters H, E, L, O on the graphics window, where t ...

The leadership of gti has chosen oracleregnbspfor their

The leadership of GTI has chosen Oracle ®  for their Enterprise Application System, but some members of the leadership team are skeptical of this solution. They have asked you to provide them with a report describing the ...

Implement a class quiz that implements the measurable

Implement a class Quiz that implements the Measurable interface. A quiz has a score and a letter grade (such as B+). Use the implementation of the DataSet class in Section 9.1 to process a collection of quizzes. Display ...

Taskin this assessment you are required to -- select a

Task In this assessment you are required to - - Select a topic from the list given below and conduct research (based on literature, at least three recent research papers) and prepare a summary report with brief supportiv ...

A food processing company makes meatloaf to be sold in the

A food processing company makes meatloaf to be sold in the frozen food section of supermarkets. Each week the recipe used changes based on the current cost of ingredients. Ingredients and current costs are as shown below ...

Keeping the iv secret in ofb mode does not make an

Keeping the IV secret in OFB mode does not make an exhaustive key search more complex. Describe how we can perform a brute-force attack with unknown IV. What are the requirements regarding plaintext and ciphertext  Descr ...

You are managing an insurance claim processing process and

You are managing an insurance claim processing process, and you have just been informed that the repairer, Chris Gray, will not be available for work after June 7, 2011, for several days. You need to set a constraint on ...

Consider the vector adt from programming project 21a

Consider the Vector ADT from Programming Project 2.1: (a) Provide a new implementation that uses a doubly linked list and a probe reference for locating a specific element. (b) Evaluate your new implementation to determi ...

When installing utp cable for a horizotnal link it is very

When installing UTP cable for a horizotnal link, it is very important to minimize crosstalk. Explain what crosstalk is, why crosstalk can be a problem, and how it is minimized when terminating UTP cables.

  • 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