Create two separate programs that maintain a collection of songs/tasks for a user to interact with.

Create a Heap class similar to the one made in the lecture notes. Make the Heap class generic to allow it to accept any type of comparable object.

Create a Song class. It should implement the Comparable interface. A Song has the following data:

  • Title
  • Artist
  • Album
  • Rating (1-5 stars)

A song is compared by the rating, with the highest rated song is displayed first. Break ties by alphabetical order of title. Override the toString() function to make it easier to print a song.

Create a Job class. It should also implement the Comparable interface. A Job has the following data:

  • Task Name
  • Due Date

A job is compared by the due date. The soonest due date should be displayed first. Break ties by alphabetical order of task name. Override the toString() function.

Tasklist - Provide functionality to:

  • Display the list of tasks
  • Display current task.
  • Add a new item to the task list
  • Mark complete removes task from list, displays new current task
  • Postpone next task prompts user for new due date, remove and re-add to list
  • Quit

Jukebox - Provide functionality to:

  • Display the list of songs
  • Display current song.
  • Add a new song to the list
  • Play next song removes song from list, displays new current song
  • Re-rate next song prompts user for new rating, remove and re-add to list
  • Quit

Notes

  • Reuse the same generic heap class for both of your programs.
  • Read in the list of possible tasks from a file so you dont need to enter them all each time the program is run.
  • Create a menu so the user can choose from the different possible functions.
  • Check all user input for validity.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.