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

Conduct research and reading to understand how

Conduct research and reading to understand how multimegawatt induction generators can be controlled by vector control. Assume devices capable of handling high voltages and high currents, maybe not possible to operate wit ...

For this project you will write a java program that allows

For this project, you will write a Java program that allows the user to select an animal from a menu and then display information about the animal. Create a new project in your IDE named "AnimalInfo." Create a class call ...

1 what is an architectural style2 what is a design pattern3

1. What is an architectural style? 2. What is a design pattern? 3. Explain the principle of separation of concerns, and the advantages it entails for software development. 4. What is the purpose of each component in a mo ...

Suppose that bob is a client that connects to alice which

Suppose that Bob is a client that connects to Alice, which is an SSL server. Assume Bob creates a message = EB (rec, H(rec, MB)) and sends it to Alice. How does Alice process the arrived message? Does this system provide ...

What does describe the overall impact of utilizing

What does "Describe the overall impact of utilizing information technologies in combatting digital crime and digital terrorism mean?

Create a simple structure using the information from your

Create a simple structure using the information from your book for help. Populate the structure. And print an example of one of the structure. Give example of the use of the dot operator.

1 why do optical signals used in fiber optic cables have a

1. Why do optical signals used in fiber optic cables have a very short wave length? 2. Can we say whether a signal is periodic or nonperiodic by just looking at its frequency domain plot? How? 3. Is the frequency domain ...

Compare electric car telsa semi electric hybrid car toyota

Compare electric car Telsa, semi electric (hybrid car) Toyota Prius, and regular fuel efficient cars Toyota Corolla / Honda Civics How long does it take to re charge a Telsa, how long can Telsa travel, where can you rech ...

1 assuming there are no stalls or hazards what is the

1. Assuming there are no stalls or hazards, what is the utilization of the data memory? 2. Assuming there are no stalls or hazards, what is the utilization of the write-register port of the "Registers" unit? 3. Instead o ...

Discussion questionpersonal factors such as anger revenge

Discussion Question Personal factors, such as anger, revenge, and lack of rewards and recognition, may increase the risk of someone stealing from or spying against employees. Organizations should apply adequate security ...

  • 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