Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you could help me write this code in Java form for Blue Jay, that would be amazing In the music-organizer-v5 project from Chapter 4:

If you could help me write this code in Java form for Blue Jay, that would be amazing

image text in transcribed

In the music-organizer-v5 project from Chapter 4:

add a playingTime field of type int to the Track class, and set it to a default value of 99 in the existing constructors; add a third constructor with parameters including artist, title, and filename that can set the playingTime to a different value; update the getDetails method to include the playingTime

add a method for the MusicOrganizer class named getTotalPlayingTime() with an int return type. It should add up and return all the values of playingTime for all the tracks stored in its ArrayList.

add a method for the MusicOrganizer class named get99MinuteTracks() that returns an ArrayList with all the tracks that have a 99 minute playing time

image text in transcribed

include the playingTime - add a method for the MusicOrganizer class named get99Minute Tracks O that returns an ArrayList with all the tracks that have a 99 minute playing time lic class MusicOrganizer // An Arraylist for storing music tracks. private ArrayList tracks; // A player for the music tracks. private MusicPlayer player; // A reader that can read music files and load them as tracks. private TrackReader reader; /** * Create a Musicorganizer */ public Musicorganizer() \{ tracks = new ArrayList (); player = new MusicPlayer () ; reader = new TrackReader () ; readLibrary( ".. /audio"); System.out.println("Music library loaded. " + getNumberOfTracks() + " tracks.") System.out.println(); \} /** * Add a track file to the collection. * @param filename The file name of the track to be added. */ public void addFile(String filename) \{ tracks.add (new Track(filename)); \} /** * Add a track to the collection. * @param track The track to be added. */ public void addTrack(Track track) \{ tracks.add(track)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

How influential does the organization see this public as being?

Answered: 1 week ago

Question

Explain in detail how the Mughal Empire was established in India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I - -[ze dx

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = 1- 1 dx 9

Answered: 1 week ago