Java playlist program. All the necessary information are on the pictures. The PlayList Project This assignment requires
Fantastic news! We've Found the answer you've been seeking!
Question:
Java playlist program. All the necessary information are on the pictures.
Transcribed Image Text:
The PlayList Project This assignment requires you to design a class that mimics the creation and use of a playlist for an mp3 player. The class will provide the capability to create a playlist by having the user enter playlist information from the keyboard, writing the playlist file (playlist.txt) to disk, reading the file from disk, and printing the read file on the screen. Your class needs to meet the following criteria and include the following methods: 1. All methods, including the main () method will be contained in a single class file. 2. The file name of the text file, for both writing and reading is to be "playlist.txt". 3. No constructors need to be used, methods can all be static. 4. The following methods: A method makeList (String array[]) which does the following: Prompts the user to enter the song title, artist name, and a rating (from 1 through 5) for each entry on the list. . ● ● Assigns the concatenated string to an array element. Each element represents a list item, and the array represents the playlist. • Calls printFile () to print each element of the array to the screen. A method writeFile (String array []) which does the following: Writes each element of the array to the playlist.txt file as a separate line in the file. Once the file has been written, calls print File () to print each element of the array to the screen.. . . A method readFile () which does the following: Calls a private helper method get NumLines () which reads the number of lines stored in the playlist.txt file (see below for more information). Reads each line of the playlist.txt file and assigns the line to an array element. Calls printFile() to print each element of the array to the screen. . . Concatenates the song title, artist name, and rating strings together separating each item by a comma (a comma delimited line of text). A method get NumLines () which does the following: Functions as a helper method to readFile(). Reads the number of lines in the playlist.txt file and returns that integer to the calling method or variable. . . . Uses a FileReader object wrapped by a BufferedReader object to facilitate the counting of lines. Returns an integer value to readFile () (or any other calling method or variable) representing the number of lines in the existing text file to be read. A printFile (String array[]) whose function is to print the playlist entries assigned to an array. The PlayList Project This assignment requires you to design a class that mimics the creation and use of a playlist for an mp3 player. The class will provide the capability to create a playlist by having the user enter playlist information from the keyboard, writing the playlist file (playlist.txt) to disk, reading the file from disk, and printing the read file on the screen. Your class needs to meet the following criteria and include the following methods: 1. All methods, including the main () method will be contained in a single class file. 2. The file name of the text file, for both writing and reading is to be "playlist.txt". 3. No constructors need to be used, methods can all be static. 4. The following methods: A method makeList (String array[]) which does the following: Prompts the user to enter the song title, artist name, and a rating (from 1 through 5) for each entry on the list. . ● ● Assigns the concatenated string to an array element. Each element represents a list item, and the array represents the playlist. • Calls printFile () to print each element of the array to the screen. A method writeFile (String array []) which does the following: Writes each element of the array to the playlist.txt file as a separate line in the file. Once the file has been written, calls print File () to print each element of the array to the screen.. . . A method readFile () which does the following: Calls a private helper method get NumLines () which reads the number of lines stored in the playlist.txt file (see below for more information). Reads each line of the playlist.txt file and assigns the line to an array element. Calls printFile() to print each element of the array to the screen. . . Concatenates the song title, artist name, and rating strings together separating each item by a comma (a comma delimited line of text). A method get NumLines () which does the following: Functions as a helper method to readFile(). Reads the number of lines in the playlist.txt file and returns that integer to the calling method or variable. . . . Uses a FileReader object wrapped by a BufferedReader object to facilitate the counting of lines. Returns an integer value to readFile () (or any other calling method or variable) representing the number of lines in the existing text file to be read. A printFile (String array[]) whose function is to print the playlist entries assigned to an array.
Expert Answer:
Answer rating: 100% (QA)
import javaio public class PlaylistManager public static void mainString args String playlist new String100 Max 100 songs for simplicity int choice do ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What am I required to do in this assignment? Shared Power is an information system to help tradesmen share expensive and specialist tools rather than buying them themselves. Registered owners add...
-
For this assignment, you will need to copy the excel file provided in Project Assignment 1 into your UMSystem Office365 OneDrive. You should have been prompted to do so when you clicked on the link...
-
The total cost of 2 chair and 1 table is 210 dollars. The total cost of 1 chair and 2 tables is 285 dollars. What is the cost of 1 chair?
-
The stacker crane supports a 1.5-Mg boat with the center of mass at G. Determine the internal normal force, shear force, and moment at point D in the girder. The trolley is free to roll along the...
-
0.75% of $100 is what amount?
-
How do monotremes differ from other mammals?
-
Duke Energy manufactures and distributes electricity to customers in the United States and Latin America. Duke recently purchased Cinergy Corporation, which has generating facilities and energy...
-
Vanessa is the Chief Financial Officer for a US company. It is a large multinational company whose annual revenues exceed $5.0B and its shares are trade on the New York Stock Exchange. The FCPA...
-
ers and serves as its own transfer age program for the examination of the three accounts composing stockholders' equity section of Zeitlow Corporation's balance sheet. Do not include procedures...
-
Assuming a researcher is unable to find guidance in an IFRS standard or interpretation that is on point for a research question, what sources of guidance should the researcher consider next? Select...
-
Select two models currently in use in the fire, emergency services, or other public safety discipline. Describe the model, how it is applied, what type of information does it require and does it...
-
What can happen if community leaders lack finance knowledge in the context of community development and investment?
-
The polynomial 8x^(2)-8x+2-5+x is simplified to 8x^(2)-gx-h. What are the value of g and h ?
-
Select 1 or 2 health care leadership challenges and map which leadership functions (operational, entrepreneurial, or enabling) can be used to address them. Brainstorm how complex leadership...
-
There's always a cost to any benefit being provided. A subsidy comes with a cost as it has to receive funding from its citizens. An increase of subsidies across the nation, the more money it will be...
-
A parcel of land currently generates a return of $55.00 per acre and the return is expected to maintain it's purchasing power (on average) in the future. Market interest rates are .0712 and expected...
-
On 1 July 2021, Croydon Ltd leased ten excavators for five years from Machines4U Ltd. The excavators are expected to have an economic life of 6 years, after which time they will have an expected...
-
Use any test to determine whether the series is absolutely convergent, conditionally convergent, or divergent. (-9)" n=1 n10"+1
-
The contour map shows the temperature, in degrees Fahrenheit, at 4:00 pm on February 26, 2007, in Colorado. (The state measures 388 mi west to east and 276 mi south to north.) Use the Midpoint Rule...
-
Verify that the function satisfies the three hypotheses of Rolles Theorem on the given interval. Then find all numbers c that satisfy the conclusion of Rolles Theorem. f(x) x 3 - 2x 2 - 4x + 2, [22,...
-
In 2019, Maggy (34 years old) is an employee of YBU Corp. YBU provides a 401(k) plan for all its employees. According to the terms of the plan, YBU contributes 50 cents for every dollar the employee...
-
In 2019, Nitai (age 40) contributes 10 percent of his $100,000 annual salary to a Roth 401(k) account sponsored by his employer, AY Inc. AY Inc. matches employee contributions to the employees...
-
In 2019, Susan (44 years old) is a highly successful architect and is covered by an employee-sponsored plan. Her husband, Dan (47 years old), however, is a Ph.D. student and unemployed. Compute the...
Study smarter with the SolutionInn App