Create a program that begins by loading file onto arraylist

Assignment Help JAVA Programming
Reference no: EM131374107

Java - Album - MESSAGE FOR SOLUTION

1.) Using the attached catalog.txt file, create a program that begins by loading the file onto an arraylist of Album classes called Catalog. Each Album class consists of 3 attributes: artist name, album name, and an arraylist of Track objects, each containing the name of a song on the album.

2.) Implement the Comparable interface for the Album and the Track classes, defining their own compareTo() methods.

3.) Sort the Album arraylist using Collections.sort(), and display the sorted Albums by album name. For each Album, display the album name, artist name, and display all the Tracks (i.e. songs) in alphabetical order (use the sort() method too)

4.) Add another sort of the Album arraylist, by artist name. To implement this sort, you will need a Comparator interface, and a Comparator class.

Save the results of this sort in a separate ArrayList from the one sorted by album name. Print a dividing line of asterisks, and then display all the Albums by artist name. For each Album, also display the album name, and all its tracks (songs) in alphabetical order. For more hints, see pg. 661 in CH. 14 of Big Java, 5th Edition.

Reference no: EM131374107

Questions Cloud

What were triggers of cultural change in japan during 1990s : What were the triggers of cultural change in Japan during the 1990s? How is cultural change starting to affect traditional values in Japan?
What are some possible causes of delayed ignition : A gas burner is noisy and the flames are lifting off the burner. What is the most likely cause?
Write java application that lets you create strong password : Write a java application that lets you create a strong password. The password should follow the following some criteria: (use your own creativity to come up with specific requirements).
Complaint of severe abdominal pain : A woman comes in with a complaint of severe abdominal pain which occurs about once a month for a few days, then goes away until the next month. She has no fever nor any signs of pelvic disease.
Create a program that begins by loading file onto arraylist : Using the attached catalog.txt file, create a program that begins by loading the file onto an arraylist of Album classes called Catalog. Each Album class consists of 3 attributes.
Calculate average live weight of males and females : You are working in a museum studying a collection of primate skeletons. Thankfully, the sex and live body weight of each individual is known, so you are able to calculate the average live weight of males and females for this species (all measureme..
What are some probable causes of noise and vibration : What causes rollout of burner flames? What are some possible causes of burner flashback?
What should the american executive do : The local manager tells the American executive that the child is an orphan with no other means of support, and she will probably become a street child if she is denied work. What should the American executive do?
What are some of the key lessons you have learned : If you could go back in time to a few weeks ago, what are some of the things you know today that you would tell yourself? In other words, what are some of the key lessons you have learned? Similarly, what have you learned in researching that has m..

Reviews

Write a Review

JAVA Programming Questions & Answers

  What is the most restrictive access modifier

What is the most restrictive access modifier that will allow members of one class to have access to members of another class in the same package?

  Develop a simplified version of a ftp program

CSCI 53700 - Fall 2016 - Develop a simplified version of a ftp program (similar to the one described in the end-to-end argument paper) using the stream sockets available in java.net package.

  What is value of returnvalue after given code has executed

What is the value of returnValue after the following code has been executed?x = "150";y = "100";returnValue= x - y; Which of the following uses correct syntax to receive a value stored in totalCost?

  Calculate a customer''s charges and total bill

A state sales tax is applied to the sum of all charges except for the federal gasoline tax

  Write a short, structured design that accomplishes this task

Identify how you can encapsulate the data and processes you identified into an object oriented design.

  Application that will allow a new customer to order a house

Create an application that will allow a new customer to order a house. You'll allow the customer to choose among four models (Aspen, Britattany, Colonial, and Dartmoor) by creating separate ButtonGroups.

  Credit card expenses

You started recording every credit card transaction so that you can analyze your monthly expenses. You used an Excel worksheet to track dates, places, categories, and amounts. Because you are a consultant who travels periodically, you also have bu..

  Write thejava code for a program

Write theJava code for a program that reads the weight of a piece of luggage and print the proper message, depending on the weight, as per the table below.

  Write a script that inputs three integers

Write a script that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers in an alert dialog2

  Generate an amortization schedule

The applet input will be the loan amount, annual percentage rate (APR), and the number of years to pay out the loan. The output will be the loan amount, interest rate per pay period number of pay periods and the monthly payment

  What is method overloading

1. What is method overloading? 2. What is the purpose of a constructor? 3. How do you call a method of one class from a method of another class?

  Design and implement a driver program testsocialgraph

Design and implement a driver program TestSocialGraph (in a separate source file TestSocialGraph.java) for testing the methods implemented in Part 1.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd