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 in http draw a figure to show the application of cookies

1. In HTTP, draw a figure to show the application of cookies in a scenario in which the server allows only the registered customer to access the server. 2. In HTTP, draw a figure to show the application of cookies in a w ...

1 list and discuss three characteristics an application

1. List and discuss three characteristics an application must have in order to be considered suited for the cloud. 2. What is MapReduce? Describe the structure and working of MapReduce. 3. What is Hadoop? Describe the th ...

1 distinguish between a getrequest pdu and a setrequest

1. Distinguish between a GetRequest PDU and a SetRequest PDU. 2. In SNMP, which of the following PDUs are sent from a client SNMP to a server SNMP? a. GetRequest b. Response c. Trap

1 implement a new version of the maze solving program from

1. Implement a new version of the maze solving program from Chapter 7 to use recursion instead of a software stack. 2. Design and implement a program to play tic-tac-toe against the computer using a recursive function to ...

1 in sctp a packet is carrying a cookie echo message and a

1. In SCTP, a packet is carrying a COOKIE ECHO message and a DATA chunk. If the size of the cookie is 200 bytes and that of the user data is 20 bytes, what is the size of the packet? 2. In SCTP, a packet is carrying a CO ...

Background informationfor this assignment you need to write

Background information For this assignment you need to write a console application in the Java programming language which implements a simulation for a movie borrowing and return system for the video store MovieMaster. T ...

1 are idss similar to fi rewalls2 why are system intrusions

1. Are IDSs similar to fi rewalls? 2. Why are system intrusions dangerous? 3. Discuss the best approaches to implementing an effective IDS. 4. Can system intrusions be stopped? Support your response.

1 explain the advantages of ipv6 when compared to ipv42

1. Explain the advantages of IPv6 when compared to IPv4. 2. Explain the use of the flow field in IPv6. What is the potential application of this field? 3. Distinguish between compatible and mapped addresses and explain t ...

Assignmentassume that the service times are

Assignment Assume that the service times are constant: Consider the M/D/1/n queue (finite waiting room, that is, a buffer with n waiting positions). Write a simulation program for this model, and compare the simulation r ...

Describe a dbms and its functions list at minimum three of

Describe a DBMS and its functions. List, at minimum, three of the popular DBMS products and give a brief description of each. 200 words and APA format Open Source Software Research Project Research an open source softwar ...

  • 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